Running and Debugging Tests
-
Install 'Playwright Test for VSCode' extension
-
Make sure that the servers and the app you want to test is running
nf start
nx serve journeys
- Make sure that only firefox is running in playwright config
- go to
playwright.config.ts
- make sure firefox browser is uncommented
- make sure other browsers are commented out
- Run all playwright tests (e.g journeys)
npx nx run journeys-e2e:e2e
- Run just one playwright tests
npx playwright test apps/journeys-e2e/src/e2e/journeys.spec.ts
- Devcontainer's HTML results can be found at the root level in playwright-report/index.html. Copy entire directory to local and open the html report.
More resources on running tests: https://playwright.dev/docs/running-tests