diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 808c53f..e1c8c64 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -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: diff --git a/testing/snapshots.spec.ts b/testing/snapshots.spec.ts index 836f646..b610d37 100644 --- a/testing/snapshots.spec.ts +++ b/testing/snapshots.spec.ts @@ -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` ); }); }