Skip to content

test: cover DocsProvider, MobileHeader and SidebarFooter behavior - #259

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-docs-provider-chrome
Oct 7, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
quality/test-docs-provider-chrome

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Test Improvement

Adds src/__tests__/DocsProvider.behavior.test.tsx (18 tests) covering the docs chrome state layer and the two widgets that drive it:

  • DocsProvider — bannerDismissed seeded from localStorage (and non-'true' values ignored), dismissBanner persists while the raw setter does not, toggleMenu/toggleSidebar/setters, toggleNavCollapsed add/remove without mutating the previous set, navInitialized ref, and the useDocsMenu outside-provider error.
  • MobileHeader — breadcrumb for /docs/introduction, kebab/snake title-casing, non-/docs/ fallback; clicking dismisses the banner and calls onToggleSidebar.
  • SidebarFooter — light→dark and dark→light setTheme calls in full and slim variants, isMobile hides the collapse button, and server-rendered pre-mount placeholders (via renderToStaticMarkup, where the mount effect never runs).

Coverage at main@7227ce4 → this branch (npx vitest run --coverage):

File Lines Funcs Branch
DocsProvider.tsx 85.7 → 100% 90 → 100% 62.5 → 87.5%
MobileSidebarToggle.tsx 86.7 → 100% 80 → 100% 50 → 100%
SidebarFooter.tsx 86.7 → 100% 50 → 100% 65.4 → 96.2%
All files 88.01 → 88.26% 87.88 → 88.54% 81.89 → 82.39%

Test-only change; no production code or changelog fragment (per changelog.d/README.md, test-only changes need none). eslint, prettier --check, and tsc --noEmit are clean.

Closes #258


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

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

Adds a behavior suite for the docs chrome state layer and its two small
driver widgets: localStorage-backed banner dismissal and read-back,
menu/sidebar toggles, nav-collapse set, the useDocsMenu outside-provider
guard, mobile breadcrumb derivation and dismiss-then-toggle wiring, and
the theme toggle in both SidebarFooter variants including the isMobile
collapse-button suppression and server-rendered pre-mount placeholders.

DocsProvider 85.7 -> 100% lines, MobileSidebarToggle 86.7 -> 100%,
SidebarFooter 86.7 -> 100% (functions 50 -> 100%).

Closes #258

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 7, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for hivecommons-docs ready!

Name Link
🔨 Latest commit 058372c
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6ac5ba1a6f9e1e0008e33b1d
😎 Deploy Preview https://deploy-preview-259--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 merged commit 4bc2077 into main Oct 7, 2026
10 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the quality/test-docs-provider-chrome branch October 7, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] DocsProvider/MobileHeader/SidebarFooter: banner persistence, theme toggle and breadcrumb paths untested

0 participants