PluginProbe
Hello Plus / trunk
Hello Plus vtrunk
trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.3.0 1.4.0 1.4.1 1.5.0 1.5.1 1.5.2 1.5.3 1.6.0 1.6.1 1.6.2 1.7.0 1.7.1 1.7.2 1.7.3 All 30 releases
hello-plus / tests / playwright / playwright.config.ts

playwright.config.ts in Hello Plus trunk, at tests/playwright/playwright.config.ts

48 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { resolve } from 'path';
2 import { defineConfig } from '@playwright/test';
3 import { config as _config } from 'dotenv';
4 import { timeouts } from './config/timeouts';
5
6 process.env.DEV_SERVER = 'http://localhost:8888';
7 process.env.TEST_SERVER = 'http://localhost:8889';
8 process.env.DEBUG_PORT = ( 1 === Number( process.env.TEST_PARALLEL_INDEX ) ) ? '9223' : '9222';
9
10 _config( {
11 path: resolve( __dirname, '../../.env' ),
12 } );
13
14 export default defineConfig( {
15 testDir: './tests',
16 timeout: timeouts.singleTest,
17 globalTimeout: timeouts.global,
18 expect: {
19 timeout: timeouts.expect,
20 toMatchSnapshot: { maxDiffPixelRatio: 0.03 },
21 toHaveScreenshot: { maxDiffPixelRatio: 0.03 },
22 },
23 forbidOnly: !! process.env.CI,
24 retries: process.env.CI ? 5 : 0,
25 workers: process.env.CI ? 2 : 1,
26 fullyParallel: false,
27 reporter: process.env.CI
28 ? [ [ 'github' ], [ 'list' ] ]
29 : [ [ 'list' ] ],
30 use: {
31 launchOptions: {
32 args: [ `--remote-debugging-port=${ process.env.DEBUG_PORT }` ],
33 },
34 headless: !! process.env.CI,
35 ignoreHTTPSErrors: true,
36 actionTimeout: process.env.CI ? 30000 : 25000,
37 navigationTimeout: process.env.CI ? 45000 : 25000,
38 trace: 'retain-on-failure',
39 video: process.env.CI ? 'retain-on-failure' : 'off',
40 baseURL: process.env.BASE_URL ||
41 ( ( 1 === Number( process.env.TEST_PARALLEL_INDEX ) )
42 ? process.env.TEST_SERVER
43 : process.env.DEV_SERVER ),
44 viewport: { width: 1920, height: 1080 },
45 storageState: `./storageState-${ process.env.TEST_PARALLEL_INDEX }.json`,
46 },
47 } );
48