Skip to content

test: cover the landing page's own content end to end - #838

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-practitioners-home
Sep 29, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-practitioners-home

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds tests/e2e/practitioners-home.spec.js — end-to-end coverage for the landing page's
own content.

docs/practitioners/index.md carries slug: /, so it is the site's most-visited route,
and no spec asserts its body. tests/e2e/navigation.spec.js and tests/e2e/footer.spec.js
navigate to /, but only to exercise the theme chrome the page is wrapped in — the navbar
and the footer. On the unit side, npm run test:unit:coverage at main @ 7772dcf
(src files | 99.84 | 98.46 | 6329/6339 lines) never lists the document, because the unit
suite does not load it; tests/mdx-components.test.mjs reads it as text, and
tests/projects-born-render.test.mjs drives <ProjectsBorn> with its default props
rather than the custom title/intro this page passes.

The 14 new tests cover:

  • hero — / serves the doc (status < 400, no "Page Not Found", <h1>CNCF End Users</h1>);
    the tagline keeps its inner <span>; all four pillars render in order with non-empty bodies
  • hero photo — the require()d image is asserted to decode (naturalWidth > 0), not
    merely to be present, which is the only signal that survives a webpack asset-pipeline change
    that stops emitting it; its caption still links to /community/awards
  • wayfinding — each "Start here" entry is present and its target resolves without 404;
    the four audience cards carry their exact CTA labels and hrefs; the ladder renders five
    steps whose visible numbers agree with their positions
  • projects-born — the in-page section uses the page-specific title/intro instead of the
    component default (which the footer's compact strip renders on this same page, so the
    fallback looks like normal output), lists the same number of projects as that strip — both
    read data/projects-born.json, so the strip pins the section to the shipped data without
    restating it — keeps the long descriptions the compact variant omits, and stays a distinct
    aria-labelledby section from it

Verified locally at 7772dcf against build/ from npm run build:production: 14 passed.
npm run test:unit stays green (1421 pass / 0 fail) and the file is Prettier-clean. The
assertions were mutation-checked — flipping the expected ladder label, a "Start here" href
and the projects-born default-title count each produced a failure, so none of them is vacuous.

Test-only: one new file under tests/e2e/. No production code, no workflow changes.

Related Issue

Closes #837


Filed by quality agent (hold-gated mode). Human review required.

— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88

docs/practitioners/index.md carries slug: /, so it is the site's landing
page, and no spec asserts its body. navigation.spec.js and footer.spec.js
load / only to exercise the theme chrome around it; the unit suite never
loads the document at all, and projects-born-render.test.mjs drives
<ProjectsBorn> with default props rather than the custom title/intro the
page passes.

Add tests/e2e/practitioners-home.spec.js covering the hero and tagline,
the four pillars, the require()d hero photo (asserted to decode, not
merely to be present) and its awards-page caption link, the Start here
list and the routes it points at, the four audience cards, the five-step
ladder, and the in-page ProjectsBorn section held against the footer's
compact strip for both project count and distinctness.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: hivecommons-hive[bot] <hivecommons-hive@hive.kubestellar.io>
@hivecommons-hive

Copy link
Copy Markdown
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 outreach agent is always held because it publishes project-facing communication.

Hive will automatically remove the hold label once current policy no longer requires a level hold for "quality". If this is an outreach PR, a human must review it and remove the label.

@hivecommons-hive hivecommons-hive Bot added quality Approved by a Hive merger/owner for auto-merge on green CI testing Approved by a Hive merger/owner for auto-merge on green CI agent/quality Approved by a Hive merger/owner for auto-merge on green CI hive/hosted-available-lke648397-260827-5n31 Approved by a Hive merger/owner for auto-merge on green CI labels Sep 29, 2026
@mrbobbytables
mrbobbytables added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit a33e26b Sep 29, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent/quality Approved by a Hive merger/owner for auto-merge on green CI hive/hosted-available-lke648397-260827-5n31 Approved by a Hive merger/owner for auto-merge on green CI quality Approved by a Hive merger/owner for auto-merge on green CI testing Approved by a Hive merger/owner for auto-merge on green CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Landing page (/) rendered content has neither unit nor end-to-end coverage

1 participant