Repository navigation
test: cover the industry and CNCF-project facet selects end to end - #1058
Merged
Merged
Conversation
/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>
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 Oct 4, 2026
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
/architecturesships three facet controls — organization, industry and CNCFproject — and only the organization one has ever been driven by a browser.
tests/e2e/interactions.spec.js'sreference architecture filtersblockselected an option in Filter by organization and typed in the search box;
nothing in
tests/e2e/**touched Filter by industry orFilter 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.jsoncarries 8 entrieswhose alphabetically-first industry (
Cloud) and project (Agones) each matchexactly one of them, so option index 1 takes both arms of each guard —
truefor the matching entry,
falsefor the other seven. The stricttoBeLessThan(total)is what proves thereturn falsearm ran; a catalog whereone 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.jsthat only theunit suite's fake DOM reached:
if (industry && !architecture.industries.includes(industry)) {if (project && !architecture.projects.includes(project)) {onChange={(event) => setIndustry(event.target.value)}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
useStatesetters through three separatehtmlFor/idpairs. A duplicatedid, an option list built from the wrongfield, 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
900592bby building and running the suite locally(
npm run build:e2e:coverage, thennode tests/tools/e2e-coverage-run.mjs init,npm run test:e2e:coveragewithE2E_COVERAGE_DIR/E2E_COVERAGE_RUN_IDset, thenseal), and rendering thereport with
--build build.End-to-end coverage, workflowValidate repository, run37164361552
attempt 1, revision
900592b; artifacte2e-coverage(id 11289266192),manifest
runId 37164361552-1,status: passed,sealedAt 2026-10-04T00:19:14Z.report.txtputssrc/components/ArchitectureFilters/index.jsat 100.00% lines / 89.19%regions, uncovered region lines
[33, 36, 142, 163];src filesat80.98% (379/468 regions).
here, 300 passed. The same file renders at 100.00% lines / 100.00%
regions, no uncovered regions;
src files81.74% (385/471 regions).npm run check:formatandnpx eslint tests/e2e/interactions.spec.jspass.Unit coverage is unchanged and not involved: at the same revision
npm run test:unit:coveragealready 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.jsonly — no production code, no datafixture, 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 thetests/e2e/fixtures/**overlays withdata-variants.spec.js/data-fixtures.spec.js, and none of them referenceArchitectureFiltersorinteractions.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