You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -752,6 +752,23 @@ pnpm test:browser:ui # Run with Playwright UI
752
752
753
753
Make sure to read about [Playwright best practices](https://playwright.dev/docs/best-practices) and don't rely on classes/IDs but try to follow user-replicable behaviour (like selecting an element based on text content instead).
754
754
755
+
#### Updating snapshots
756
+
757
+
Some tests use image snapshots that must match the CI environment (Linux). If you need to update them, use Docker to run in the same environment:
758
+
759
+
```bash
760
+
docker run --rm \
761
+
-e CI=true \
762
+
-e NODE_OPTIONS="--max-old-space-size=4096" \
763
+
-v $(pwd):/work \
764
+
-w /work \
765
+
mcr.microsoft.com/playwright:v1.58.2-noble \
766
+
sh -c "npm install -g pnpm && pnpm install && pnpm vp run build:test && pnpm vp run test:browser:prebuilt --update-snapshots"
767
+
```
768
+
769
+
> [!NOTE]
770
+
> If the build runs out of memory, increase `--max-old-space-size` to `8192`.
771
+
755
772
### Test fixtures (mocking external APIs)
756
773
757
774
E2E tests use a fixture system to mock external API requests, ensuring tests are deterministic and don't hit real APIs. This is handled at two levels:
0 commit comments