playwright: Increase timeouts
Increase playwright timeout both globally and for individual actions to reduce test flakiness
This commit is contained in:
parent
a50b6bdfae
commit
34fdd8f0ea
1 changed files with 14 additions and 6 deletions
|
|
@ -1,10 +1,11 @@
|
|||
import { defineConfig, devices, type ReporterDescription } from '@playwright/test';
|
||||
import {
|
||||
defineConfig,
|
||||
devices,
|
||||
type ReporterDescription,
|
||||
} from '@playwright/test';
|
||||
import 'dotenv/config';
|
||||
|
||||
const reporters: ReporterDescription[] = [
|
||||
['html'],
|
||||
['list'],
|
||||
];
|
||||
const reporters: ReporterDescription[] = [['html'], ['list']];
|
||||
|
||||
if (process.env.CURRENTS_PROJECT_ID && process.env.CURRENTS_RECORD_KEY) {
|
||||
reporters.push(['@currents/playwright']);
|
||||
|
|
@ -17,9 +18,16 @@ export default defineConfig({
|
|||
forbidOnly: !!process.env.CI,
|
||||
retries: process.env.CI ? 1 : 0,
|
||||
reporter: reporters,
|
||||
globalTimeout: 29.5 * 60 * 1000, // 29.5m, Set because of codebuild, we want PW to timeout before CB to get the results.
|
||||
timeout: 3 * 60 * 1000, // 3m
|
||||
expect: { timeout: 30_000 }, // 30s
|
||||
use: {
|
||||
actionTimeout: 30_000, // 30s
|
||||
navigationTimeout: 30_000, // 30s
|
||||
headless: true,
|
||||
baseURL: process.env.BASE_URL ? process.env.BASE_URL : 'http://127.0.0.1:9090',
|
||||
baseURL: process.env.BASE_URL
|
||||
? process.env.BASE_URL
|
||||
: 'http://127.0.0.1:9090',
|
||||
video: 'retain-on-failure',
|
||||
trace: 'on-first-retry',
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue