diff --git a/.github/workflows/end-to-end-tests.yaml b/.github/workflows/end-to-end-tests.yaml index a3108b292f..40c9666902 100644 --- a/.github/workflows/end-to-end-tests.yaml +++ b/.github/workflows/end-to-end-tests.yaml @@ -128,15 +128,10 @@ jobs: - name: Install Playwright browsers if: steps.playwright-cache.outputs.cache-hit != 'true' - run: yarn playwright install --with-deps + run: yarn playwright install --with-deps --no-shell chromium - name: Run Playwright tests - uses: coactions/setup-xvfb@6b00cf1889f4e1d5a48635647013c0508128ee1a - timeout-minutes: 30 - with: - run: "yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }}" - env: - HEADED: 1 + run: yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }} - name: Upload blob report to GitHub Actions Artifacts if: always() diff --git a/playwright.config.ts b/playwright.config.ts index bd0bf8d539..06c1b05322 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -6,11 +6,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only Please see LICENSE files in the repository root for full details. */ -import { defineConfig } from "@playwright/test"; +import { defineConfig, devices } from "@playwright/test"; const baseURL = process.env["BASE_URL"] ?? "http://localhost:8080"; export default defineConfig({ + projects: [{ name: "Chrome", use: { ...devices["Desktop Chrome"], channel: "chromium" } }], use: { viewport: { width: 1280, height: 720 }, ignoreHTTPSErrors: true, @@ -21,7 +22,6 @@ export default defineConfig({ args: ["--use-fake-ui-for-media-stream", "--use-fake-device-for-media-stream", "--mute-audio"], }, trace: "on-first-retry", - headless: !!process.env.HEADED, }, webServer: { command: process.env.CI ? "npx serve -p 8080 -L ./webapp" : "yarn start", diff --git a/playwright/Dockerfile b/playwright/Dockerfile index e5cea391e3..2b30c416f7 100644 --- a/playwright/Dockerfile +++ b/playwright/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/playwright:v1.49.0-jammy WORKDIR /work # fonts-dejavu is needed for the same RTL rendering as on CI -RUN apt-get update && apt-get -y install docker.io fonts-dejavu xvfb +RUN apt-get update && apt-get -y install docker.io fonts-dejavu COPY docker-entrypoint.sh /opt/docker-entrypoint.sh ENTRYPOINT ["bash", "/opt/docker-entrypoint.sh"] diff --git a/playwright/docker-entrypoint.sh b/playwright/docker-entrypoint.sh index 51161297a3..241528a29a 100644 --- a/playwright/docker-entrypoint.sh +++ b/playwright/docker-entrypoint.sh @@ -2,4 +2,4 @@ set -e -HEADED=1 xvfb-run npx playwright test --update-snapshots --reporter line $@ +npx playwright test --update-snapshots --reporter line $@