Repository navigation
Fix flaky ConvertToEventProvidedTicketModal test - #12099
Merged
Merged
Conversation
The ticket types load through a suspense query once an event is chosen, and React can lose the update when a component suspends inside the act scope of a user event (the unguarded category in agent-docs/frontend-testing.md). The test failed on CI roughly two runs in three, even with a longer timeout. Put the data in the cache up front, as the guide recommends, so nothing suspends. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd
Contributor
Code Coverage Report: Only Changed Files listed
Minimum allowed coverage is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes a flaky test on
main:ConvertToEventProvidedTicketModal› "needs both an event and a ticket type before it can convert" (added in #12094) has been failing on CI roughly two runs in three, which is currently failing the Vitest check on unrelated PRs (#12097, #12098).The ticket types load through a suspense query once an event is chosen. React can lose that update when a component suspends inside the
actscope of a user event (the categoryagent-docs/frontend-testing.mdalready warns about, and the CI log shows "A component suspended inside anactscope, but theactcall was not awaited"). A longer timeout (#12094's follow-up) didn't help: it timed out at 5s. The test now puts the query data in the Apollo cache up front, as the guide recommends, so nothing suspends. It passed 3 of 3 runs locally with no suspense warning.Test-only change.
🤖 Generated with Claude Code
https://claude.ai/code/session_013mDr1nhgyzST2iPzCzMcCd