-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Experiment/add cypress for e2e tests #8282
Conversation
Deploy preview for carbon-elements ready! Built with commit 18b87f2 |
Deploy preview for carbon-components-react ready! Built with commit 18b87f2 https://deploy-preview-8282--carbon-components-react.netlify.app |
…periment/add-cypress-for-e2e-tests
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.
installed, built and tests ran great 🟢 👍🏽
@tay1orjones how does the authoring experience work with the update? I had assumed it was
Also ooof, that's rough. I assume most of the time is to compile our code with the dev server from webpack that is used by cypress to test? |
@joshblack This uses the "Component Test Runner" which they've separated from the standard runner. It's what allows us to
I think it's actually been reduced since I updated to the new version of cypress! I don't see a total time output on the console, but the compile time is listed at 22.24s. The tests themselves are super quick:
Also there is video recording processing, 2s of the overall time. We might be able to turn that off in CI via a flag. Same with screenshots. |
…bon-design-system/carbon into experiment/add-cypress-for-e2e-tests
Just pushed an update to turn off video and snaps in CI on the I spoke too soon on the time reduction, lerna still reports total time of 44.2s to complete the command. So roughly half the time appears to be webpack compilation. |
…periment/add-cypress-for-e2e-tests
Thanks @tay1orjones! That makes a ton of sense. |
@joshblack I updated the command naming/syntax based on your suggestions 👍 |
This is really great! I changed the test to output the video and everything worked as expected |
@tw15egan Awesome! You can also run the tests with GUI for debugging/authoring with |
…periment/add-cypress-for-e2e-tests
…periment/add-cypress-for-e2e-tests
…bon-design-system/carbon into experiment/add-cypress-for-e2e-tests
@tw15egan @joshblack let me know if there's any other concerns here 👀 Otherwise I think this one might be set 👍 just need another approve |
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.
Ship it! 👍🏻 ✅
Closes #8145
@testing-library/cypress
to have a more consistent syntax between jest unit tests and cypress tests.cypress-real-events
so we can use the Tab key for keyboard navigation testing.From the original issue - this integration considers the following:
ci-checks
runs ayarn lerna run
command in the rootpackage.json
, which runs yarn command for cypress inpackages/react
. We only attach Percy to report snaps to their external service in CI (not locally)Changelog
New
Testing / Reviewing