Files
star-map/playwright.config.ts
T
SenrokaiandClaude Opus 5 82d70ce871 Follow the catalogue rather than a star it used to rank fourth
The scheduled refresh on 24 August took the star catalogue from 68 388 rows to
447 410 and from 820 kB to 5.4 MB. No branch in the seven-PR chain had ever seen
it -- they were all cut before -- so nothing tested the combination until the
chain landed on main. Two things broke there.

The neighbour ring named Barnard's Star, and the spec clicked it by name. The
refresh is a Gaia DR3 merge that carries the same physical star twice: Proxima
Centauri at 1.296 pc and Gaia DR3 5853498713190525696 at 1.302 pc are one star,
as are Barnard's Star at 1.824 and Gaia DR3 4472832130942575872 at 1.828. The
extra row pushed Barnard's from fourth-nearest to fifth, off a ring that shows
four. The ring is doing exactly what it says; the spec was asserting the
catalogue's contents. It now reads whichever star the ring names and follows
that one, so the next refresh cannot demote it.

Four other assertions were timing out at Playwright's default five seconds --
not because anything was wrong, but because every one of these tests boots that
catalogue and the suite boots several at once on a software rasterizer. The
heavy waits already carried explicit longer timeouts; the default now matches.
Capping the worker count would have worked too, and would have cost every run
the time whether or not the machine needed it.

npm test 607/607, npx playwright test 16/16 at the default worker count.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014fcUfL82nvyh9VebX1Fz6w
2026-08-27 19:39:26 +02:00

39 lines
1.5 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test';
/**
* End-to-end tests that exercise the app in a real browser: search-driven navigation and the
* galaxy↔system camera-flight transitions (raycasting, WebGPU/WebGL2 init, DOM state) that
* unit/component tests can only approximate under jsdom. See `e2e/README.md`.
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: 'html',
// Well above Playwright's 5 s, which was a fair ceiling when the star catalogue was 820 kB and
// is not now that the scheduled refresh has it at 5.4 MB and 447 410 rows: every one of these
// tests boots that catalogue, and the suite boots several at once on a software rasterizer.
// The heavy waits already carry their own longer timeouts; this is the same judgement applied
// to the assertions that were left on the default. A ceiling costs nothing when it is not hit.
expect: { timeout: 15_000 },
use: {
baseURL: 'http://localhost:4300',
trace: 'on-first-retry'
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] }
}
],
webServer: {
// Uses a dedicated port (rather than the Angular CLI's conventional 4200) so this never
// collides with an unrelated `ng serve`/other server a developer already has running.
command: 'npm run start -- --port=4300',
url: 'http://localhost:4300',
reuseExistingServer: !process.env.CI,
timeout: 120_000
}
});