Skip to content

Conversation

@rossnelson
Copy link
Collaborator

Summary

  • Fixed flaky combobox tests that were failing due to CSS transitions

Problem

The combobox tests were failing with "Unable to find an accessible element with the role 'listbox'" because they were using getByRole which expects the element to be immediately visible. However, the Menu component applies CSS transitions (invisible scale-95 opacity-0) when closed, making the listbox technically present but not visible.

Solution

Changed from getByRole('listbox') to findByRole('listbox') which waits for the element to become visible, accounting for the CSS transition timing.

Test Plan

[ ] Run pnpm stories:test - combobox tests should pass
[ ] Verify Async Select test passes
[ ] Verify Multiselect test passes

Replace getByRole with findByRole to properly wait for the listbox
element to become visible after the CSS transition completes
@vercel
Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
holocene Ready Ready Preview Comment Sep 8, 2025 9:03pm

Fix the two remaining instances in Object Options and No Results tests
@rossnelson rossnelson merged commit 9d97488 into main Sep 8, 2025
14 of 15 checks passed
@rossnelson rossnelson deleted the fix-combobox-tests branch September 8, 2025 21:17
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.

3 participants