test: update Playwright configuration to utilize RUN_MODE for headless setting in E2E tests

This commit is contained in:
Carlos Santos 2025-05-13 13:55:24 +02:00
parent 21452955bd
commit cba1a0938c
3 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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'],

View File

@ -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';