generated from Kentico/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathplaywright-ct.config.ts
51 lines (49 loc) · 1.32 KB
/
playwright-ct.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
50
51
import { defineConfig, devices } from '@playwright/experimental-ct-react';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './test-components/tests',
snapshotDir: './test-components/__snapshots__',
snapshotPathTemplate: '{snapshotDir}/{testFilePath}/{arg}-{projectName}{ext}',
timeout: 60 * 1000,
expect: {
timeout: 10000,
toHaveScreenshot: {
animations: 'disabled',
scale: 'css',
maxDiffPixels: 20,
threshold: 0.2,
},
},
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
retries: 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
trace: 'on-first-retry',
ctPort: 3100,
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
viewport: { width: 1366, height: 768 },
},
},
// {
// name: 'firefox',
// use: { ...devices['Desktop Firefox'] },
// },
// {
// name: 'webkit',
// use: { ...devices['Desktop Safari'] },
// },
],
});