1
1
import { defineConfig , devices } from '@playwright/experimental-ct-vue'
2
2
3
+ /**
4
+ * See https://playwright.dev/docs/test-configuration.
5
+ */
3
6
export default defineConfig ( {
4
7
testDir : './' ,
5
- timeout : 15000 ,
8
+ /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
9
+ snapshotDir : './__snapshots__' ,
10
+ /* Maximum time one test can run for. */
11
+ timeout : 10 * 1000 ,
12
+ /* Run tests in files in parallel */
6
13
fullyParallel : true ,
14
+ /* Fail the build on CI if you accidentally left test.only in the source code. */
7
15
forbidOnly : ! ! process . env . CI ,
16
+ /* Retry on CI only */
17
+ retries : process . env . CI ? 2 : 0 ,
18
+ /* Opt out of parallel tests on CI. */
8
19
workers : process . env . CI ? 1 : undefined ,
9
- reporter : 'list' ,
20
+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
21
+ reporter : 'html' ,
22
+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
10
23
use : {
24
+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
25
+ trace : 'on-first-retry' ,
26
+
27
+ /* Port to use for Playwright component endpoint. */
11
28
ctPort : 3100 ,
12
29
} ,
30
+
31
+ /* Configure projects for major browsers */
13
32
projects : [
14
33
{
15
34
name : 'chromium' ,
@@ -24,4 +43,4 @@ export default defineConfig({
24
43
use : { ...devices [ 'Desktop Safari' ] } ,
25
44
} ,
26
45
] ,
27
- } )
46
+ } )
0 commit comments