Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update playwright and node-js versions #473

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: npm

- name: Install dependencies
Expand Down
9 changes: 7 additions & 2 deletions docs/Testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,21 @@ npm run e2e
If the appearance of the GUI changes some tests might fail as the baseline for
visual comparison is no longer up to date. In this case it is required to update
the snapshots. The following commands updates the snapshots while ensuring a
similar environment than the one the CI runs in is used (ubuntu focal and UTC
similar environment than the one the CI runs in is used (Ubuntu 22.04 and UTC
time).

```sh
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.28.0-jammy /bin/bash
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.44.1-jammy /bin/bash
npm run e2e:install
npm run e2e:update
exit
```

Note that this method may not always work: it could happen that the generated
snapshots are incorrect and have slight differences (e.g. appears zoomed in/out,
etc). In that case, repeat the above steps but outside of the Docker environment,
and preferably on a machine that uses a similar OS/environment as the CI.

[build environment]: https://github.com/zonemaster/zonemaster/blob/master/docs/internal/distrib-testing/Ubuntu-Node.js-build-environment.md
[playwright]: https://playwright.dev/docs/intro

Expand Down
50 changes: 25 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build": "ng build --configuration production",
"release": "npm run build && node scripts/create_release.js",
"lint": "ng lint",
"e2e": "playwright test",
"e2e:update": "playwright test --update-snapshots",
"e2e": "playwright --version && playwright test",
"e2e:update": "playwright --version && playwright test --update-snapshots",
"e2e:install": "playwright install chromium",
"e2e:install-deps": "playwright install-deps chromium",
"e2e:test-server": "ng build --configuration=tests --localize && node scripts/test_server.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
"@angular/cli": "^13.3.9",
"@angular/compiler-cli": "^13.3.11",
"@angular/language-service": "^13.3.11",
"@playwright/test": "^1.41.2",
"@playwright/test": "^1.44.1",
"@types/file-saver": "^2.0.1",
"@types/node": "^13.11.0",
"archiver": "^3.1.1",
Expand Down
Loading