Skip to content

Commit

Permalink
readme notes, don't upload report artifact since we're not using it
Browse files Browse the repository at this point in the history
  • Loading branch information
david-crespo committed Feb 17, 2022
1 parent 513ef77 commit 277c435
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/lintBuildTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,3 @@ jobs:
run: npx playwright install --with-deps
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ Using the script is strongly recommended, but if you really don't want to, make

</details>

### E2E tests with [Playwright](https://playwright.dev/)

The basic command to run the tests is `yarn playwright test`. Some debugging tricks (more in the docs [here](https://playwright.dev/docs/debug)):

- The simplest way to debug at a particular spot is to add `await page.pause();` right before it. This runs the test in a headed browser with the excellent [Inspector](https://playwright.dev/docs/inspector) and pauses the debugger. This is perfect for making sure the screen looks like you expect at that moment and testing selectors to use in the next step.
- `PWDEBUG=1 yarn playwright test` starts the tests in headed browser with the inspector, paused on the first line of the first test
- Add `--project=chromium` to only run the tests in a single browser
- Useful in combination with the inspector options because 3 browsers and 3 inspectors is not very useful (and it doesn't say which inspector goes with which browser)
- Add `--headed` to run the full tests in visible browsers (but they go by too fast to really see anything)

### Other useful commands

| Command | Description |
Expand Down

0 comments on commit 277c435

Please sign in to comment.