1- import { defineConfig , devices } from ' @playwright/test' ;
1+ import { defineConfig , devices } from " @playwright/test" ;
22
33/**
44 * Read environment variables from file.
@@ -12,68 +12,70 @@ import { defineConfig, devices } from '@playwright/test';
1212 * See https://playwright.dev/docs/test-configuration.
1313 */
1414export default defineConfig ( {
15- testDir : ' ./tests' ,
16- /* Run tests in files in parallel */
17- fullyParallel : true ,
18- /* Fail the build on CI if you accidentally left test.only in the source code. */
19- forbidOnly : ! ! process . env . CI ,
20- /* Retry on CI only */
21- retries : process . env . CI ? 2 : 0 ,
22- /* Opt out of parallel tests on CI. */
23- workers : process . env . CI ? 1 : undefined ,
24- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
25- reporter : ' html' ,
26- /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
27- use : {
28- /* Base URL to use in actions like `await page.goto('/')`. */
29- // baseURL: ' http://127.0.0.1:3000' ,
15+ testDir : " ./tests" ,
16+ /* Run tests in files in parallel */
17+ fullyParallel : true ,
18+ /* Fail the build on CI if you accidentally left test.only in the source code. */
19+ forbidOnly : ! ! process . env . CI ,
20+ /* Retry on CI only */
21+ retries : process . env . CI ? 2 : 0 ,
22+ /* Opt out of parallel tests on CI. */
23+ workers : process . env . CI ? 1 : undefined ,
24+ /* Reporter to use. See https://playwright.dev/docs/test-reporters */
25+ reporter : " html" ,
26+ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
27+ use : {
28+ /* Base URL to use in actions like `await page.goto('/')`. */
29+ baseURL : " http://127.0.0.1:8888" ,
3030
31- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
32- trace : 'on-first-retry' ,
33- } ,
31+ storageState : "tests-browser-state.json" ,
3432
35- /* Configure projects for major browsers */
36- projects : [
37- {
38- name : 'chromium' ,
39- use : { ...devices [ 'Desktop Chrome' ] } ,
33+ /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
34+ trace : "on-first-retry"
4035 } ,
4136
42- {
43- name : 'firefox' ,
44- use : { ...devices [ 'Desktop Firefox' ] } ,
45- } ,
37+ /* Configure projects for major browsers */
38+ projects : [
39+ {
40+ name : "chromium" ,
41+ use : { ...devices [ "Desktop Chrome" ] }
42+ } ,
4643
47- {
48- name : 'webkit' ,
49- use : { ...devices [ ' Desktop Safari' ] } ,
50- } ,
44+ {
45+ name : "firefox" ,
46+ use : { ...devices [ " Desktop Firefox" ] }
47+ } ,
5148
52- /* Test against mobile viewports. */
53- // {
54- // name: 'Mobile Chrome',
55- // use: { ...devices['Pixel 5'] },
56- // },
57- // {
58- // name: 'Mobile Safari',
59- // use: { ...devices['iPhone 12'] },
60- // },
49+ {
50+ name : "webkit" ,
51+ use : { ...devices [ "Desktop Safari" ] }
52+ }
6153
62- /* Test against branded browsers. */
63- // {
64- // name: 'Microsoft Edge',
65- // use: { ...devices['Desktop Edge'], channel: 'msedge' },
66- // },
67- // {
68- // name: 'Google Chrome',
69- // use: { ...devices['Desktop Chrome'], channel: 'chrome' },
70- // },
71- ] ,
54+ /* Test against mobile viewports. */
55+ // {
56+ // name: 'Mobile Chrome',
57+ // use: { ...devices['Pixel 5'] },
58+ // },
59+ // {
60+ // name: 'Mobile Safari',
61+ // use: { ...devices['iPhone 12'] },
62+ // },
7263
73- /* Run your local dev server before starting the tests */
74- // webServer: {
75- // command: 'npm run start',
76- // url: 'http://127.0.0.1:3000',
77- // reuseExistingServer: !process.env.CI,
78- // },
64+ /* Test against branded browsers. */
65+ // {
66+ // name: 'Microsoft Edge',
67+ // use: { ...devices['Desktop Edge'], channel: 'msedge' },
68+ // },
69+ // {
70+ // name: 'Google Chrome',
71+ // use: { ...devices['Desktop Chrome'], channel: 'chrome' },
72+ // },
73+ ]
74+
75+ /* Run your local dev server before starting the tests */
76+ // webServer: {
77+ // command: 'npm run start',
78+ // url: 'http://127.0.0.1:3000',
79+ // reuseExistingServer: !process.env.CI,
80+ // },
7981} ) ;
0 commit comments