-
Notifications
You must be signed in to change notification settings - Fork 4
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
[WEB-3840] remove Cypress in favour of Storybook's test-runner #365
Conversation
9429fb0
to
1a2826b
Compare
@@ -1,13 +1,13 @@ | |||
{ | |||
"jsc": { | |||
"target": "es2018", | |||
"target": "es2021", |
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 aligns with Node 16, which is the minimum requirement across our other apps
1a2826b
to
19a5c01
Compare
0e27684
to
dc8a882
Compare
6c02398
to
b0f1b2a
Compare
b0f1b2a
to
a93fdb5
Compare
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 looks great @jamiehenson, thanks!
Just an aside, the tests for the Status
component is definitely flaky and we will get false negatives. This is because it goes from a loading state to whatever the story dictates, and depending on the time of the snapshot it might still be doing its animated pulse rather than rendering the status colour. I don't think it should block us for now, just as long as we're aware :)
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.
cant wait for this
@kennethkalmer I removed the "Live" story on |
Jira Ticket Link / Motivation
https://ably.atlassian.net/browse/WEB-3840
Summary of changes
Since the Storybook migration (pre v14), Cypress has been inactive. Upon reflection, now we have Storybook, Cypress seems a somewhat heavy handed approach to testing when we don't need deep integration testing - something like snapshot testing would probably be a good starting point but there wasn't a clear resolution to the conversation.
Thankfully for us, Storybook has options for all of the above. With its own
test-runner
, we get smoke tests (i.e. does this component render or not) for free for each story, and we have the option of writing more comprehensive testing journeys using Play functions - which given that they're written alongside the stories themselves seems more ergonomic.This PR brings in
test-runner
, guts all thecypress
stuff, and makes some adjustments to the Github workflows so that the test suite runs on push.How do you manually test this?
Pull down, run
yarn test
, Storybook should build and the test suite should run, resulting in a successful set of smoke tests like thisReviewer Tasks (optional)
Merge/Deploy Checklist
Frontend Checklist