Skip to content

test: cover the industry and CNCF-project facet selects end to end - #1058

Merged
castrojo merged 1 commit into
mainfrom
quality/e2e-architecture-facet-filters
Oct 6, 2026
Merged

castrojo merged 1 commit into
mainfrom
quality/e2e-architecture-facet-filters

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

/architectures ships three facet controls — organization, industry and CNCF
project — and only the organization one has ever been driven by a browser.
tests/e2e/interactions.spec.js's reference architecture filters block
selected an option in Filter by organization and typed in the search box;
nothing in tests/e2e/** touched Filter by industry or
Filter by CNCF project.

This adds the same select-narrow-clear cycle to both remaining facets, as a
loop over the two labels inside the existing describe block. Each test asserts
the select starts empty, takes option index 1 (index 0 is the "All ..."
placeholder), asserts the shown count lands strictly between 1 and the total,
clicks Clear filters, and asserts the count and the select both return to
their starting state.

No data overlay is needed. data/architectures/catalog.json carries 8 entries
whose alphabetically-first industry (Cloud) and project (Agones) each match
exactly one of them, so option index 1 takes both arms of each guard — true
for the matching entry, false for the other seven. The strict
toBeLessThan(total) is what proves the return false arm ran; a catalog where
one facet value covered every entry would fail here loudly rather than silently
stop covering the branch.

What this reaches

Four regions of src/components/ArchitectureFilters/index.js that only the
unit suite's fake DOM reached:

line code
33 if (industry && !architecture.industries.includes(industry)) {
36 if (project && !architecture.projects.includes(project)) {
142 onChange={(event) => setIndustry(event.target.value)}
163 onChange={(event) => setProject(event.target.value)}

142 and 163 are the wiring a fake DOM cannot vouch for: three <select>
elements bound to three separate useState setters through three separate
htmlFor/id pairs. A duplicated id, an option list built from the wrong
field, or a handler bound to the wrong setter leaves the shipped toolbar inert
on that facet while the organization test stays green.

Evidence

Reproduced at 900592b by building and running the suite locally
(npm run build:e2e:coverage, then
node tests/tools/e2e-coverage-run.mjs init, npm run test:e2e:coverage with
E2E_COVERAGE_DIR/E2E_COVERAGE_RUN_ID set, then seal), and rendering the
report with --build build.

  • Before — job End-to-end coverage, workflow Validate repository, run
    37164361552
    attempt 1, revision 900592b; artifact e2e-coverage (id 11289266192),
    manifest runId 37164361552-1, status: passed,
    sealedAt 2026-10-04T00:19:14Z. report.txt puts
    src/components/ArchitectureFilters/index.js at 100.00% lines / 89.19%
    regions
    , uncovered region lines [33, 36, 142, 163]; src files at
    80.98% (379/468 regions).
  • After — the local run on this branch, 298 baseline specs plus the 2 added
    here, 300 passed. The same file renders at 100.00% lines / 100.00%
    regions
    , no uncovered regions; src files 81.74% (385/471 regions).

npm run check:format and npx eslint tests/e2e/interactions.spec.js pass.
Unit coverage is unchanged and not involved: at the same revision
npm run test:unit:coverage already reports this file at 100.00% lines /
100.00% regions, which is why the gap was end-to-end only.

Scope

Touches tests/e2e/interactions.spec.js only — no production code, no data
fixture, no coverage tooling. Disjoint from the open hold-gated PRs: #1051 and
#1040 are in tests/tools/e2e-coverage-report.mjs, #1034 and #1054 are in the
tests/e2e/fixtures/** overlays with data-variants.spec.js /
data-fixtures.spec.js, and none of them reference ArchitectureFilters or
interactions.spec.js.

Related Issue

Closes #1057


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

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

/architectures ships three facet controls and only the organization one has
ever been driven by a browser. The industry and project selects' onChange
handlers (src/components/ArchitectureFilters/index.js lines 142 and 163) and
filterArchitectures' two matching guards (lines 33 and 36) were reached by the
unit suite's fake DOM alone, which cannot vouch for a select being wired to the
setter its label claims.

Adds the same select-narrow-clear cycle the organization facet already gets,
for both remaining facets. No data overlay is needed: the catalog's
alphabetically-first industry and project each match exactly one of its eight
entries, so option index 1 takes both arms of each guard.

Closes #1057

Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive hivecommons-hive Bot added the hold label Oct 4, 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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] the industry and CNCF-project facet selects on /architectures have no end-to-end coverage

1 participant