-
Gregor Schulz authoredGregor Schulz authored
Web Testing
This spike uses Playwright for web testing.
Dependencies
You need to have Docker installed, because Playwright only supports Ubuntu.
Credentials
The test for the login require working credentials. Please provide them in the .envrc.local
file. The variable names are already there.
Testing selective browsers
You can test selective browsers from the command line by specifying an environment variable:
E2E_WEB_BROWSERS=Mobile_Chrome,Desktop_Firefox yarn test
Take a look in playwright.config.ts
for valid browser names.
Testing with retries
By default, local tests run without retries, but CI test runs use retries. Therefore, flaky tests can fail locally, but succeed in CI. If you want to test with retries locally, you can enable them via an environment variable:
E2E_WEB_RETRIES=2 yarn test
Testing locally
For testing the web app locally, start the local dev environment from the root of the project with
yarn web:dev
and execute the tests from this directory:
yarn test:localhost
if E2E_USER vars are not loaded you can try this
E2E_USER_USERNAME=... E2E_USER_PASSWORD=... E2E_USER_ID=... yarn test:localhost