docs(e2e): explain how to use VSCodium or VSCode

Imported from the docs to keep them in one place.
This commit is contained in:
Earl Warren 2024-07-16 17:18:49 +02:00
parent df22f8da5f
commit 5fc3916fff
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00

View file

@ -105,3 +105,15 @@ Although the main goal of e2e is assertion testing, we have added a framework fo
VISUAL_TEST=1 will create screenshots in tests/e2e/test-snapshots. The test will fail the first time this is enabled (until we get visual test image persistence figured out), because it will be testing against an empty screenshot folder. VISUAL_TEST=1 will create screenshots in tests/e2e/test-snapshots. The test will fail the first time this is enabled (until we get visual test image persistence figured out), because it will be testing against an empty screenshot folder.
ACCEPT_VISUAL=1 will overwrite the snapshot images with new images. ACCEPT_VISUAL=1 will overwrite the snapshot images with new images.
## With VSCodium or VSCode
To debug a test, you can use "Playwright Test" for
[VScodium](https://open-vsx.org/extension/ms-playwright/playwright)
or [VSCode](https://marketplace.visualstudio.com/items?itemName=ms-playwright.playwright).
Before doing that you will need to manually start a Forgejo instance and populate it
with data from `models/fixtures` by running:
```sh
make TAGS='sqlite sqlite_unlock_notify' 'test-e2e-debugserver'
```