forked from bigcommerce/checkout-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
49 lines (48 loc) · 1.52 KB
/
playwright.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import 'dotenv/config'
import { devices, PlaywrightTestConfig } from '@playwright/test';
/**
* See https://playwright.dev/docs/test-configuration.
* All timeout settings are default values now. 14/04/2022
*/
const config: PlaywrightTestConfig = {
webServer: {
command: 'http-server dist --port=' + process.env.PORT,
port: Number(process.env.PORT),
timeout: 3 * 1000,
},
timeout: 60 * 1000,
expect: {
// timeout: 25 * 1000,
},
testDir: './tests/',
testIgnore: './tests/sampleTests/**',
outputDir: 'tests/screenshots',
fullyParallel: true,
/* TODO: Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* TODO: Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* TODO: Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
// reporter: 'line',
reporter: [ ['html', { outputFolder: './tests/report' }] ],
// Shared settings for all the projects below.
use: {
baseURL: 'http://localhost:' + process.env.PORT,
screenshot: 'only-on-failure',
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
// actionTimeout: 30 * 1000,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
};
export default config;