test: cover the /community/user-groups generated index end to end - #840
Merged
Merged
Conversation
The User Groups section is served by a generated-index route: its _category_.json declares link.type=generated-index, so /community/user-groups has no source document. Docusaurus synthesises the heading and blurb from that JSON and one card per doc in the directory from each doc's frontmatter title and description. Nothing on disk holds the result, so no unit test can assert it, and no e2e spec loaded it: legacy-urls.spec.js reaches the two leaf pages by clicking through their redirect stubs but asserts only not-404 plus the presence of an article element. Moving a doc out of the directory, renaming a slug or dropping a frontmatter description would empty or mislabel a page that docs/community links to as the way a visitor finds a peer group, while every test stayed green. tests/e2e/user-groups.spec.js derives its expectations from _category_.json and the leaf frontmatter rather than restating them, so adding a third user group extends the contract instead of breaking it, and asserts the index serves, renders the category title and description, shows exactly one card per doc carrying that doc's title and description, links each card to the slug the doc declares, serves each leaf as a listed page with its own heading, and lists all three routes in sitemap.xml. 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
Closed
Closed
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/user-groups.spec.js— the only file this PR touches./community/user-groupsis a generated-index route:docs/community/user-groups/_category_.jsondeclareslink.type: "generated-index", so the page has no source document. Docusaurussynthesises the heading and blurb from that JSON, and one card per doc in the
directory from each doc's frontmatter
titleanddescription.Because nothing on disk holds the result, no unit test can assert it — and no
e2e spec loaded it.
legacy-urls.spec.jsreaches the two leaf pages by clickingthrough their redirect stubs, but asserts only not-404 plus the presence of an
articleelement, never page content, and never the index.docs/community/index.mdlinks here as the way a visitor finds a peer group, so moving a doc out of the
directory, renaming a
slug, or dropping a frontmatterdescriptionwould emptyor mislabel the page while every existing test stayed green.
The spec asserts that:
/community/user-groupsserves and renders the_category_.jsontitle and descriptiondocs/community/user-groups/titleanddescriptionverbatimh1and is a listed page (unlike the stubs that forward to it)sitemap.xmlExpectations are read from
_category_.jsonand the leaf frontmatter rather thanrestated, so adding a third user group extends the contract instead of breaking it.
A guard test fails first if that directory is emptied or the frontmatter stops
parsing, so nothing below it can pass vacuously.
Verification
At
7772dcf, againstbuild/fromnpm run build:production:npx playwright test tests/e2e/user-groups.spec.js— 11 passednpx playwright test(whole suite) — 124 passednpm run test:unit— 1423 tests, 1421 pass, 0 failnpx prettier --check tests/e2e/user-groups.spec.js— cleanMutation-validated against real source-to-build drift (mutating the built HTML
alone proves nothing here — the page rehydrates and React re-renders it from the
JS bundles):
telecom.md'sdescriptionchanged, then restored the source:only the Telecom card carries its doc's description and link failed
telecom.mdremoved, then restored the source: the card-count,sitemap, Telecom card, Telecom click-through and Telecom leaf-page tests
failed — 5 failed, 6 passed
Disjointness
Nothing here overlaps the open hold-gated PRs. #829 covers
/resources,/community/governanceand theplatform-engineeringTCG leaf; its diffnever mentions
user-groups. #834 covers/resources/radar-reports, #838 thelanding page, #832
docs/events/index.mdas a unit contract. The remainingopen PRs (#810, #818, #820, #825, #812, #827, #836) touch
scripts/modules andtheir unit tests. This PR adds one new e2e spec and changes no existing file.
Related Issue
Closes #839
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88