2021-06-10 20:09:38 +07:00
|
|
|
import { PlaywrightTestConfig } from "@playwright/test"
|
|
|
|
|
|
|
|
import path from "path"
|
|
|
|
|
|
|
|
// Run tests in three browsers.
|
|
|
|
const config: PlaywrightTestConfig = {
|
|
|
|
testDir: path.join(__dirname, "e2e"), // Search for tests in this directory.
|
|
|
|
timeout: 60000, // Each test is given 60 seconds.
|
2021-06-23 04:34:44 +07:00
|
|
|
retries: process.env.CI ? 2 : 1, // Retry in CI due to flakiness.
|
2021-06-10 20:09:38 +07:00
|
|
|
globalSetup: require.resolve("./utils/globalSetup.ts"),
|
|
|
|
reporter: "list",
|
|
|
|
// Put any shared options on the top level.
|
|
|
|
use: {
|
|
|
|
headless: true, // Run tests in headless browsers.
|
2021-06-25 03:08:41 +07:00
|
|
|
video: "retain-on-failure",
|
2021-06-10 20:09:38 +07:00
|
|
|
},
|
|
|
|
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: "Chromium",
|
|
|
|
use: { browserName: "chromium" },
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: "Firefox",
|
|
|
|
use: { browserName: "firefox" },
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: "WebKit",
|
|
|
|
use: { browserName: "webkit" },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
export default config
|