Skip to content

Commit 26363ca

Browse files
committed
Add test screenshots
1 parent 316b81a commit 26363ca

12 files changed

+10
-6
lines changed

.github/workflows/playwright.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@ jobs:
1515
node-version: lts/*
1616
- name: Install dependencies
1717
run: npm ci
18+
1819
- name: Install Playwright Browsers
1920
run: npx playwright install --with-deps
21+
2022
- name: Run Playwright tests
2123
run: npx playwright test
22-
- uses: actions/upload-artifact@v4
23-
if: ${{ !cancelled() }}
24+
25+
- name: Upload failed screenshots
26+
if: failure()
27+
uses: actions/upload-artifact@v4
2428
with:
25-
name: playwright-report
26-
path: playwright-report/
29+
name: failed-snapshots
30+
path: test-results/
2731
retention-days: 30

tests/e2e/NewOrgModal.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ test.describe("without being signed in", () => {
1414
test("can *NOT* see the 'New Org' button", async ({ page, isMobile }) => {
1515
const response = await page.goto("http://localhost:1234");
1616
expect(response?.status()).toBeLessThan(400);
17-
await expect(page).toHaveScreenshot({ maxDiffPixels: 100 });
17+
await expect(page).toHaveScreenshot("no-new-org-button.png");
1818

1919
if (isMobile) {
2020
await expect(
@@ -36,7 +36,7 @@ test.describe("while being signed in", () => {
3636
test("can see the 'New Org' button", async ({ page, isMobile }) => {
3737
const response = await page.goto("http://localhost:1234");
3838
expect(response?.status()).toBeLessThan(400);
39-
await expect(page).toHaveScreenshot({ maxDiffPixels: 100 });
39+
await expect(page).toHaveScreenshot("new-org-button.png");
4040

4141
if (isMobile) {
4242
await expect(
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)