Skip to content

fix(core/menu-category): Fix unit test race condition - #2677

Closed
lzeiml wants to merge 3 commits into
mainfrom
fix/menu-category-unit-test-race-condition
Closed

fix(core/menu-category): Fix unit test race condition#2677
lzeiml wants to merge 3 commits into
mainfrom
fix/menu-category-unit-test-race-condition

Conversation

@lzeiml

@lzeiml lzeiml commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Currently this unit test sometimes fails due to a race condition. categoryButton.focus() was called without ensuring tabindex initialization for the categoryButton was complete.
This change prevents this by waiting for aria-posinset to be intialized, signaling that roving-tabindex intialization is complete.

Summary by CodeRabbit

  • Tests
    • Added a regression assertion verifying the category button’s accessible position before keyboard navigation checks.

@netlify

netlify Bot commented Jul 28, 2026

Copy link
Copy Markdown

Deploy Preview for ix-storybook ready!

Name Link
🔨 Latest commit 59c2169
🔍 Latest deploy log https://app.netlify.com/projects/ix-storybook/deploys/6a689cda90f5e5000878b0d8
😎 Deploy Preview https://deploy-preview-2677--ix-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 59c2169

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@lzeiml, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4d0035ed-a64e-4665-bc80-cee1c43c1a32

📥 Commits

Reviewing files that changed from the base of the PR and between ff4ef03 and 59c2169.

📒 Files selected for processing (1)
  • packages/core/src/components/menu-category/test/menu-category.ct.ts
📝 Walkthrough

Walkthrough

The menu-category keyboard navigation regression test now asserts that the category button has aria-posinset="1" before continuing with focus and ArrowDown checks.

Changes

Menu category accessibility

Layer / File(s) Summary
Validate category button position
packages/core/src/components/menu-category/test/menu-category.ct.ts
The regression test verifies aria-posinset="1" on the category button before keyboard navigation assertions.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • siemens/ix#2573: Updates menubar ARIA position attributes during focus and keyboard navigation.

Suggested reviewers: benjgil

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: fixing a unit test race condition in core/menu-category.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/menu-category-unit-test-race-condition

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.

@sonarqubecloud

Copy link
Copy Markdown

@lzeiml

lzeiml commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

already addressed with #2666

@lzeiml lzeiml closed this Jul 28, 2026
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.

1 participant