You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wire up the Playwright e2e harness for the dataset page's inline scripts #279
`package.json` declares a `test:e2e` script and depends on `@playwright/test`, but there is no `playwright.config.ts` and no `*.spec.ts` anywhere, so the harness is not wired up.
That leaves the imperative logic inlined in `src/pages/dataset/[id].astro` unreachable by any test: `revealRecordingRow` (ancestor walk, synthesized "Show next" clicks bounded by `REVEAL_MAX_CHUNK_CLICKS`, a hand-rolled selector-quote escape, a `requestAnimationFrame`-polled timeout), `applyUnitsNotice`, and the coverage-panel jump click delegate. An off-by-one in the ancestor walk or a selector that fails on a directory name containing a quote would only surface as "jump links silently do nothing" in production.
Surfaced by the review of #278 (Zarr coverage panel).
Proposed work
Add `playwright.config.ts` targeting the built site (`astro build` plus `wrangler dev` or `astro preview`), no network access to production.
Serve the existing fixtures (`test/fixtures/zarr/*.json`, a small BIDS listing) from a local stub so the specs stay hermetic.
Specs: jump link expands ancestors and scrolls to the stamped row; a pending 4D/BTi directory row is reachable; the units notice renders for a store with `kept_importer_unit`; the "Show next" loop yields between chunks.
Run the specs in CI on `staging` and `main` PRs.
Out of scope
Rewriting the inline scripts into importable modules; that is worth doing but is a separate refactor.
Related: #248 asks for a Playwright spec on the upload page state machine and would share the same playwright.config.ts and CI job; whichever lands first should set the harness up for both.
From the #294 review (epic #284): the new Use-this-data section and the .md mirror are both server-rendered and hold the agent-facing facts, so the no-JavaScript property is now load-bearing and nothing asserts it. When this harness lands, the cheapest guard is a spec that fetches a dataset page with JavaScript disabled and asserts the Use-this-data headings and the JSON-LD block are present; a source-level assertion that UseThisData.astro ships no script block would catch the common regression more cheaply still.
Activity
neuromechanist commentedon Sep 2, 2026
Related: #248 asks for a Playwright spec on the upload page state machine and would share the same
playwright.config.tsand CI job; whichever lands first should set the harness up for both.neuromechanist commentedon Sep 3, 2026
From the #294 review (epic #284): the new Use-this-data section and the .md mirror are both server-rendered and hold the agent-facing facts, so the no-JavaScript property is now load-bearing and nothing asserts it. When this harness lands, the cheapest guard is a spec that fetches a dataset page with JavaScript disabled and asserts the Use-this-data headings and the JSON-LD block are present; a source-level assertion that UseThisData.astro ships no script block would catch the common regression more cheaply still.