Playwright setup
Checklist before requesting a review
- [X] I have performed a self-review of my code.
- [X] I have added tests that prove my fix is effective or that my feature works.
Description
Extracted from https://github.com/glpi-project/glpi/pull/18927 with only one test (others needs to be reworked since they have been updated on cypress in the meantime - will be done on dedicated PRs to keep this one light).
This setup is nearly complete and could be merged right now IMO, which will allow me to get started on migrating existing tests (and adding an install test as we discussed today).
Things that are missing and could be added in a followup PR:
- ~Use a dedicated "e2e" environment different from "testing" (more convenient for running tests locally as they won't conflict/pollute the phpunit database. We have a good idea on how to do this with @cedric-anne and we can probably do it next week).~ -> done in 8bd6ad55fb687b98419a5093e10bbb6807eabbe2.
- Use our own runner for better performances and multi-threading (not relevant yet as only one test exist, can be delayed until more tests are migrated. POC have been done on possible runners already, just need some more tests with our own machines to limit costs).
Trying to run locally, I got the following fail:
Can you retry with the latest changes (and generate a trace (npx playwright test --trace=on) and send it to me if it still fails) ?
WIth lastest changes, I no longer can run tests:
Can you retry with the latest changes (and generate a trace (
npx playwright test --trace=on) and send it to me if it still fails) ?
My local setup is now broken. I'm not going to spend more time on that; goal is not to run all that locally.
@cedric-anne the recent changes you made to the githubactions-php-apache ci image prevent me from running the playwright tests on them.
Indeed, you forced the testing env in the virtual env which mean we can't run playwright on the e2e_testing env.
We need to either:
- Rollback this change (find another fix if possible, I do not know why you needed this)
- Change
githubactions-php-apacheto expose another port with thee2e_testingenv, like we did for the dev image.
Edit: done, see https://github.com/glpi-project/docker-images/commit/1b77895c64e9dc12e8801b1a20cd3bfa0b634a2c.
Replaced by #21922 .