-
Notifications
You must be signed in to change notification settings - Fork 6
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
test(ui-cypress): add Cypress setup with TypeScript support for E2E and … #2315
base: dev
Are you sure you want to change the base?
Conversation
hdinia
commented
Jan 24, 2025
- Configure Cypress for React + TypeScript + Vite
- Add support files for E2E and component testing
- Set up proper type declarations for Cypress commands
- Add ESLint rules for Cypress compatibility
- Include basic test examples for studies page
a3e9d81
to
17549e1
Compare
webapp/cypress/cypress.env.json
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only for testing the implementation, must be added to .gitignore
0523d6f
to
439ce61
Compare
f6e655e
to
d494952
Compare
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"types": ["cypress", "@testing-library/cypress"], | ||
"baseUrl": ".", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'baseUrl' and 'paths' are already in the extended config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one overwrite the base config, it's intended
@@ -41,6 +42,7 @@ export default [ | |||
}, | |||
reactPlugin.configs.flat["jsx-runtime"], | |||
jsdocPlugin.configs["flat/recommended-typescript"], | |||
cypressPlugin.configs.recommended, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove cypressPlugin.configs.recommended
and add in rules ...cypressPlugin.configs.recommended.rules
.
Their recommended config is not valid for ESLint 9 (they use the old way to add plugin).
cf. https://github.com/cypress-io/eslint-plugin-cypress/blob/master/lib/config/recommended.js
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will check that