2021-06-10 13:09:38 +00:00
|
|
|
import { PlaywrightTestConfig } from "@playwright/test"
|
|
|
|
|
|
|
|
import path from "path"
|
|
|
|
|
2021-10-28 20:27:17 +00:00
|
|
|
// The default configuration runs all tests in three browsers with workers equal
|
|
|
|
// to half the available threads. See 'yarn test:e2e --help' to customize from
|
|
|
|
// the command line. For example:
|
|
|
|
// yarn test:e2e --workers 1 # Run with one worker
|
|
|
|
// yarn test:e2e --project Chromium # Only run on Chromium
|
|
|
|
// yarn test:e2e --grep login # Run tests matching "login"
|
2021-06-10 13:09:38 +00:00
|
|
|
const config: PlaywrightTestConfig = {
|
|
|
|
testDir: path.join(__dirname, "e2e"), // Search for tests in this directory.
|
|
|
|
timeout: 60000, // Each test is given 60 seconds.
|
2021-06-22 21:34:44 +00:00
|
|
|
retries: process.env.CI ? 2 : 1, // Retry in CI due to flakiness.
|
2021-12-17 19:06:52 +00:00
|
|
|
globalSetup: require.resolve("./utils/globalE2eSetup.ts"),
|
2021-06-10 13:09:38 +00:00
|
|
|
reporter: "list",
|
|
|
|
// Put any shared options on the top level.
|
|
|
|
use: {
|
|
|
|
headless: true, // Run tests in headless browsers.
|
2021-06-24 20:08:41 +00:00
|
|
|
video: "retain-on-failure",
|
2021-06-10 13:09:38 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: "Chromium",
|
|
|
|
use: { browserName: "chromium" },
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: "Firefox",
|
|
|
|
use: { browserName: "firefox" },
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
name: "WebKit",
|
|
|
|
use: { browserName: "webkit" },
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
export default config
|