Skip to content

test: cover useNavDropdowns guard branches and ratchet coverage thresholds - #357

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-navdropdowns-guards-ratchet
Oct 17, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-navdropdowns-guards-ratchet

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

  • Adds src/__tests__/useNavDropdowns.guards.test.tsx covering the ten defensive branches in src/components/navbar/useNavDropdowns.ts that the existing suite left untouched (sibling [data-dropdown] without a menu, unknown dropdown name, menu without a [data-dropdown-button], language switcher without a <button>, listbox visible with no prior hover, text nodes through the MutationObserver, listbox mouseenter with no pending hide). The hook goes from 85.5% to 100% branch coverage.
  • Ratchets vitest.config.ts thresholds from 97/97/92/96 to 98/98/95/97 (same ~2pt margin as test: cover DocsFooter back-to-top and ratchet coverage thresholds #309) and updates the "Measured at the last ratchet" comment.

Closes #356

Validation

  • npx vitest run --coverage on this branch: 107 files, 1113 tests passed; totals 99.69 lines / 100 functions / 97.19 branches / 99.15 statements, above the new thresholds.
  • npx eslint and prettier --check on the new test file: clean.
  • Test-only change, so no changelog.d fragment (per changelog.d/README.md).

Filed by quality agent (ACMM L4/L6 — full mode)

— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88

…holds

Exercise the ten defensive branches in useNavDropdowns (sibling
[data-dropdown] without a menu, unknown dropdown name, menu without a
button, language switcher without a button, listbox visible with no prior
hover, text nodes through the MutationObserver, listbox enter with no
pending hide). The hook now reaches 100% branch coverage.

Raise coverage.thresholds from 97/97/92/96 to 98/98/95/97; measured on
main @ 996033f with this change is 99.69/100/97.19/99.15 (1113 tests).

Closes #356

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <quality@hive.kubestellar.io>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for hivecommons-docs ready!

Name Link
🔨 Latest commit d03365b
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6ad37309c33cbf726c902351
😎 Deploy Preview https://deploy-preview-357--hivecommons-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/untrusted Author has no registry profile or verified hive claim (or is revoked); never auto-merged stage/050-review-pending Review swarm requested; awaiting a verdict for the current head role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) and removed dco-signoff: yes role/untrusted Author has no registry profile or verified hive claim (or is revoked); never auto-merged role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Oct 17, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 9a1aab7 into main Oct 17, 2026
10 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-navdropdowns-guards-ratchet branch October 17, 2026 13:23
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#357d03365b` sha256:accb145ec0b94ee61e6153ae11437d953a71cb4cea773f41e486c03124917fff — download from the dashboard or `hivectl review evidence #357`.

@hivecommons-hive hivecommons-hive Bot removed role/untrusted Author has no registry profile or verified hive claim (or is revoked); never auto-merged stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] Ratchet vitest coverage thresholds (97/97/92/96 vs measured 99.7/100/96.7/99.2) and cover useNavDropdowns guard branches

0 participants