2021-12-17 12:05:14 +00:00
|
|
|
/* eslint-disable filenames/match-exported */
|
|
|
|
import { PlaywrightTestConfig } from '@playwright/test';
|
|
|
|
const config: PlaywrightTestConfig = {
|
2022-10-11 08:56:12 +00:00
|
|
|
projects: [
|
|
|
|
{
|
2023-08-11 08:22:01 +00:00
|
|
|
// Run all tests, runs only on Release PR test workflow
|
2022-10-11 08:56:12 +00:00
|
|
|
name: 'Default',
|
2023-08-11 08:22:01 +00:00
|
|
|
testMatch: /prerelease\/.*.test.ts/,
|
2022-10-11 08:56:12 +00:00
|
|
|
retries: 0,
|
|
|
|
},
|
|
|
|
{
|
2023-08-11 08:22:01 +00:00
|
|
|
// High-confidence smoke/sanity checks, runs on non-release PR test workflow
|
2022-10-11 08:56:12 +00:00
|
|
|
name: 'Smoke',
|
|
|
|
testMatch: /smoke\/.*.test.ts/,
|
|
|
|
retries: 0,
|
|
|
|
},
|
2023-08-11 08:22:01 +00:00
|
|
|
{
|
|
|
|
// Single critical path test, runs on release recurring
|
|
|
|
name: 'Critical',
|
|
|
|
testMatch: /critical\/.*.test.ts/,
|
|
|
|
retries: 0,
|
|
|
|
},
|
2022-10-11 08:56:12 +00:00
|
|
|
],
|
2021-12-17 12:05:14 +00:00
|
|
|
webServer: {
|
|
|
|
command: 'npm run serve',
|
2022-03-18 09:57:12 +00:00
|
|
|
url: 'http://127.0.0.1:4010',
|
2021-12-17 12:05:14 +00:00
|
|
|
timeout: 120 * 1000,
|
|
|
|
reuseExistingServer: !process.env.CI,
|
|
|
|
},
|
2022-02-10 13:48:32 +00:00
|
|
|
use: {
|
|
|
|
trace: {
|
|
|
|
mode: 'retain-on-failure',
|
|
|
|
screenshots: true,
|
|
|
|
snapshots: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
reporter: process.env.CI ? 'github' : 'list',
|
2021-12-17 12:05:14 +00:00
|
|
|
timeout: process.env.CI ? 60 * 1000 : 20 * 1000,
|
|
|
|
forbidOnly: !!process.env.CI,
|
2023-08-10 15:53:18 +00:00
|
|
|
outputDir: 'traces',
|
2021-12-17 12:05:14 +00:00
|
|
|
testDir: 'tests',
|
2022-02-17 17:27:29 +00:00
|
|
|
expect: {
|
|
|
|
timeout: process.env.CI ? 25 * 1000 : 10 * 1000,
|
|
|
|
},
|
2023-01-18 11:14:01 +00:00
|
|
|
workers: 1,
|
2021-12-17 12:05:14 +00:00
|
|
|
};
|
|
|
|
export default config;
|