Skip to content

test: cover CommunityPeople's unknown-section roster fallback end to end - #1136

Merged
mrbobbytables merged 1 commit into
mainfrom
quality/test-community-people-unknown-section
Oct 7, 2026
Merged

mrbobbytables merged 1 commit into
mainfrom
quality/test-community-people-unknown-section

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

src/components/CommunityPeople/index.js line 134 resolves its roster with
peopleData.people[section] || [], and nothing in a browser has ever taken the
right operand.

The published site renders the component from exactly two documents —
docs/community/technical-advisory-board.md:29 (section="tab") and
docs/community/index.md:133 (section="staff") — and
tests/community-people-data.test.mjs:92-104 fails the build when a section
rendered under docs/ is missing from data/community-people.json or carries
no entries. The fallback is therefore unreachable from published content by
construction. A data overlay cannot reach it either: emptying a section hands
the component an array straight off the object, while the || [] arm runs only
when the key is absent.

So the shape gets a page of its own, following
tests/e2e/fixtures/docs/cncf-project-card.mdx:

  • tests/e2e/fixtures/docs/community-people.mdx (new) renders
    <CommunityPeople section="coverage-fixture-no-such-section" />.
    docusaurus.config.js:86-102 registers the e2e-coverage-fixtures docs
    instance only when E2E_COVERAGE=1, so npm run build:production, the
    gating "End-to-end tests" job and the deployed site never compile it.
    sectionsReferencedByDocs() walks docs/ only
    (tests/community-people-data.test.mjs:48), so the undefined section does
    not trip the contract above.
  • tests/e2e/community-people-unknown-section.spec.js (new) asserts the
    grid from both ends: the published TAB page produces one grid with more than
    zero cards, and the fixture route produces one grid with zero. An empty grid
    on its own would also be produced by a selector that matched nothing, which
    is why the populated case comes first.

Evidence

  • Unit — already covered. npm run test:unit:coverage (node v26.10.0,
    TZ=UTC) at main = 7ab301e: this file reports 100.00% lines / 100.00%
    regions, and tests/community-people.test.mjs:160 drives the arm directly.
  • E2E — was not covered. CI artifact e2e-coverage, id 11383321728, run
    37395255849,
    job End-to-end coverage at 7ab301e:
    src/components/CommunityPeople/index.js | 100.00 | 87.10 | | 32 125 134.
  • The arm is now taken in a browser. Verified locally at 7ab301e against
    npm run build:e2e:coverage:site: a coverage run containing the fixture case
    alone reports region 134 absent from this file's uncovered list.
  • npm test (check + 1966 unit tests) passes on this branch.

What this does not do

Region 134 stays on the report's uncovered list in a run that also visits the
published page — the two instances' copies of the chunk map back to different
original coordinates, and getRegionCoverage in
tests/tools/e2e-coverage-report.mjs keys a region on its exact coordinates.
That is the attribution problem tracked in #1066 and #1079, the same limit
#1097 recorded for RadarReports; it is not something a fixture can reach.

Scope and coordination

This PR claims region 134 only of that row. Region 32 (the backdrop
onMouseDown arm) belongs to #1120 and region 125 (the onClose arrow) to the
#1079 class; neither is touched.

Two new files, zero edits. It does not touch
tests/e2e/fixtures/docs/cncf-project-card.mdx or
tests/e2e/cncf-project-card.spec.js (#1124),
tests/e2e/dialog-non-dismissing.spec.js (#1120),
tests/e2e-data-fixtures.test.mjs (#1110, #1113),
tests/tools/e2e-data-fixtures.cjs (#1110), or anything under
tests/e2e/fixtures/data/ or tests/e2e/fixtures/data-variants/. No workflow
file is involved.

Related Issue

Closes #1135


Human review required.

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

src/components/CommunityPeople/index.js line 134 resolves its roster with
`peopleData.people[section] || []`. The published site renders the component
only with section="tab" and section="staff", and
tests/community-people-data.test.mjs fails the build when a section rendered
under docs/ is absent from data/community-people.json or carries no entries, so
no published page can take the fallback. A data overlay cannot reach it either:
emptying a section hands the component an array off the object rather than the
fallback, which runs only when the key is absent.

Add a fixture page under the E2E_COVERAGE-only e2e-coverage-fixtures docs
instance rendering an undefined section, and a spec pairing the published TAB
page with it: a populated grid on the first, a grid with zero cards on the
second.

Closes #1135

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive hivecommons-hive Bot added the hold label Oct 6, 2026
@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 keep the hold label until a human removes it. Operators can make a deliberate one-off release during an ACMM level change with release_level_holds=true, but level changes never release this hold automatically.

@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 labels Oct 6, 2026
@mrbobbytables
mrbobbytables added this pull request to the merge queue Oct 7, 2026
Merged via the queue into main with commit ae48fad Oct 7, 2026
7 checks passed
@mrbobbytables
mrbobbytables deleted the quality/test-community-people-unknown-section branch October 7, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hold 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] CommunityPeople's people[section] || [] roster fallback has no end-to-end coverage

1 participant