test: update Playwright configuration to utilize RUN_MODE for headless setting in E2E tests
This commit is contained in:
parent
21452955bd
commit
cba1a0938c
2
.github/workflows/wc-e2e-test.yaml
vendored
2
.github/workflows/wc-e2e-test.yaml
vendored
@ -26,6 +26,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cd frontend/webcomponent
|
cd frontend/webcomponent
|
||||||
npm run test:e2e
|
npm run test:e2e
|
||||||
|
env:
|
||||||
|
RUN_MODE: CI
|
||||||
- name: Clean up
|
- name: Clean up
|
||||||
if: always()
|
if: always()
|
||||||
uses: ./.github/actions/cleanup
|
uses: ./.github/actions/cleanup
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
// playwright.config.ts
|
// playwright.config.ts
|
||||||
import { defineConfig } from '@playwright/test';
|
import { defineConfig } from '@playwright/test';
|
||||||
|
import { RUN_MODE } from './tests/config';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: './tests/e2e',
|
testDir: './tests/e2e',
|
||||||
@ -8,7 +9,7 @@ export default defineConfig({
|
|||||||
workers: 1,
|
workers: 1,
|
||||||
fullyParallel: false,
|
fullyParallel: false,
|
||||||
use: {
|
use: {
|
||||||
headless: false,
|
headless: RUN_MODE === 'CI',
|
||||||
viewport: { width: 1280, height: 720 },
|
viewport: { width: 1280, height: 720 },
|
||||||
ignoreHTTPSErrors: true,
|
ignoreHTTPSErrors: true,
|
||||||
permissions: ['camera', 'microphone'],
|
permissions: ['camera', 'microphone'],
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
export const WEBCOMPONENT_ROOM_URL = 'http://localhost:5080/';
|
export const WEBCOMPONENT_ROOM_URL = 'http://localhost:5080/';
|
||||||
|
export const RUN_MODE = process.env['RUN_MODE'] || 'development';
|
||||||
Loading…
x
Reference in New Issue
Block a user