Skip to content

Commit 5a40c8e

Browse files
committed
rewrite Playwright visual regression tests
Rewrite canvas snapshot tests for the new demo UI. Split the single monolithic test into 8 focused tests: default render, zoom, resize, rotation (180/90/120), border radius, and exported image. Also test that getImageScaledToCanvas produces a clean image without color overlay (#420). Add Playwright to CI pipeline.
1 parent 4b12bd9 commit 5a40c8e

16 files changed

Lines changed: 80 additions & 8 deletions

.github/workflows/test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,9 @@ jobs:
4949

5050
- name: Unit tests (lib)
5151
run: pnpm --filter react-avatar-editor test
52+
53+
- name: Install Playwright browsers
54+
run: pnpm --filter react-avatar-editor exec playwright install --with-deps chromium
55+
56+
- name: Visual regression tests
57+
run: pnpm --filter react-avatar-editor exec playwright test
-96.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
118 KB
Loading
232 KB
Loading
125 KB
Loading

0 commit comments

Comments
 (0)