-
Notifications
You must be signed in to change notification settings - Fork 44
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
Commands and types do not import properly #162
Comments
Here's a hacky bandaid/workaround for now:
|
I'm using only same type problems with cy.lighthouse in spec files. |
I think I had the same issue. Adding
|
I will take care of this one when coming back from vacation. Seems like something is not going super well with Cypress 10 🤔 |
You should also be able add this at the top of that /// <reference types="@cypress-audit/lighthouse" />
/// <reference types="@cypress-audit/pa11y" /> |
Are you still facing this issue? |
I still get this issue, but the workaround provided by @brandonlenz does the trick. Does indeed feel hacky though |
What does not work?
pa11y command types are not properly recognized if the library is configured correctly (according do the documentation) with the following error:
TS2339: Property 'pa11y' does not exist on type 'cy & CyEventEmitter'.
. Satisfying the typescript compiler deviates from setup instructions, and naturally prevents the tests from running.How to reproduce?
Create a new cypress typescript project. Follow the documentation for using cypress with custom commands and setting up @cypress-aduit/pa11y. In commands.ts, set up a custom commands such as
Make sure the supportFile also contains the following:
Expected behavior
The exported types should be properly identified when importing the commands as the instructions suggest, and the tests should be able to run as properly configured.
Screenshots / Animated Gifs
Importing /pa11y/commands:
TS2339: Property 'pa11y' does not exist on type 'cy & CyEventEmitter'.
Importing /pa11y:
however,
The text was updated successfully, but these errors were encountered: