-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat: adding Cypress Component Tests #832
Conversation
I fixed this example. Making a PR in component testing to include
|
@@ -17,6 +17,8 @@ | |||
"dependencies": { | |||
"@auth0/auth0-react": "1.3.0", | |||
"@aws-amplify/ui-react": "0.2.38", | |||
"@cypress/react": "^5.1.0-alpha.1", | |||
"@cypress/webpack-dev-server": "^1.0.4", |
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.
@JessicaSachs @dmtrKovalenko Should these be moved to devDependencies?
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 doesn't really matter for apps right? Or you are using yarn install --production for server?
But I don't care we can move it :)
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.
@dmtrKovalenko It does for vite tooling, which we will be merging soon as an option during development (#741). Please move these to devDependencies
.
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.
For Vite tooling, we'll be swapping this to the @cypress/vite-dev-server
package. Trying out the webpack version first 😻 . We have an esm build as well, but yes, these should be devDeps.
@dmtrKovalenko I updated this PR with the new versions and tried to implement the first test (AlertBar.tsx) -- I run into the ReactDOM Issue (Jira: CT-378). To get it to fail you can do |
So I did implement one test in my commit for this example. Should I pick this up? |
ce39516
to
8d9e35d
Compare
@dmtrKovalenko That would be awesome. 👍 |
|
||
describe("smoke", () => { | ||
it("works", () => { | ||
const [, , snackbarService] = useMachine(snackbarMachine); |
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.
BTW @JessicaSachs that is not the ReactDom issue. You can not just call the react hook inside the test
@JessicaSachs @dmtrKovalenko What's the status of this branch? |
This branch is a draft. It attempts to setup Cypress Component Tests with the Real World App.