Public site suite¶
packages/public-site, Vitest with jsdom. 32 files ยท 235 tests ยท all
passing ยท 29.21s.
The public site is the auth-free search and rule-catalogue package. Measured on
24 September 2026 on main at 86af73e (v2026.09.11) with
npm test --workspace=@ronl/public-site, coverage included, after a clean
npm ci in a separate clone on Node 24.14.1 / npm 11.11.0. The suite has grown
in every recent window โ 30 files and 204 tests at v2026.09.5, 31 and 225 at
v2026.09.7, 32 and 231 at v2026.09.9, 32 and 235 now. This is the first of
those windows to add no file: the four new tests are all in
src/pages/Detail.test.tsx, which grew by 86 lines to 25 tests alongside
changes to Detail.tsx, lib/api.ts and both i18n dictionaries.
Coverage is 95.92% statements ยท 96.31% branches ยท 95.07% functions ยท 96.41%
lines, and the package passes the per-file 80% branch floor that its
vite.config.ts enforces rather than merely records: no file in it is below the
line.
Three measures up, branches fractionally down
Against v2026.09.9 โ 95.82 / 96.45 / 94.89 / 96.33 โ statements, functions
and lines each gained while branches gave up 0.14 of a point. Detail.tsx
is at 100% statements and 97.84% branches after the change, so nothing
regressed; what moved the package figure is lib/api.ts, which gained
branch surface it is not yet fully exercising (83.78% branches, its lowest
measure). This is the ordinary shape of adding a guarded code path and
testing its main case first.
Inventory¶
Re-derived on 24 September 2026 from the run's own JSON output. Both numeric columns are from that run: the Files column accounts for all 32 files and the Tests column sums to 235.
| Area | Files | Tests | Covers |
|---|---|---|---|
src/pages |
16 | 137 | Includes a full herkomst/ provenance-explorer sub-area (HerkomstExplorer, HerkomstTrace, HerkomstChip, HerkomstBackground, herkomstConcepts, herkomstData, herkomstScroll, herkomstTrail โ 8 files) plus the generic SectionIndex / Regelcatalogus / Results / Detail (25) / Woordenboek / static pages |
src/lib |
7 | 46 | slug (kept identical to the backend's slugifier by design), useQueryState (URL-backed filters), search (highlight()), api (the typed /v1/public/* client), sectionHits (mapToHits()), prerenderedData (the seeded-render reader), buildInfo |
src/components |
4 | 22 | chrome (7), Footer (6), StatusTag (5, new in v2026.09.9), TechDetails (4) |
scripts/ |
2 | 21 | prerender.test.ts (11 โ escapeHtml, buildSitemap, injectIntoShell), check-bundle.test.ts (10 โ the build-time gate that fails if any auth or telemetry string ships in the bundle) |
src/App.test.tsx |
1 | 5 | Routing shell โ every route registered, <html lang> synced to the language switch |
src/i18n |
1 | 3 | NL/EN dictionary key parity |
src/staticwebapp-csp.test.ts |
1 | 1 | Guards the shipped CSP header โ a regression here silently breaks the org-logo host |
Both columns are current, and they sum
Earlier versions of this page carried a Files column from one date and a
Tests column from 19 August that summed to 134 against a measured 225, with
a warning attached. Re-derived from the runner, the columns agree: 32
files, 235 tests. The largest correction was src/pages, recorded at 71
and actually holding 133 in September; it is 137 now.
StatusTag is the file this release added
src/components/StatusTag.test.tsx arrived with the StatusTag.tsx it
covers, and both are at 100% statements, branches, functions and lines
โ 3/3 statements, 2/2 branches, 1/1 functions, 3/3 lines. Its five tests
run in 91ms:
- renders the known status
examplewith its own class - renders the known status
wipwith its own class - renders the known status
e2ewith its own class - falls back to a neutral class for a status label it does not recognise
- always shows the label as text, never colour alone
The last is an accessibility property rather than a rendering detail: a status conveyed only by colour fails for anyone who cannot distinguish the palette, and it is the kind of regression a snapshot test would happily wave through.
Per-area coverage was also re-derived on 24 September and reconciles to the package total โ see Coverage.
The statement-to-branch gap this package was once known for is gone. It was the widest of the five at 16.4 points, 86.82% statements against 70.39% branches. Today branches sit above statements โ 96.31% against 95.92% โ which is what a campaign against a per-file branch floor looks like once it lands. The margin has narrowed from 0.63 of a point to 0.39, which is worth watching rather than acting on.
Playwright suite¶
packages/public-site/e2e/publiek.spec.ts
(npm run test:e2e --workspace=@ronl/public-site) against real
/v1/public/* data with no mocks โ search โ filter โ detail โ back with URL
preservation, a deep link with pre-applied filters, keyboard-only navigation,
and three axe-core accessibility scans (home, results, a detail page) asserting
no critical or serious violations.
These figures date from 19 August and were not re-run for v2026.09.11
Measured 19 August 2026 against v2026.08.19: 6 tests, 6 passed, 0 failed, 0 flaky, 0 skipped, 8.9s.
They were not re-measured on 12 September, not on 20 September, and not on
24 September 2026 either โ running them needs a live backend, and each of
those passes deliberately ran nothing that required the stack. The package
has changed underneath them three times since, so take the six as an
inventory figure rather than as a result. What was re-checked at 86af73e
is the inventory itself: e2e/publiek.spec.ts is still the one spec, and it
still runs in no workflow. These remain the oldest figures on these pages.
Unlike the frontend suite, Playwright starts its own dev server for this package
โ playwright.config.ts declares a webServer running npm run dev on
:5175, with reuseExistingServer on outside CI. Only the backend needs to
already be running, on whatever VITE_API_URL points at: these specs hit real
/v1/public/* search results rather than mocks, which is why three of the six
fail on timeouts without it.
Setting E2E_BASE_URL skips starting the local server entirely and points
baseURL at an already-deployed site instead, which is how the suite is used
for post-deploy verification against ACC. Re-read from the config at 86af73e
on 24 September 2026 and unchanged: webServer on :5175, no globalSetup of
any kind, and the backend dependency stated in the config's own header comment
rather than checked before the run.
CI¶
Public-site is the package that had a real CI test gate before the others did.
Both azure-publicsite-acc.yml and -prod.yml run npm run lint,
npm run type-check, then npm test before building, and the build itself
gates on a prerender step and a bundle-cleanliness check. A failing test blocks
the deploy.
Since 19 September 2026 it blocks the merge as well. The acc ruleset
(acc supply-chain gate) lists Build and Deploy ACC Public Site among its
required status checks, alongside audit, scan, build,
Build and Deploy ACC Frontend and Build and Deploy ACC PA Demo โ so a red
suite here now stops the pull request rather than merely reporting against it.
Read from gh api repos/sgort/ronl-business-api/rulesets on 20 September 2026.
This page said the opposite until 20 September 2026
It previously stated that the only required check on acc and main was
audit, so "a red suite here has to be read rather than relied on to stop a
pull request". That was true when written and is now false for acc. It
remains true for main, deliberately: no production workflow has a
pull_request trigger, so no production check could be required of a
promotion. See
Overview โ What actually gates a merge.
Since the per-file branch floor lives in vite.config.ts, this same npm test
step is also where coverage is enforced โ the required check and the coverage
gate are one command.