|
|
@ -1,4 +1,4 @@ |
|
|
|
import { defineConfig, devices } from '@playwright/test'; |
|
|
|
import { defineConfig, devices } from "@playwright/test"; |
|
|
|
|
|
|
|
/** |
|
|
|
* Read environment variables from file. |
|
|
@ -11,7 +11,7 @@ import { defineConfig, devices } from '@playwright/test'; |
|
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
|
|
*/ |
|
|
|
export default defineConfig({ |
|
|
|
testDir: './test-playwright', |
|
|
|
testDir: "./test-playwright", |
|
|
|
/* Run tests in files in parallel */ |
|
|
|
fullyParallel: true, |
|
|
|
/* 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. */ |
|
|
|
workers: process.env.CI ? 1 : undefined, |
|
|
|
/* 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. */ |
|
|
|
use: { |
|
|
|
/* 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 */ |
|
|
|
trace: 'on-first-retry', |
|
|
|
trace: "on-first-retry", |
|
|
|
}, |
|
|
|
|
|
|
|
/* Configure projects for major browsers */ |
|
|
|
projects: [ |
|
|
|
{ |
|
|
|
name: 'chromium', |
|
|
|
name: "chromium", |
|
|
|
use: { |
|
|
|
...devices['Desktop Chrome'], |
|
|
|
...devices["Desktop Chrome"], |
|
|
|
permissions: ["clipboard-read"], |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
name: 'firefox', |
|
|
|
use: { ...devices['Desktop Firefox'] }, |
|
|
|
name: "firefox", |
|
|
|
use: { ...devices["Desktop Firefox"] }, |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
name: 'webkit', |
|
|
|
use: { ...devices['Desktop Safari'] }, |
|
|
|
name: "webkit", |
|
|
|
use: { ...devices["Desktop Safari"] }, |
|
|
|
}, |
|
|
|
|
|
|
|
/* Test against mobile viewports. */ |
|
|
|
{ |
|
|
|
name: 'Mobile Chrome', |
|
|
|
use: { ...devices['Pixel 5'] }, |
|
|
|
name: "Mobile Chrome", |
|
|
|
use: { ...devices["Pixel 5"] }, |
|
|
|
}, |
|
|
|
{ |
|
|
|
name: 'Mobile Safari', |
|
|
|
use: { ...devices['iPhone 12'] }, |
|
|
|
name: "Mobile Safari", |
|
|
|
use: { ...devices["iPhone 12"] }, |
|
|
|
}, |
|
|
|
|
|
|
|
/* Test against branded browsers. */ |
|
|
@ -67,8 +67,8 @@ export default defineConfig({ |
|
|
|
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
name: 'Google Chrome', |
|
|
|
use: { ...devices['Desktop Chrome'], channel: 'chrome' }, |
|
|
|
name: "Google Chrome", |
|
|
|
use: { ...devices["Desktop Chrome"], channel: "chrome" }, |
|
|
|
}, |
|
|
|
], |
|
|
|
|
|
|
|