This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import { defineConfig, devices } from '@playwright/test';
|
||||
|
||||
const realStackBaseURL = process.env.PULSE_E2E_REAL_BASE_URL;
|
||||
const localWebPort = process.env.PULSE_E2E_WEB_PORT || '4173';
|
||||
const localBaseURL = `http://127.0.0.1:${localWebPort}`;
|
||||
|
||||
export default defineConfig({
|
||||
testDir: './tests/e2e',
|
||||
outputDir: '../../test-results/playwright',
|
||||
reporter: [['list'], ['html', { outputFolder: '../../playwright-report', open: 'never' }]],
|
||||
timeout: 30_000,
|
||||
expect: { timeout: 5_000 },
|
||||
fullyParallel: true,
|
||||
forbidOnly: Boolean(process.env.CI),
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
use: {
|
||||
baseURL: realStackBaseURL || localBaseURL,
|
||||
trace: 'retain-on-failure',
|
||||
screenshot: 'only-on-failure',
|
||||
},
|
||||
webServer: realStackBaseURL ? undefined : {
|
||||
command: `pnpm dev --host 127.0.0.1 --port ${localWebPort} --strictPort`,
|
||||
url: `${localBaseURL}/healthz`,
|
||||
reuseExistingServer: false,
|
||||
timeout: 120_000,
|
||||
},
|
||||
projects: [
|
||||
{ name: 'desktop-chromium', use: { ...devices['Desktop Chrome'], viewport: { width: 1440, height: 900 } } },
|
||||
{ name: 'tablet-chromium', use: { ...devices['Desktop Chrome'], viewport: { width: 1024, height: 768 } } },
|
||||
{ name: 'mobile-chromium', use: { ...devices['Pixel 7'], viewport: { width: 390, height: 844 } } },
|
||||
{ name: 'wallboard-chromium', use: { ...devices['Desktop Chrome'], viewport: { width: 1920, height: 1080 } } },
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user