blob: 0acbc5ee6bf13ea176358c8d2889f01722091ca3 [file] [log] [blame]
Sean McCullougha0f68fa2025-04-22 09:57:54 -07001import { defineConfig, devices } from "@sand4rt/experimental-ct-web";
Sean McCulloughb29f8912025-04-20 15:39:11 -07002
3/**
4 * See https://playwright.dev/docs/test-configuration.
5 */
6export default defineConfig({
Sean McCullougha0f68fa2025-04-22 09:57:54 -07007 testDir: "./src",
Sean McCulloughb29f8912025-04-20 15:39:11 -07008 /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
Sean McCullougha0f68fa2025-04-22 09:57:54 -07009 snapshotDir: "./__snapshots__",
Sean McCulloughb29f8912025-04-20 15:39:11 -070010 /* Maximum time one test can run for. */
11 timeout: 10 * 1000,
12 /* Run tests in files in parallel */
13 fullyParallel: true,
14 /* Fail the build on CI if you accidentally left test.only in the source code. */
15 forbidOnly: !!process.env.CI,
16 /* Retry on CI only */
17 retries: process.env.CI ? 2 : 0,
18 /* Opt out of parallel tests on CI. */
19 workers: process.env.CI ? 1 : undefined,
20 /* Reporter to use. See https://playwright.dev/docs/test-reporters */
Sean McCullougha0f68fa2025-04-22 09:57:54 -070021 reporter: [["html", { open: process.env.CI ? "never" : "on-failure" }]],
Sean McCulloughb29f8912025-04-20 15:39:11 -070022 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
23 use: {
24 /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
Sean McCullougha0f68fa2025-04-22 09:57:54 -070025 trace: "on-first-retry",
Sean McCulloughb29f8912025-04-20 15:39:11 -070026
27 /* Port to use for Playwright component endpoint. */
28 ctPort: 3100,
29 },
30
31 /* Configure projects for major browsers */
32 projects: [
33 {
Sean McCullougha0f68fa2025-04-22 09:57:54 -070034 name: "chromium",
35 use: { ...devices["Desktop Chrome"] },
Sean McCulloughb29f8912025-04-20 15:39:11 -070036 },
37 // {
38 // name: 'firefox',
39 // use: { ...devices['Desktop Firefox'] },
40 // },
41 // {
42 // name: 'webkit',
43 // use: { ...devices['Desktop Safari'] },
44 // },
45 ],
46});