Skip to content

test(e2e): drive the contributor membership filter in a browser - #1266

Open
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/e2e-contributor-membership-filter
Open

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/e2e-contributor-membership-filter

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Drives the member directory's contributor membership filter in a browser for
the first time. Two end-to-end cases, one branch:
matchesMembership's filter === 'contributor' arm
(src/components/MemberDirectory/utils.js:42-44).

  • tests/e2e/interactions.spec.js — selects contributor against the real
    data, asserts the result count narrows and that every surviving card carries a
    contributor label. This file's own header states why a browser case is needed
    at all: the unit suite drives these filters through a fake DOM, so a hydration
    regression leaves every unit test green while the shipped toolbar is dead. The
    existing case there drives member and unknown only. This one also runs in
    the gating "End-to-end tests" job.
  • tests/e2e/data-fixtures.spec.js — selects contributor against the
    E2E_COVERAGE=1 overlay and asserts the dual-role organization is admitted,
    then dropped under unknown. data/members.json holds no
    member-and-contributor record, so status === 'member-and-contributor' is
    unreachable against the real build; the overlay
    (tests/tools/e2e-data-fixtures.cjs) is the mechanism this repository already
    uses for that, and data-fixtures.spec.js:180 already relies on the same
    record for the card label.

No production code, no fixture data, and no new test.skip() or coverage-gated
describe — tests/e2e-coverage-describe-gate.test.mjs and
tests/e2e-data-dependent-skips.test.mjs are unaffected and pass.

Measured effect

Full local browser runs at 365e11f, chromium, E2E_COVERAGE=1, via
e2e-coverage-run.mjs init → npm run build:e2e:coverage →
npm run test:e2e:coverage → seal --status passed →
npm run report:e2e:coverage:

before (342 passed) after (344 passed)
src/components/MemberDirectory/utils.js 100.00% / 96.43% (region 43) 100.00% / 100.00%
src files aggregate 100.00% / 97.13% (643/662) 100.00% / 97.74% (650/665)

utils.js reaching 100% is the direct, attributable effect of this diff.
Smaller movements on DirectoryFreshness, PeopleFreshness and
CommunityPeople were observed between the two runs; they are reported here for
completeness and not claimed as this diff's doing.

Unit coverage is unchanged: src files | 100.00 | 100.00 | 9015/9015 lines | 2713/2713 regions both before and after, which is why the underlying finding is
filed as an end-to-end-only gap.

Disjointness

Touches tests/e2e/interactions.spec.js and tests/e2e/data-fixtures.spec.js
only. No open hold-gated pull request touches either file, nor
src/components/MemberDirectory/:
#1250 (package.json, tests/coverage-gate-thresholds.test.mjs),
#1252 (tests/e2e-coverage-source-boundary-segments.test.mjs),
#1262 (tests/uri-safety.test.mjs),
#1260 (tests/e2e-data-fixture-integrity.test.mjs),
#1249/#1255/#1264 (uri-safety and MDX image handling).
Branch cut from a fresh origin/main at 365e11f.

Related Issue

Closes #1265


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

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

The member directory's membership select ships three options and no
end-to-end case has ever selected the middle one. matchesMembership
answers it with its own branch (src/components/MemberDirectory/utils.js
:42-44), so that branch body is a zero region in the e2e report while
the unit suite covers it through a fake DOM -- which is exactly the
hydration regression tests/e2e/interactions.spec.js exists to catch.

Two cases, because the branch has two operands and only one of them is
reachable against the committed data:

* interactions.spec.js selects contributor against the real data and
  asserts every surviving card carries a contributor label. It runs in
  the gating "End-to-end tests" job as well as the coverage one.
* data-fixtures.spec.js selects contributor against the overlay, whose
  dual-role organization is the only way to reach
  status === 'member-and-contributor', and asserts the record drops out
  under a filter that must not admit it.

Measured over a full local browser run (342 then 344 passed, chromium,
E2E_COVERAGE=1, rev 365e11f): src/components/MemberDirectory/utils.js
goes from 100.00%/96.43% to 100.00%/100.00% regions, and the src files
aggregate from 97.13% to 97.74%.

Closes #1265

Signed-off-by: quality <quality@hive.kubestellar.io>
@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.

This branch has not been deployed

No deployments
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] no e2e case ever selects the contributor membership filter

0 participants