26 lines
706 B
JavaScript
26 lines
706 B
JavaScript
// @ts-check
|
|
const { defineConfig } = require('@playwright/test');
|
|
|
|
const port = process.env.PW_PORT || '4197';
|
|
|
|
module.exports = defineConfig({
|
|
testDir: '.',
|
|
testMatch: /acceptance\.spec\.js$/,
|
|
timeout: 30_000,
|
|
fullyParallel: false,
|
|
reporter: [['list'], ['json', { outputFile: 'artifacts/playwright-results.json' }]],
|
|
use: {
|
|
baseURL: process.env.BASE_URL || `http://127.0.0.1:${port}`,
|
|
headless: true,
|
|
trace: 'retain-on-failure',
|
|
screenshot: 'only-on-failure',
|
|
video: 'off',
|
|
},
|
|
webServer: process.env.BASE_URL ? undefined : {
|
|
command: `PORT=${port} node server.js`,
|
|
url: `http://127.0.0.1:${port}`,
|
|
reuseExistingServer: false,
|
|
timeout: 10_000,
|
|
},
|
|
});
|