-
Notifications
You must be signed in to change notification settings - Fork 193
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
e2e testing is now scaffolded (via Cypress and wp-env) #5533
Conversation
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.
A few questions
|
||
### Automation testing |
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.
All this content is pretty informative for our old tests. @henryholtgeerts are we planning on writing similar content in our Gitbook?
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.
Yep! A version of this information, made more specifically relevant to our new e2e testing methodology, will be included in the GitBook. I opted to add a link to the GitBook, rather than expand on the info too much in this README, since the GitBook will be more up to date and comprehensive.
@@ -1,294 +0,0 @@ | |||
/** |
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.
@henryholtgeerts can we easily repurpose these tests rather than deleting them?
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.
Just wrapped up an audit of the old tests this morning -- some of the specs are no longer relevant but what is still testing non-deprecated functionality I'll be using to inform new e2e tests (what to test, and how to test it). Because the old tests are not using the Cypress framework, the tests will need to be rewritten, but they do serve as useful guides/checklists for writing new tests. 👍
I ran into some install issues, unrelated to the PR, and tracked down an answer in the gutenberg repository, as the issue seems related to dependencies of wp-env, see WordPress/gutenberg#22398 (comment) Additionally, I found that I needed to run |
Resolves #5511
Description
This PR scaffolds new e2e tests powered by Cypress and wp-env, and removes deprecated e2e tests (which were run with Jest and Puppeteer). After running
npm install
and ensuring they have Docker Desktop (or equivalent Docker dependencies) installed, developers can now run thetest:e2e
command to begin local e2e testing with Cypress.Affects
This PR affects existing e2e testing, and introduces the
npm run test:e2e
command to run new tests with Cypress.Visuals
https://www.loom.com/share/182a0f6fe44245e7b436697fdd9fe032
Pre-review Checklist
@since
tags included in DocBlocksUnreleased
section ofCHANGELOG.md
Testing Instructions
npm install
to ensure Cypress is installednpm run test:e2e
to open Cypresssample_spec.js test
, check that it loads the Reports dashboard as expected