-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing Typescript types for vueWrapper
after 10.0 migration
#22087
Comments
Thanks for the detailed bug report. I've seen this in a fresh project just now, too, and came to the same conclusion. The problem is we are bundling Test Utils with I think what we will likely need to do is also generate the types as part of the build step, and stick them here: https://github.com/cypress-io/cypress/tree/develop/cli/types with the other types. Glad that you found the work around (installing As an aside, if you have any other suggestions for component testing with Vue, feel free to open an issue or discussion - and thanks a lot for trying out Cypress 10 so early, and the updated Component Testing! |
Should be fixed by #22757 |
|
I am finding the same thing. Also, cy.mount(Comp, {
stylesheets: []
}) etc. #22757 exposes the Test Utils API and improves the types to |
This works for me in Cypress 10.10 Cypress.vueWrapper.setProps({ ... }) Has this been definitely fixed? |
It looks fine to me, #22757 seems to have done the job. Can re-open if there is ongoing issues. |
Current behavior
My project was using component testing before v10.
This is the code I'm using to get the Vue wrapper with type hinting.
After the migration, my
vue-tsc
command spat out these errors all over the place:I removed the
@cypress/vue
dependency from my project as instructed by this part of the Migration Guide: https://docs.cypress.io/guides/references/migration-guide#Component-Testing-ChangesThis caused the
@vue/test-utils
package to disappear from my dependency tree.I have fixed this problem in my project by installing
@vue/test-utils
in my project, and adding it to mytsconfig.json
types.Desired behavior
The Typescript types from
@vue/test-utils
should ship withcypress
for Vue projects. I don't want to install the dependency just for the Typescript types.Test code to reproduce
Starting with a clean Typescript + Vue 3 + Cypress 10 setup, you should be able to reproduce this error by including the following in any chain:
Cypress Version
10.0.2
Other
No response
The text was updated successfully, but these errors were encountered: