866de43541
- mask-ux.spec.ts: 4 tests — translucent overlay visual, sensitivity knob (38ms), edge offset knob (38ms), sheet switch (21ms) - playwright.config.ts: allow PLAYWRIGHT_BASE_URL env override for remote testing Evidence: mask-overlay-translucent.png shows translucent green overlay with photo visible underneath. Fixes: issue #55 — mask overlay usability evidence
37 lines
898 B
TypeScript
37 lines
898 B
TypeScript
import { defineConfig } from '@playwright/test';
|
|
import { fileURLToPath } from 'node:url';
|
|
import * as path from 'node:path';
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
// Allow overriding via env for remote testing (e.g. against deployed instance).
|
|
const BASE_URL = process.env.PLAYWRIGHT_BASE_URL || undefined;
|
|
|
|
export default defineConfig({
|
|
testDir: '.',
|
|
fullyParallel: true,
|
|
forbidOnly: false,
|
|
retries: 1,
|
|
workers: 1,
|
|
use: {
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
baseURL: BASE_URL,
|
|
},
|
|
webServer: BASE_URL
|
|
? undefined
|
|
: {
|
|
command: 'npx sirv build --port 18080',
|
|
port: 18080,
|
|
reuseExistingServer: true,
|
|
cwd: path.resolve(__dirname, '../../'),
|
|
stdout: 'ignore',
|
|
stderr: 'pipe',
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: { browserName: 'chromium' },
|
|
},
|
|
],
|
|
});
|