Repository navigation
test: cover the member directory's four undriven toolbar controls - #1060
Merged
Merged
Conversation
The directory toolbar on /community/members carries six controls and a browser had driven only two: interactions.spec.js fills the search box and selects a membership status. The industry select, the project select and the Has architecture / Has award toggles were reached by the unit suite's fake DOM alone, which cannot vouch for a control being wired to the setter its label claims. Adds a facet-filtering block giving each of the four the same select-or-check / narrow / clear cycle the membership select already gets, covering src/components/MemberDirectory/index.js lines 31, 34, 40, 43, 101, 140, 155 and 163. No data overlay is needed: each control narrows strictly against the shipped data, so both arms of each guard run, and the facet value is read off the page's own option list rather than a data file. Closes #1059 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 5, 2026
mrbobbytables
added a commit
to mrbobbytables/endusers
that referenced
this pull request
Oct 8, 2026
The last completion criterion of cncf#1079: re-derive --check-source-regions from the corrected number after cncf#1163 folded the crossing-region source-map drift the issue measured. A full local run of the pipeline (build:e2e:coverage, 340 passing specs, seal, report) at main measures source regions at 95.22% (438/460), up from the 80.98% that set the current floor of 91's predecessor. The three regions cncf#1079 proved executed (MemberProfile.js 10 and 15, MemberCard.js 75) now fold, and MemberDirectory/index.js 31/34/40/43 are covered for real since cncf#1060 merged. Following the established ratchet pattern (measured 91.63 -> floor 91 in cncf#1105), the floor becomes floor(95.22) = 95. Updated in the same change, as tests/e2e-coverage-gate.test.mjs instructs: the workflow gate, the FLOORS guard and its fixtures, the workflow-scripts gating assertion, and the CONTRIBUTING.md recipe. Closes cncf#1079 Signed-off-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: mrbobbytables <mrbobbytables@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
The member directory toolbar on
/community/memberscarries six controls — asearch box, three
<select>s and two checkboxes — and a browser had driven onlytwo of them.
tests/e2e/interactions.spec.js'smember directory filteringblock fills Search organizations by name and selects a Filter by
membership status; nothing in
tests/e2e/**touched Filter by industry,Filter by CNCF project, Has architecture or Has award.
This adds a
member directory facet filteringblock totests/e2e/member-directory.spec.jsgiving each of the four the sameselect-or-check / narrow / clear cycle. Each test asserts the control starts
empty or unchecked, drives it, asserts the shown count lands strictly
between 1 and the total, clicks Clear filters, and asserts both the count
and the control return to their starting state. The strict upper bound is what
proves the
return falsearm ran rather than only the arm that renderseverything.
What this reaches
Eight regions of
src/components/MemberDirectory/index.jsthat only the unitsuite's fake DOM reached:
if (industry && !member.industries.includes(industry)) {if (project && !member.projects.includes(project)) {if (hasArchitecture && member.architectures.length === 0) {if (hasAward && member.awards.length === 0) {onChange={(event) => setIndustry(event.target.value)}onChange={(event) => setProject(event.target.value)}onChange={(event) => setHasArchitecture(event.target.checked)}onChange={(event) => setHasAward(event.target.checked)}101, 140, 155 and 163 are the wiring a fake DOM cannot vouch for: each control
is bound to its own
useStatesetter through its ownhtmlFor/idpair or itsown
checkedprop. A duplicatedid, an option list built from the wrongfield, or a handler wired to the neighbouring setter leaves the shipped toolbar
inert on that control while the search and membership tests stay green.
No data overlay
In
data/members.jsonat this revision the alphabetically-first industry(
Cloud) and project (Agones) each match exactly 1 of 101 members, 7 memberscarry an architecture and 13 carry an award — every control narrows strictly.
The facet value is read off the page's own
<option>list at index 1 (index 0is the "All ..." placeholder) rather than from a data file, so the test does not
care whether the build used the real document or the coverage overlay, and a
regenerated
members.jsoncannot silently stop exercising the branch.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,then
seal), and rendering the report 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/MemberDirectory/index.jsat 100.00% lines / 80.95%regions, uncovered region lines
[31, 34, 40, 43, 101, 140, 155, 163];src filesat 80.98% (379/468 regions).here, 302 passed. The same file renders at 100.00% lines / 100.00%
regions, no uncovered regions;
src files82.77% (389/470 regions).(The region denominator drifts by a region or two between runs for the reason
test: fold out phantom e2e coverage regions over covered lines #1051 documents; the per-file result does not.)
npm run check:formatpasses. Unit coverage is unchanged and not involved: atthe same revision
npm run test:unit:coveragealready reports this file at100.00% lines / 100.00% regions, which is why the gap was end-to-end only.
Scope
Touches
tests/e2e/member-directory.spec.jsonly — no production code, no datafixture, no coverage tooling. Disjoint from every open hold-gated PR: #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, #1058 is intests/e2e/interactions.spec.jsfor theseparate
ArchitectureFilterscomponent, and #1039/#1042/#1044/#1048/#1050/#1056are elsewhere entirely. No other open PR references
MemberDirectoryormember-directory.spec.js.Related Issue
Closes #1059
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-opus-5 copilot=1.0.88