diff --git a/.github/workflows/wc-e2e-test.yaml b/.github/workflows/wc-e2e-test.yaml index 93e7324..1cd2884 100644 --- a/.github/workflows/wc-e2e-test.yaml +++ b/.github/workflows/wc-e2e-test.yaml @@ -26,6 +26,8 @@ jobs: run: | cd frontend/webcomponent npm run test:e2e + env: + RUN_MODE: CI - name: Clean up if: always() uses: ./.github/actions/cleanup diff --git a/frontend/webcomponent/playwright.config.ts b/frontend/webcomponent/playwright.config.ts index e19b186..6b8ca54 100644 --- a/frontend/webcomponent/playwright.config.ts +++ b/frontend/webcomponent/playwright.config.ts @@ -1,5 +1,6 @@ // playwright.config.ts import { defineConfig } from '@playwright/test'; +import { RUN_MODE } from './tests/config'; export default defineConfig({ testDir: './tests/e2e', @@ -8,7 +9,7 @@ export default defineConfig({ workers: 1, fullyParallel: false, use: { - headless: false, + headless: RUN_MODE === 'CI', viewport: { width: 1280, height: 720 }, ignoreHTTPSErrors: true, permissions: ['camera', 'microphone'], diff --git a/frontend/webcomponent/tests/config.ts b/frontend/webcomponent/tests/config.ts index c1c2cd3..fcd1571 100644 --- a/frontend/webcomponent/tests/config.ts +++ b/frontend/webcomponent/tests/config.ts @@ -1 +1,2 @@ -export const WEBCOMPONENT_ROOM_URL = 'http://localhost:5080/'; \ No newline at end of file +export const WEBCOMPONENT_ROOM_URL = 'http://localhost:5080/'; +export const RUN_MODE = process.env['RUN_MODE'] || 'development'; \ No newline at end of file