Skip to content

test: open a logo-less organization's member profile - #1145

Closed
hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-member-profile-logo-fallback
Closed

hivecommons-hive[bot] wants to merge 1 commit into
mainfrom
quality/test-member-profile-logo-fallback

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds one file: tests/e2e/member-profile-logo-fallback.spec.js.

src/components/MemberDirectory/MemberProfile.js resolves an organization's
logo before it knows whether there is one, and renders initials when there is
not:

10   const logoUrl = useBaseUrl(member.logo || '');
...
35             {member.logo ? (<img ... />) : (<span className={styles.initialsLarge}>…)}

MemberCard.js carries the identical member.logo || '' on its own line 10 and
the browser reaches it, because the directory grid renders every card at once
and some organizations have no logo. The dialog is different: it mounts only for
the one organization whose card was clicked, and every existing spec clicks one
that has a logo — tests/e2e/interactions.spec.js:154 opens BlackRock, and
tests/e2e/data-fixtures.spec.js:169 reads the fixture organization's card
without ever opening it.

Two paired cases: the logo-less organization's profile must render the initials
stage with no img, and an organization that has a logo must render the img
with an empty stage otherwise. Pairing them is what makes the assertion evidence
that the ternary switched, rather than that every profile renders the same
stage — the convention tests/e2e/data-variants.spec.js states in its header.

This is an additive case, not a build swap: the overlay in
tests/e2e/fixtures/data/members.json already appends one organization with
"logo": null, so the hundred-odd organizations that do have logos keep
rendering and both arms are reachable in the same build. No variant build and
no new fixture are needed.

What this does not do

The region does not leave the uncovered list, and that was measured rather than
assumed. A report rendered over a run containing only these two cases still
names line 10:

src/components/MemberDirectory/MemberProfile.js | 100.00 | 90.00 |  | 10 15

Region dump from the instrumented reporter: key 10:40:10:48 is count 0 in
every script carrying the module both before and after, and 35:24:38:15 (the
initials arm) is count 0 as well — it stays off the uncovered list only because
the reporter's phantom-region filter drops it. This is the region-attribution
problem tracked in #1066 and #1079. The spec is therefore stated as behaviour,
not as a coverage claim.

Verification

All run locally at 7ab301e + this diff, on a checkout with Chromium's system
libraries supplied:

  • npm run test:unit — 1966 passed, 0 failed.
  • npm run build:e2e:coverage then the full coverage suite (local-2:
    node tests/tools/e2e-coverage-run.mjs init, E2E_COVERAGE_DIR/
    E2E_COVERAGE_RUN_ID exported, npm run test:e2e:coverage) — 324 passed,
    0 failed
    , against 321 passed on the unmodified tree (local-1).
  • npm run report:e2e:coverage -- --check-source 100 --check-source-regions 80 --require-source-files over local-2 — ok; src files | 100.00 | 91.25 | 2099/2099 lines | 417/457 regions, well clear of the gate. The denominator
    moves with the scripts a run captures ([quality] e2e region union does not fold single-line '||' fallback arms across the real and variant builds, so correct variant tests lower the gate #1066), so the percentage is 91.25
    against 91.41 on the unmodified tree while two more regions are covered.
  • npx prettier --check and npx eslint on the new file — clean.

Scope

Only tests/**, one new file, nothing edited. No production code, no workflow
file. Disjoint from the open hold-gated PRs: #1110 owns
tests/e2e/data-fixtures.spec.js, tests/tools/e2e-data-fixtures.cjs and
tests/e2e/fixtures/data/**; #1104 owns
tests/e2e/fixtures/data-variants/members.json; #1120 owns
tests/e2e/dialog-non-dismissing.spec.js and claims MemberProfile.js line 15,
a different arm from line 10; #1142 owns tests/tools/e2e-coverage-report.mjs.
This PR touches none of them.

Related Issue

Closes #1144


Human review required.

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

MemberProfile mounts only for the organization whose card was clicked, and
every existing spec clicks one that has a logo, so useBaseUrl(member.logo ||
'') at line 10 and the initials-large arm at lines 35-41 are never driven in
a browser. The overlay in tests/e2e/fixtures/data/members.json already
appends an organization with a null logo, so this is an additive case: the
organizations that do have logos keep rendering and both arms are reachable
in the same build.

Closes #1144

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@hivecommons-hive hivecommons-hive Bot added the hold label Oct 7, 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 closed this Oct 7, 2026
@hivecommons-hive
hivecommons-hive Bot deleted the quality/test-member-profile-logo-fallback branch October 7, 2026 05:23
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Retracting this PR: it is a duplicate, and the finding it rests on is wrong.

tests/e2e/member-directory.spec.js has been on main all along and already
does exactly what this PR adds:

  • member-directory.spec.js:38 selects members.find((member) => !member.logo)
    from data/members.json at run time;
  • :55 "shows the member initials in place of a logo image" opens that
    organization's dialog, asserts span[class^="initialsLarge_"] renders and
    stage.locator('img') is toHaveCount(0);
  • :94 "renders a logo image for a member that has one" is the paired case.

It is not coverage-gated, so it runs in the gating End-to-end tests job as
well as End-to-end coverage. The logo-less dialog is therefore driven in a
browser on every run, and the claim in this PR's body that "nothing drives the
logo-less dialog" is false.

What remains true is only the part this PR already conceded: region
10:40:10:48 stays at count 0 regardless. That is not a coverage gap at all —
it is precisely the region-attribution defect #1079 already records, where it is
listed as the first of three demonstrably-executed arms, citing this same spec
as the proof it executes.

My error was selecting work from the open-PR file lists and the uncovered-region
table without first reading the specs already in tests/e2e/. Nothing here needs
to land.

Closing; the branch is deleted. Issue #1144 is closed as invalid for the same
reason.


🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5n31 | SHA: 7ab301e

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

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] MemberProfile's logo-less arm is never opened in a browser

0 participants