Skip to content

test(oxygen-ui): add unit tests for AppBreadcrumbs component - #574

Open
epunmanula wants to merge 3 commits into
wso2:mainfrom
epunmanula:test-app-breadcrumbs
Open

test(oxygen-ui): add unit tests for AppBreadcrumbs component#574
epunmanula wants to merge 3 commits into
wso2:mainfrom
epunmanula:test-app-breadcrumbs

Conversation

@epunmanula

@epunmanula epunmanula commented Aug 8, 2026

Copy link
Copy Markdown

Purpose

Added comprehensive unit tests for the AppBreadcrumbs component using @testing-library/react and vitest.

Test Coverage

  • Default rendering: Verifies standard breadcrumb items render properly without errors.
  • Custom props: Tests maxItems truncation behavior (ellipsis display) and custom sx prop styling.
  • Click & Keyboard events: Ensures onClick callbacks trigger properly on mouse clicks and keyboard (Enter, Space) interactions.
  • Accessibility: Validates ARIA attributes (aria-label="breadcrumb", role="button", tabIndex="0").

Related Issues

  • N/A

Related PRs

  • N/A

Checklist

  • Followed the CONTRIBUTING guidelines.
  • Manual test round performed and verified.
  • Documentation provided. (Add links if there are any)
  • Unit tests provided. (Add links if there are any)
  • Storybook stories updated/added (if applicable)

Security checks

@coderabbitai

coderabbitai Bot commented Aug 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7e0152ca-7158-436b-8446-6839d9b1f3a3

📥 Commits

Reviewing files that changed from the base of the PR and between d355e5b and dfc021f.

📒 Files selected for processing (3)
  • README.md
  • packages/oxygen-ui/src/components/AppBreadcrumbs/AppBreadcrumbs.test.tsx
  • packages/oxygen-ui/src/components/AppBreadcrumbs/AppBreadcrumbs.tsx

📝 Walkthrough

Summary

  • Added comprehensive unit tests for AppBreadcrumbs.
  • Covered rendering, truncation, hidden-item menus, custom sx styling, mouse clicks, keyboard activation, and accessibility attributes.
  • Removed an unused callback parameter.
  • Corrected grammar and wording in README.md.

Walkthrough

The README build instruction and license statement were corrected. The AppBreadcrumbs component removed an unused callback parameter. New tests cover rendering, mouse and keyboard activation, truncation, hidden-item interaction, accessibility attributes, and custom sx styling.

Suggested reviewers: jeradrutnam, brionmario

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding unit tests for the AppBreadcrumbs component.
Description check ✅ Passed The description includes the required sections and clearly documents the test coverage, checklist, and security checks.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request shows signs of AI-generated slop (redundant_comments, trivial_assertion). It has been flagged by CodeRabbit slop detection and should be reviewed carefully.

@CLAassistant

CLAassistant commented Aug 8, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants