2023-06-20 12:49:48 +00:00
|
|
|
import { defineConfig, devices } from "@playwright/test";
|
2024-06-12 09:55:14 +00:00
|
|
|
|
|
|
|
import { getAccountUrl } from "./test/utils";
|
2023-06-20 12:49:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
|
|
*/
|
|
|
|
export default defineConfig({
|
|
|
|
testDir: "./test",
|
|
|
|
fullyParallel: true,
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
retries: process.env.CI ? 2 : 0,
|
2023-10-17 05:42:38 +00:00
|
|
|
workers: 1,
|
2023-11-02 16:12:28 +00:00
|
|
|
reporter: process.env.CI ? [["github"], ["html"]] : "list",
|
2024-06-03 11:42:44 +00:00
|
|
|
expect: {
|
|
|
|
timeout: 20 * 1000,
|
|
|
|
},
|
|
|
|
|
2023-06-20 12:49:48 +00:00
|
|
|
use: {
|
2024-06-12 09:55:14 +00:00
|
|
|
baseURL: getAccountUrl(),
|
2023-06-20 12:49:48 +00:00
|
|
|
trace: "on-first-retry",
|
|
|
|
},
|
|
|
|
|
|
|
|
/* Configure projects for major browsers */
|
|
|
|
projects: [
|
2023-07-07 14:34:54 +00:00
|
|
|
{
|
2023-08-31 09:32:39 +00:00
|
|
|
name: "import realms",
|
|
|
|
testMatch: /realm\.setup\.ts/,
|
|
|
|
teardown: "del realms",
|
2023-07-07 14:34:54 +00:00
|
|
|
},
|
|
|
|
{
|
2023-08-31 09:32:39 +00:00
|
|
|
name: "del realms",
|
|
|
|
testMatch: /realm\.teardown\.ts/,
|
2023-07-07 14:34:54 +00:00
|
|
|
},
|
2023-06-20 12:49:48 +00:00
|
|
|
{
|
|
|
|
name: "chromium",
|
2023-09-12 11:54:38 +00:00
|
|
|
use: {
|
|
|
|
...devices["Desktop Chrome"],
|
2024-06-03 11:42:44 +00:00
|
|
|
viewport: { width: 1920, height: 1200 },
|
2023-09-12 11:54:38 +00:00
|
|
|
},
|
|
|
|
dependencies: ["import realms"],
|
2023-07-07 14:34:54 +00:00
|
|
|
},
|
2023-06-20 12:49:48 +00:00
|
|
|
],
|
|
|
|
});
|