2021-12-15 16:25:49 +00:00
|
|
|
import { PlaywrightTestConfig, devices } from "@playwright/test";
|
|
|
|
|
|
|
|
const config: PlaywrightTestConfig = {
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
testDir: "playwright",
|
|
|
|
timeout: 60_000,
|
|
|
|
retries: process.env.CI ? 3 : 0,
|
2021-12-17 16:58:23 +00:00
|
|
|
reporter: "list",
|
2021-12-15 16:25:49 +00:00
|
|
|
globalSetup: require.resolve("./playwright/lib/globalSetup"),
|
2022-01-07 20:23:37 +00:00
|
|
|
outputDir: "playwright/results",
|
2021-12-17 16:58:23 +00:00
|
|
|
webServer: {
|
|
|
|
command: "yarn start",
|
|
|
|
port: 3000,
|
|
|
|
timeout: 60_000,
|
|
|
|
reuseExistingServer: !process.env.CI,
|
|
|
|
},
|
2021-12-15 16:25:49 +00:00
|
|
|
use: {
|
|
|
|
baseURL: "http://localhost:3000",
|
|
|
|
locale: "en-US",
|
2021-12-17 16:58:23 +00:00
|
|
|
trace: "retain-on-failure",
|
2021-12-15 16:25:49 +00:00
|
|
|
headless: !!process.env.CI || !!process.env.PLAYWRIGHT_HEADLESS,
|
2021-12-17 16:58:23 +00:00
|
|
|
video: "on-first-retry",
|
2021-12-15 16:25:49 +00:00
|
|
|
contextOptions: {
|
|
|
|
recordVideo: {
|
|
|
|
dir: "playwright/videos",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: "chromium",
|
|
|
|
use: { ...devices["Desktop Chrome"] },
|
|
|
|
},
|
|
|
|
/* {
|
|
|
|
name: "firefox",
|
|
|
|
use: { ...devices["Desktop Firefox"] },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "webkit",
|
|
|
|
use: { ...devices["Desktop Safari"] },
|
|
|
|
}, */
|
|
|
|
],
|
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|