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
- Fork the repo and create a branch
git checkout -b test/testing-breadcrumb
- Implement changes
- Test and commit
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.
Test the Breadcrumb landmark, links, and aria-current
Description
src/components/Breadcrumb.tsxrenders a<nav aria-label="Breadcrumb">with an ordered list where items carrying anhrefbecome links and the final/hrefless item getsaria-current="page", witharia-hiddenseparators between items — andjest.config.tslocks 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
hrefrender as links and items without render asaria-current="page"spans.aria-hidden, and not after the last item.Breadcrumbnavigation landmark has its accessible name.Suggested execution
git checkout -b test/testing-breadcrumbsrc/components/__tests__/Breadcrumb.test.tsx.src/components/Breadcrumb.tsxif missing.getByRole('navigation', { name: 'Breadcrumb' })and link/current queries.Test and commit
npm run lint,npm run typecheck, andnpm test.npm testoutput and coverage for the component.Example commit message
test(components): cover Breadcrumb links, separators, and aria-currentGuidelines
Breadcrumb.tsx.Community & contribution rewards