Files
star-map/e2e
SenrokaiandClaude Fable 5 bd37bb8b96 Say what is written about a world, when asked
Every figure this map shows is a measurement or something derived from one,
and it says which. What it could not do was tell you what a place is — a
radius and an eccentricity do not say that Titan is the only moon with a dense
atmosphere. An About control on a body's panel now fetches the Wikipedia lead,
and it is labelled as what it is: prose from another site, credited and linked
back, below the line where this map's own figures end.

Only on the press. Nothing is fetched while a body loads, and nothing is
fetched twice.

Three things the encyclopedia does that had to be handled, all found by asking
it rather than by guessing:

It redirects, generously — "Proxima Cen b" lands on "Proxima Centauri b" and
"Kepler-22 b" on "Kepler-22b" — so the catalogue's own names can be sent as
they are, with no mapping table to maintain.

It disambiguates. "Titan" is a list of everything called Titan, and so are
"Mercury" and "Io". Wikipedia says so in the response, and this app happens to
know the kind, so a disambiguation is retried as "Titan (moon)". Only in
English: every wiki words its own qualifiers, and inventing a translation of
one would be inventing an article title.

And it rate-limits, which it did to me while I was checking the above. A
refusal to answer is not an empty answer, so the two are separate outcomes:
"Wikipedia has no article on this" is about the world, "Wikipedia could not be
reached" is about this minute — and only the first is remembered, so a second
press is allowed to try again.

The extract is capped and scrollable. A lead can run a dozen lines, and this
panel is anchored to the top of a viewport that may be shorter than the prose.

Verified: build clean, 606/606 unit including twelve for the lookup chain, 16/16
end-to-end including three that stub the encyclopedia — this suite tests the
panel, not Wikipedia — design detector clean, and the real thing exercised by
hand against Earth, Titan and Proxima Cen b at three viewport sizes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jxMkwA2rbicdGxHosecYi
2026-08-21 14:40:51 +02:00
..
@
2026-08-03 16:50:10 +02:00

End-to-end tests (Playwright)

These tests run the real Angular dev server in a real Chromium browser, covering interactions that unit/component tests (under src/**/*.spec.ts, run via npm test) can only approximate under jsdom — most importantly the galaxy↔system camera-flight transitions (real WebGPU/ WebGL2 initialization + raycaster picking) and cross-view search navigation.

Running

npm run e2e             # headless run against a freshly started dev server
npx playwright test --ui # interactive UI mode
npx playwright show-report

playwright.config.ts starts npm run start -- --port=4300 automatically and waits for it to respond before running the suite (webServer.reuseExistingServer is true outside CI, so an already-running ng serve on port 4300 is reused instead of starting a second one). Port 4300 is used instead of the Angular CLI's conventional 4200 to avoid colliding with an unrelated server a developer might already have running there.

Notes

  • The Sun (Sol) is always placed at the coordinate-system origin (x=0,y=0,z=0), which is exactly where the default galaxy-view camera looks. camera-flight.spec.ts relies on this to reliably click-select it by clicking the center of the canvas, without needing pixel-perfect knowledge of the star field's on-screen layout.
  • Data (bootstrap fetch of stars.bin/stars-index.json/bodies.json/exoplanets.json/ deepsky.json) loads asynchronously after the page loads, so tests poll (re-click/re-check) rather than assume the scene is interactive immediately after page.goto().
  • deepsky.json is the one dataset the scene treats as optional: it only feeds the decorative backdrop, so a failure to load it is logged and the star field comes up regardless.