test: cover /resources/radar-reports end to end against its corpus - #834
Open
hivecommons-hive[bot] wants to merge 1 commit into
Open
hivecommons-hive[bot] wants to merge 1 commit into
hivecommons-hive[bot] wants to merge 1 commit into
Conversation
The route is reached only by tests/e2e/smoke.spec.js, which asserts that the
section is visible, that it holds more than zero <li>, and that the first link
is absolute. Two regressions pass that bar: rendering
(data.radarReports || []).slice(0, -1) drops a report silently, and deleting
rel="noreferrer" from the report title anchor reopens window.opener access on
every outbound link. Both were introduced against a production build and left
the existing suite green.
The unit suite reports 100% line and branch coverage for the component, but it
drives the JSX through tests/tools/fake-dom.mjs against a synthetic corpus, so
it never renders data/radar-reports.json and never builds a document outline.
The corpus is rebuilt daily from cncf.io by refresh-radar-reports.yml, so the
page can change with no source change at all.
Assertions are data-driven against data/radar-reports.json, following
tests/e2e/metrics-dashboard.spec.js. Dates are asserted by shape rather than by
value: the component formats with toLocaleDateString('en-US', ...), which
resolves against the renderer's timezone, so a date-only 2026-09-07 renders as
September 6, 2026 on a build west of UTC.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
Contributor
Author
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will automatically remove the |
This was referenced Sep 29, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
tests/e2e/radar-reports.spec.js, the first spec dedicated to/resources/radar-reports— the only route that renderssrc/components/RadarReports.The route was already reached by the e2e suite, but only at smoke depth.
tests/e2e/smoke.spec.js:81-93asserts that the section is visible, that itholds more than zero
<li>, and that the first link is absolute. Tworegressions clear that bar, both confirmed against a
npm run build:productionoutput at
7772dcfwith the existing suite staying green:(data.radarReports || []).slice(0, -1)publishes five of the sixreports in the corpus. "More than zero
<li>" is satisfied by five.rel="noreferrer"from the report title anchor leaves everytarget="_blank"report link able to reach back throughwindow.opener.The smoke test never inspects
rel.tests/e2e/footer.spec.js:99andtests/e2e/metrics-dashboard.spec.js:49-58already assert
rel=noreferreragainst the hydrated document; this route wasthe remaining external-link surface that did not.
The unit suite (
tests/radar-reports.test.mjs,tests/radar-reports-fallbacks.test.mjs) reports 100% line and branch coveragefor the component, but drives the JSX through
tests/tools/fake-dom.mjsagainsta synthetic corpus — it never renders
data/radar-reports.jsonand never buildsa document outline. The corpus is rebuilt daily from cncf.io by
.github/workflows/refresh-radar-reports.yml, so the page can change with nosource change at all.
What the spec asserts
Data-driven against
data/radar-reports.json, followingtests/e2e/metrics-dashboard.spec.jsrather than pinning published content:<li>per corpus entry, and rendered title hrefs equal the corpus URLsin order (the collector writes newest-first; the component maps as-is)
<h3>data.sourceUrland renders a real formatteddate, catching an
Invalid Datereaching the pagetarget="_blank"link in the section carriesrel=noreferrerhttps://Each case was mutation-checked: (1) fails cases 1-3 and 5-6, (2) fails case 5.
Timezone note
Dates are asserted by shape, not by value. The component formats with
toLocaleDateString('en-US', ...), which resolves against the renderer'stimezone, so the date-only
2026-09-07renders as "September 6, 2026" on abuild west of UTC — observed in the current
build/output. Asserting the exactday would encode the build host's timezone into the suite.
Validation
npx playwright test tests/e2e/radar-reports.spec.js— 6 passed (chromium,against
npm run build:production)npx playwright test tests/e2e/radar-reports.spec.js tests/e2e/smoke.spec.js— 14 passed, no regression to the existing smoke coverage
npx prettier --checkandnpx eslintcleantests/playwright-config.test.mjs,tests/module-imports.test.mjs— 17 passedTest-only: no production code, no workflow files, no fixtures changed.
Disjointness
Touches exactly one new file,
tests/e2e/radar-reports.spec.js, and the radarcluster. No open PR claims it: #829 adds
tests/e2e/docs-routes.spec.js(
/resources,/community/governance, platform-engineering); #832 is a unitcontract on
docs/events/index.md; #825/#818/#820/#810/#812/#827 are unit testsand fixes under
scripts/andtests/*.test.mjs.Related Issue
Closes #833
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88