Skip to content

Add tests for the Breadcrumb separator, links, and current-page marking #173

Description

@mikewheeleer

Test the Breadcrumb landmark, links, and aria-current

Description

src/components/Breadcrumb.tsx renders a <nav aria-label="Breadcrumb"> with an ordered list where items carrying an href become links and the final/hrefless item gets aria-current="page", with aria-hidden separators between items — and jest.config.ts locks it at 100% coverage, but there is no visible test file. This issue adds an explicit suite covering the link/current and separator logic.

Requirements and context

  • Repository scope: Agentpay-Org/Agentpay-frontend only.
  • Assert items with href render as links and items without render as aria-current="page" spans.
  • Assert separators are rendered between items and marked aria-hidden, and not after the last item.
  • Assert the Breadcrumb navigation landmark has its accessible name.

Suggested execution

Test and commit

  • Run npm run lint, npm run typecheck, and npm test.
  • Cover edge cases: single item, multiple items, all-linked, and a trailing current item.
  • Include the npm test output and coverage for the component.

Example commit message

test(components): cover Breadcrumb links, separators, and aria-current

Guidelines

  • Minimum 95 percent test coverage for Breadcrumb.tsx.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the AgentPay community on Discord for questions, reviews, and faster merges: https://discord.gg/eXvRKkgcv
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions