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 fcbd21a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ 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
- uses: coactions/setup-xvfb@v1
- run: npx playwright test --project=${{ matrix.project }}
- uses: actions/upload-artifact@v4
if: always()
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 fcbd21a

Please sign in to comment.