From 002fc61d2758eb268c739a360a9654d1dc0025cf Mon Sep 17 00:00:00 2001 From: Jason Ojisan Date: Sun, 27 Oct 2024 13:05:48 -0700 Subject: [PATCH] Add local Playwright testing instructions to CONTRIBUTING.md * Add local Playwright testing instructions to CONTRIBUTING.md Signed-off-by: James Maa * Update CONTRIBUTING.md Signed-off-by: James Maa --------- Signed-off-by: James Maa ZjQ2MjI3OGFmMWY2MzQ1ZWRlYjcyNDg5ODU2NmRiMmU3YTA2YmY1Ngo= --- CONTRIBUTING.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3e5171897c..a0c0b930ca 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,6 +30,14 @@ Unit tests, integration tests, and various other tests can be executed by runnin Other individual tests can be looked up in the [package.json](package.json) file, and the source for specific tests can be found in the [test](test) directory +### Playwright + +Steps to run [playwright](https://playwright.dev/) tests locally: + +1. Run `npx playwright install` to install the headless browsers +2. Copy the dictionary test data located in the `dictionaries` branch to a directory named `dictionaries` via `git clone --branch dictionaries git@github.com:Ajatt-Tools/rikaitan.git dictionaries` ([source](https://github.com/Ajatt-Tools/rikaitan/blob/086e043856ad54cf13cb65f9ba4c63afe8a22cc3/.github/workflows/playwright.yml#L52-L57)). +3. Now you can run `npx playwright test`. The first run might produce some benign errors complaining about `Error: A snapshot doesn't exist at ...writing actual.`, but subsequent runs should succeed. + ## Building By default, the development repository is configured for Chrome, and the [ext](ext) directory can be directly