|
@ -1,4 +1,4 @@ |
|
|
import { defineConfig, devices } from '@playwright/test'; |
|
|
import { defineConfig, devices } from "@playwright/test"; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Read environment variables from file. |
|
|
* Read environment variables from file. |
|
@ -11,7 +11,7 @@ import { defineConfig, devices } from '@playwright/test'; |
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
|
*/ |
|
|
*/ |
|
|
export default defineConfig({ |
|
|
export default defineConfig({ |
|
|
testDir: './test-playwright', |
|
|
testDir: "./test-playwright", |
|
|
/* Run tests in files in parallel */ |
|
|
/* Run tests in files in parallel */ |
|
|
fullyParallel: true, |
|
|
fullyParallel: true, |
|
|
/* Fail the build on CI if you accidentally left test.only in the source code. */ |
|
|
/* Fail the build on CI if you accidentally left test.only in the source code. */ |
|
@ -21,44 +21,44 @@ export default defineConfig({ |
|
|
/* Opt out of parallel tests on CI. */ |
|
|
/* Opt out of parallel tests on CI. */ |
|
|
workers: process.env.CI ? 1 : undefined, |
|
|
workers: process.env.CI ? 1 : undefined, |
|
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ |
|
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */ |
|
|
reporter: 'html', |
|
|
reporter: "html", |
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ |
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ |
|
|
use: { |
|
|
use: { |
|
|
/* Base URL to use in actions like `await page.goto('/')`. */ |
|
|
/* Base URL to use in actions like `await page.goto('/')`. */ |
|
|
baseURL: 'http://localhost:8080', |
|
|
baseURL: "http://localhost:8080", |
|
|
|
|
|
|
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ |
|
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ |
|
|
trace: 'on-first-retry', |
|
|
trace: "on-first-retry", |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/* Configure projects for major browsers */ |
|
|
/* Configure projects for major browsers */ |
|
|
projects: [ |
|
|
projects: [ |
|
|
{ |
|
|
{ |
|
|
name: 'chromium', |
|
|
name: "chromium", |
|
|
use: { |
|
|
use: { |
|
|
...devices['Desktop Chrome'], |
|
|
...devices["Desktop Chrome"], |
|
|
permissions: ["clipboard-read"], |
|
|
permissions: ["clipboard-read"], |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
name: 'firefox', |
|
|
name: "firefox", |
|
|
use: { ...devices['Desktop Firefox'] }, |
|
|
use: { ...devices["Desktop Firefox"] }, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
name: 'webkit', |
|
|
name: "webkit", |
|
|
use: { ...devices['Desktop Safari'] }, |
|
|
use: { ...devices["Desktop Safari"] }, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/* Test against mobile viewports. */ |
|
|
/* Test against mobile viewports. */ |
|
|
{ |
|
|
{ |
|
|
name: 'Mobile Chrome', |
|
|
name: "Mobile Chrome", |
|
|
use: { ...devices['Pixel 5'] }, |
|
|
use: { ...devices["Pixel 5"] }, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: 'Mobile Safari', |
|
|
name: "Mobile Safari", |
|
|
use: { ...devices['iPhone 12'] }, |
|
|
use: { ...devices["iPhone 12"] }, |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/* Test against branded browsers. */ |
|
|
/* Test against branded browsers. */ |
|
@ -67,8 +67,8 @@ export default defineConfig({ |
|
|
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
|
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
|
// },
|
|
|
// },
|
|
|
{ |
|
|
{ |
|
|
name: 'Google Chrome', |
|
|
name: "Google Chrome", |
|
|
use: { ...devices['Desktop Chrome'], channel: 'chrome' }, |
|
|
use: { ...devices["Desktop Chrome"], channel: "chrome" }, |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|