Skip to content

Commit

Permalink
Try running tests with xvfb
Browse files Browse the repository at this point in the history
  • Loading branch information
w0rm committed Apr 1, 2024
1 parent 1db868a commit 4f90b7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,17 @@ jobs:
lfs: "true"
- uses: actions/setup-node@v4
with:
node-version: "18"
node-version: "20"
- run: npm ci
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- run: npx playwright install-deps
if: steps.playwright-cache.outputs.cache-hit == 'true'
- run: npx elm make TestApp.elm --output=TestApp.html
- run: npx playwright test --project=${{ matrix.project }}
- uses: coactions/setup-xvfb@v1
with:
run: npx playwright test --project=${{ matrix.project }}
working-directory: ./testing
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
5 changes: 1 addition & 4 deletions testing/snapshots.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ for (let i = 0; i < testCases.length; i++) {
test(`Snapshot ${number}`, async ({ page }) => {
await page.goto(`/TestApp.html?test_case=${number}`);
await expect(page.getByTestId("scene")).toHaveScreenshot(
`${number}-${name}.png`,
{
timeout: 10 * 1000, // 10 seconds for a page
}
`${number}-${name}.png`
);
});
}

0 comments on commit 4f90b7f

Please sign in to comment.