2024-07-30 23:41:41 +01:00
|
|
|
import { defineConfig, devices } from "@playwright/test";
|
2024-06-05 20:46:32 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
|
|
*/
|
|
|
|
export default defineConfig({
|
2024-07-30 23:41:41 +01:00
|
|
|
testDir: "test",
|
2024-06-05 20:46:32 +01:00
|
|
|
fullyParallel: true,
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
retries: process.env.CI ? 3 : 0,
|
|
|
|
workers: process.env.CI ? 1 : undefined,
|
2024-07-30 23:41:41 +01:00
|
|
|
reporter: process.env.CI ? "blob" : "html",
|
2024-06-05 20:46:32 +01:00
|
|
|
timeout: 10 * 60 * 1000,
|
|
|
|
use: {
|
2024-07-30 23:41:41 +01:00
|
|
|
trace: "off",
|
|
|
|
video: "off",
|
|
|
|
screenshot: "on",
|
|
|
|
testIdAttribute: "data-test",
|
2024-06-05 20:46:32 +01:00
|
|
|
contextOptions: {
|
|
|
|
ignoreHTTPSErrors: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
expect: {
|
2024-08-15 21:29:57 +01:00
|
|
|
// Many of our expectations take a little longer than the default 5 seconds.
|
|
|
|
timeout: 15 * 1000,
|
2024-06-05 20:46:32 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
projects: [
|
|
|
|
{
|
2024-07-30 23:41:41 +01:00
|
|
|
name: "chromium",
|
|
|
|
use: { ...devices["Desktop Chrome"] },
|
2024-06-05 20:46:32 +01:00
|
|
|
},
|
|
|
|
{
|
2024-07-30 23:41:41 +01:00
|
|
|
name: "firefox",
|
|
|
|
use: { ...devices["Desktop Firefox"] },
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "webkit",
|
|
|
|
use: { ...devices["Desktop Safari"] },
|
|
|
|
},
|
|
|
|
/* Test against branded browsers. */
|
|
|
|
{
|
|
|
|
name: "Google Chrome",
|
|
|
|
use: { ...devices["Desktop Chrome"], channel: "chrome" }, // or 'chrome-beta'
|
2024-06-05 20:46:32 +01:00
|
|
|
},
|
|
|
|
{
|
2024-07-30 23:41:41 +01:00
|
|
|
name: "Microsoft Edge",
|
|
|
|
use: { ...devices["Desktop Edge"], channel: "msedge" }, // or 'msedge-dev'
|
2024-06-05 20:46:32 +01:00
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
webServer: {
|
2024-07-30 23:41:41 +01:00
|
|
|
command: "npm run start",
|
|
|
|
url: "https://127.0.0.1:1234/_ready",
|
2024-06-05 20:46:32 +01:00
|
|
|
timeout: 120 * 1000,
|
|
|
|
ignoreHTTPSErrors: true,
|
|
|
|
reuseExistingServer: !process.env.CI,
|
|
|
|
},
|
|
|
|
});
|