* feat(client): add `tabs` support * chore: apply fixes * test: fix types * build: pw again * build: more attempts to improve PW * fix: regressions after refactoring to tabs * style: apply TS style fixes * build: more PW * test: run a problematic test in serial mode * test: no parallel pw * test: fix race condition in PW * test: pw one worker no retry
55 lines
1.5 KiB
TypeScript
55 lines
1.5 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
/**
|
|
* Read environment variables from file.
|
|
* https://github.com/motdotla/dotenv
|
|
*/
|
|
// import dotenv from 'dotenv';
|
|
// import path from 'path';
|
|
// dotenv.config({ path: path.resolve(__dirname, '.env') });
|
|
|
|
/**
|
|
* See https://playwright.dev/docs/test-configuration.
|
|
*/
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
timeout: 160_000,
|
|
fullyParallel: true,
|
|
/* Fail the build on CI if you accidentally left test.only in the source code. */
|
|
forbidOnly: !!process.env.CI,
|
|
retries: 0,
|
|
workers: process.env.CI ? 1 : 8,
|
|
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
|
reporter: "html",
|
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
|
use: {
|
|
baseURL: "http://127.0.0.1:8000",
|
|
trace: "retain-on-failure",
|
|
ignoreHTTPSErrors: true,
|
|
navigationTimeout: 60_000,
|
|
screenshot: "only-on-failure",
|
|
testIdAttribute: "data-testid",
|
|
video: "retain-on-failure",
|
|
},
|
|
|
|
/* Configure projects for major browsers */
|
|
projects: !process.env.CI
|
|
? [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
|
|
{
|
|
name: "firefox",
|
|
use: { ...devices["Desktop Firefox"] },
|
|
},
|
|
]
|
|
: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
});
|