69 lines
1.7 KiB
JavaScript
69 lines
1.7 KiB
JavaScript
// @ts-check
|
|
const { defineConfig, devices } = require('@playwright/test');
|
|
|
|
/**
|
|
* UAT Suite Configuration for ModPulse
|
|
* Keep browser runs deterministic and low-footprint by default. Override workers
|
|
* explicitly when running against isolated test data with spare capacity.
|
|
*/
|
|
module.exports = defineConfig({
|
|
testDir: './uat',
|
|
outputDir: process.env.PLAYWRIGHT_OUTPUT_DIR || './test-results',
|
|
|
|
/* Run tests in files in parallel */
|
|
fullyParallel: true,
|
|
|
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
/* No retries for lightning fast failures/success */
|
|
retries: 0,
|
|
|
|
workers: Number(process.env.PLAYWRIGHT_WORKERS || 1),
|
|
|
|
/* Lean output */
|
|
reporter: 'dot',
|
|
|
|
/* Shared settings for all projects */
|
|
use: {
|
|
baseURL: process.env.BASE_URL || 'http://localhost:5000',
|
|
|
|
/* Turn off traces, videos, and screenshots during normal runs to save disk I/O and memory */
|
|
trace: 'off',
|
|
screenshot: 'off',
|
|
video: 'off',
|
|
|
|
/* Tightened timeouts for speed */
|
|
actionTimeout: 10000,
|
|
navigationTimeout: 15000,
|
|
expect: { timeout: 5000 },
|
|
|
|
viewport: { width: 1280, height: 720 },
|
|
|
|
headless: true,
|
|
contextOptions: {
|
|
reducedMotion: 'reduce',
|
|
strictSelectors: false,
|
|
},
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
launchOptions: {
|
|
args: [
|
|
'--disable-dev-shm-usage',
|
|
'--disable-accelerated-2d-canvas',
|
|
'--no-sandbox',
|
|
'--disable-setuid-sandbox',
|
|
'--disable-gpu'
|
|
],
|
|
...(process.env.CHROMIUM_PATH ? { executablePath: process.env.CHROMIUM_PATH } : {})
|
|
},
|
|
},
|
|
},
|
|
],
|
|
});
|