Note: Looks like the Cypress types changed a bit, I had to update my code in cypress/support/component.ts like this: ``` import type { MountingOptions } from 'cypress/vue/dist/@vue/test-utils'; function mount(comp: any, payload: MountingOptions = {}) { const _props: T = { ...payload.props, } as any; return _mount(comp as any, { ...payload, props: _props, global: { plugins: [ pinia, createNewRouter(createWebHashHistory()) ] } }); } ```
Hi, Lachlan. I tried this solution but I got an error on this line: import type { MountingOptions } from "cypress/vue/dist/@vue/test-utils"; It says "Cannot find module 'cypress/vue/dist/@vue/test-utils' or its corresponding type declarations."
This has been one of the best testing courses I’ve ever had the pleasure to learn from, thank you very much for creating it. Implementing cypress component testing in a production project this week and looking forward to it. Can’t wait for the e2e side of things too!
Hi @LachlanMiller, thanks for the great course. At the end you say you will be talking about end-to-end tests in the next lecture. Are there actually any videos about that? Where can I find them? Thanks, Holger
Hi Lachlan, I'm stuck, i try to make it work in my own local instance but i'm missing something. I copied the cypress directory from your git. Also the tests i copied and the FormInput.vue + PostWriter.vue files i copied. But those two tests (for the FormInput and PostWriter) keep failing. Also there is nothing on the test page, so somehow the Parent doesn't mount it looks like (when i setup the component with defineComponent). Because this only happens in those 2 test, do you know what the problem can be? Should i configure or install something else?
Note: Looks like the Cypress types changed a bit, I had to update my code in cypress/support/component.ts like this:
```
import type { MountingOptions } from 'cypress/vue/dist/@vue/test-utils';
function mount(comp: any, payload: MountingOptions = {}) {
const _props: T = {
...payload.props,
} as any;
return _mount(comp as any, {
...payload,
props: _props,
global: {
plugins: [
pinia,
createNewRouter(createWebHashHistory())
]
}
});
}
```
Hi, Lachlan. I tried this solution but I got an error on this line:
import type { MountingOptions } from "cypress/vue/dist/@vue/test-utils";
It says "Cannot find module 'cypress/vue/dist/@vue/test-utils' or its corresponding type declarations."
This has been one of the best testing courses I’ve ever had the pleasure to learn from, thank you very much for creating it. Implementing cypress component testing in a production project this week and looking forward to it. Can’t wait for the e2e side of things too!
Great, glad you found it useful!
Cypress does a *lot* of things - I'd love to make a full length course at some point.
I second this comment. Thank you Lachlan!
@@johanrama Thanks a lot! I appreciate it!
This tutorial was really awesome! Thanks.
Thanks!
Hi @LachlanMiller,
thanks for the great course.
At the end you say you will be talking about end-to-end tests in the next lecture.
Are there actually any videos about that? Where can I find them?
Thanks, Holger
Hey Holger, I did not end making the E2E videos, sorry! Maybe soon.
Hi Lachlan,
I'm stuck, i try to make it work in my own local instance but i'm missing something.
I copied the cypress directory from your git.
Also the tests i copied and the FormInput.vue + PostWriter.vue files i copied.
But those two tests (for the FormInput and PostWriter) keep failing.
Also there is nothing on the test page, so somehow the Parent doesn't mount it looks like (when i setup the component with defineComponent).
Because this only happens in those 2 test, do you know what the problem can be?
Should i configure or install something else?
It's private but i added you to have access
Hey, I sent you a PR: github.com/RubenHoek/vue3-app/pull/1.
Thanks for checking out my content!
@@LachlanMiller It is working now! Thank you so much, you are the best!!