Skip to content

fix(test): Fix flaky customerDetails billing permissions test#111838

Draft
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-customer-details-spec
Draft

fix(test): Fix flaky customerDetails billing permissions test#111838
JoshuaKGoldberg wants to merge 1 commit intomasterfrom
fix/flaky-customer-details-spec

Conversation

@JoshuaKGoldberg
Copy link
Copy Markdown
Member

Fix flaky test Customer Details › change legacy soft cap › renders disabled without billing.admin permissions in customerDetails.spec.tsx.

The test hovers over a disabled CompactSelect menu item and asserts that a tooltip with "Requires billing admin permissions." appears. MenuListItem renders tooltips with a default 500ms delay (tooltipOptions = {delay: 500}), so the tooltip text only appears in the DOM after that delay plus React render time. Under CI load, this combined time can exceed findByText's default 1000ms timeout, causing intermittent failures.

The fix extends the findByText timeout to 2000ms, giving comfortable headroom for the 500ms tooltip delay plus render time even under heavy CI load.

Made with Cursor

The tooltip on disabled menu items in CompactSelect/MenuListItem has a
500ms delay before appearing. Under CI load, this delay plus React
render time can exceed findByText's default 1000ms timeout, causing
intermittent failures. Extend the timeout to 2000ms.

Co-Authored-By: Claude Sonnet 4 <[email protected]>
Made-with: Cursor
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant