Files
improvise/harness/playwright.config.js
Edward Langley ab96f3651f test(harness): Firefox runs the standalone deployment, and only that
improvise-bck's criterion (1) reads "Chrome and Firefox" and the standalone
deployment was the evidence offered for it -- but shell.spec.js ran on
Chromium alone (improvise-zkkw).

The recorded reason is that routeWebSocket is slower and flakier across three
engines. That argument is about the four mocked-peer tests and was never made
about the two beside them: the standalone block mocks nothing, and the
engine's OPFS is already exercised by opfs.spec.js.

So the mocked-peer describe is tagged and the firefox project widens its
testMatch with grepInvert: /@mocked-peer/ -- a tag, not a third copy of the
file. Measured: 2.0s for the pair, 10/10 green under --repeat-each=5. Nothing
was quieted; had it flaked, the answer would have been to leave it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FC2jVn8Au7E9JPkw6bwXXH
2026-09-20 16:34:31 -07:00

51 lines
1.9 KiB
JavaScript

import { defineConfig, devices } from "@playwright/test";
// The one place a line of web/*.js is executed, and where a change to either
// file belongs. Why, and why Playwright: context/code/clients.md.
// Reuse is OPT-IN because adopting another checkout's server tests THAT tree,
// and the symptom is a result contradicting the file you just read.
const PORT = process.env.IMPROVISE_HARNESS_PORT ?? "8099";
const REUSE = process.env.IMPROVISE_HARNESS_REUSE === "1";
export default defineConfig({
testDir: "./tests",
fullyParallel: false,
workers: 1,
forbidOnly: !!process.env.CI,
retries: 0,
reporter: process.env.CI ? [["github"], ["list"]] : "list",
timeout: 60_000,
use: {
baseURL: `http://127.0.0.1:${PORT}`,
trace: "retain-on-failure",
},
// Chromium + Firefox run the OPFS battery; WebKit has no OPFS at all and is
// kept for the day it does. Firefox ALSO runs the standalone half of the
// shell spec — the deployment improvise-bck's criterion (1) names, which
// mocks nothing; the `@mocked-peer` block it excludes is the one the
// routeWebSocket argument was actually made about (improvise-zkkw). Every
// other spec is Chromium-only: clients.md.
projects: [
{ name: "chromium", use: { ...devices["Desktop Chrome"] } },
{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
testMatch: /(opfs|shell)\.spec\.js/,
grepInvert: /@mocked-peer/,
},
{
name: "webkit",
use: { ...devices["Desktop Safari"] },
testMatch: /opfs\.spec\.js/,
},
],
webServer: {
command: `python3 -m http.server ${PORT} --bind 127.0.0.1 --directory serve`,
// The APP, not the site root — since improvise-kh8 the root is the landing
// page, which would answer 200 with no bundle assembled at all.
url: `http://127.0.0.1:${PORT}/app/index.html`,
reuseExistingServer: REUSE,
timeout: 30_000,
},
});