51 lines
1.3 KiB
TypeScript
51 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
timeout: 30000,
|
|
expect: { timeout: 5000 },
|
|
|
|
/* Run tests in files in parallel */
|
|
fullyParallel: true,
|
|
|
|
/* Retry once on CI to reduce flakiness from cold-start */
|
|
retries: process.env.CI ? 1 : 0,
|
|
|
|
/* Limit concurrency so the dev server isn't overwhelmed */
|
|
workers: process.env.CI ? 2 : 4,
|
|
|
|
/* Reporters: dot in CI, list + HTML locally */
|
|
reporter: process.env.CI
|
|
? [['dot'], ['json', { outputFile: 'test-results/playwright-results.json' }]]
|
|
: [['list'], ['html', { outputFolder: 'playwright-report', open: 'never' }]],
|
|
|
|
use: {
|
|
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://skinbase26.test',
|
|
headless: true,
|
|
viewport: { width: 1280, height: 720 },
|
|
ignoreHTTPSErrors: true,
|
|
|
|
/* Capture trace, screenshot and video only on failure */
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'off',
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { ...devices['Desktop Chrome'] },
|
|
},
|
|
/* Uncomment to add Firefox/WebKit coverage:
|
|
{
|
|
name: 'firefox',
|
|
use: { ...devices['Desktop Firefox'] },
|
|
},
|
|
{
|
|
name: 'webkit',
|
|
use: { ...devices['Desktop Safari'] },
|
|
},
|
|
*/
|
|
],
|
|
});
|