-
Notifications
You must be signed in to change notification settings - Fork 31
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
NEW e2e environment using playground cli #810
base: main
Are you sure you want to change the base?
NEW e2e environment using playground cli #810
Conversation
(which is a bit weird, because the playwright.config.ts setting is ignored and the folder needs to be re-named to 'tests' to make tests be found at all)
TRICKY: Enabled mapping leads to 404 for build blocks, Disabled mapping helps gatherpress blocks, but make the simple paragraph test fail (copied for debugging from gutenberg)
…oss one Github actions workflow attempt.
…iled attempts (suggested at GatherPress#776 (comment) by @swissspidy)
This comment was marked as resolved.
This comment was marked as resolved.
Some tests are still failing and I'm not sure, what is the reason for that. But, as the quest was to find a working environment, I would call this to be done and open it up for reviews. |
…ansfer with custom types in the drop event on Linux. The solution is to use `xvfb-run` to run the tests."
Note Ready for review does NOT mean ready for merge! Just to note. After fiddling with this workflow(s) for a while, now I need an outside view to don’t get crazy. I’m still unsure about the reasons for the timeouts. |
If the database works for a while and then it breaks, It's likely this issue: WordPress/wordpress-playground#1596. I'd love to learn what happens there. Would you be able to log the first failing request and zip the playground site? It would also be supremely useful to peek into the cc @WunderBart @swissspidy as these database error came up in your explorations, too. |
This PR allows GatherPress to run automated & manual end-to-end tests, while sharing the same,
wp-playground/cli
powered, setup. The started playground imports theGatherPress/demo-data
, that can be used instead of mocks or fixtures (for now).NEEDEDnice-to-have, before mergeeditor.canvas
easily.(Feature/e2e tests workflow #776 (comment))
New for
docs/developer
E2E Testing using Playwright and
wp-now
GatherPress allows to run automated & manual end-to-end tests, while sharing the same,
wp-playground/cli
based, setup.Automated tests
Check the results of the e2e-tests action workflow at
https://github.com/GatherPress/gatherpress/actions/workflows/e2e-tests.yml
.Manual testing
Install dependencies
To run the E2E tests you will have to install playwright using the following command:
Install the dependencies to create the testing instance, using the following command:
Run the E2E tests
A call to
npm run test:e2e...
will automatically setup awp-playground/cli
powered WordPress instance.The testing is website is reachable at
http://127.0.0.1:9400
, the user isadmin
and the password ispassword
.Choose one of the following options
For the headless mode, use the following command:
Run Playwright visually (to run tests in isolation and change what's happening), use:
For debug mode (which will open the browser along with Playwright Editor and allows you to record what's happening), use the following command:
Run all the tests against a specific project.
Run files that have events.spec in the file name.
Run Tests independently AND visually using the Playwright VSCode extension
More about E2E testing
Start here:
from the WordPress handbooks
More about
wp-playground/cli
, as the testing environmentExamples with great documentation:
To see more examples of E2E tests, check the Gutenberg repository: https://github.com/WordPress/gutenberg/tree/trunk/test/e2e
Closes #693
How to test the Change
npm run test:e2e
for exampleChangelog Entry
Credits
Props @carstingaxion
Checklist: