Files
grimmory/frontend/playwright.config.ts
T
brios 5bd2e9ad3f fix(streaming): rewrite file streaming with NIO and HTTP caching (#512)
* fix(streaming): rewrite file streaming with NIO and HTTP caching

* fix(streaming): improve file transfer handling and enhance client disconnect detection

* fix(streaming): improve If-None-Match header evaluation for improved caching

* fix(streaming): improve chapter tracking and loading in audiobook player

* fix(streaming): remove unused imports in audiobook player component

* fix(streaming): improve chapter tracking and state management in audiobook player (again)

* fix: fix merge conflict errors and update code
2026-04-22 17:27:35 -04:00

37 lines
1.1 KiB
TypeScript

import {defineConfig, devices} from '@playwright/test';
const host = process.env['PLAYWRIGHT_HOST'] ?? '127.0.0.1';
const port = Number(process.env['PLAYWRIGHT_PORT'] ?? '4301');
const baseURL = process.env['PLAYWRIGHT_BASE_URL'] ?? `http://${host}:${port}`;
const startServer = process.env['PLAYWRIGHT_START_SERVER'] !== 'false';
const reuseExistingServer = process.env['PLAYWRIGHT_REUSE_SERVER'] === 'true';
const outputDir = process.env['PLAYWRIGHT_OUTPUT_DIR'] ?? `output/playwright-${port}`;
const workers = Number(process.env['PLAYWRIGHT_WORKERS'] ?? '1');
export default defineConfig({
testDir: './playwright',
fullyParallel: false,
workers,
outputDir,
reporter: [['list']],
retries: process.env['CI'] ? 1 : 0,
use: {
baseURL,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'retain-on-failure',
},
webServer: startServer ? {
command: `just e2e-dev ${host} ${port}`,
url: baseURL,
reuseExistingServer,
timeout: 180000,
} : undefined,
projects: [
{
name: 'chromium',
use: {...devices['Desktop Chrome']},
},
],
});