-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathplaywright-ct.config.mts
More file actions
38 lines (33 loc) · 1006 Bytes
/
playwright-ct.config.mts
File metadata and controls
38 lines (33 loc) · 1006 Bytes
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
import { defineConfig, devices } from '@playwright/experimental-ct-react';
import tsconfigPaths from 'vite-tsconfig-paths';
import viteConfig from './vite.config';
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
forbidOnly: !!process.env.CI,
fullyParallel: true,
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
reporter: 'html',
retries: process.env.CI ? 2 : 0,
snapshotDir: './__snapshots__',
testDir: './',
testMatch: '**/*.ct.spec.tsx',
timeout: 10 * 1000,
use: {
ctPort: 3100,
ctViteConfig: {
// @ts-expect-error The playwright-ct references vite of version 4.5.1, and the plugin is for vite 5.
plugins: [tsconfigPaths()],
// @ts-expect-error The playwright-ct references vite of version 4.5.1 and config resolves is for version 5.
resolve: viteConfig.resolve,
},
trace: 'on-first-retry',
},
workers: process.env.CI ? 1 : undefined,
});