test: issue sidebar testing using playwright (#4319)

Conclusion of https://codeberg.org/forgejo/forgejo/issues/3499

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4319
Co-authored-by: Otto Richter <git@otto.splvs.net>
Co-committed-by: Otto Richter <git@otto.splvs.net>
This commit is contained in:
Otto Richter 2024-07-05 05:03:45 +00:00 committed by Earl Warren
commit fafc4f6ad9
2 changed files with 112 additions and 0 deletions

View file

@ -19,6 +19,32 @@ make clean frontend
npx playwright install-deps
```
## Interactive testing
You can make use of Playwright's integrated UI mode to run individual tests,
get feedback and visually trace what your browser is doing.
To do so, launch the debugserver using:
```
make test-e2e-debugserver
```
Then launch the Playwright UI:
```
npx playwright test --ui
```
You can also run individual tests while the debugserver using:
```
npx playwright test actions.test.e2e.js:9
```
First, specify the complete test filename,
and after the colon you can put the linenumber where the test is defined.
## Run all tests via local act_runner
```