Repository navigation
test: wait for the state two flaky assertions depend on - #1321
Merged
Merged
Conversation
ObjectAuthorizeDrawer: the bundle button stays disabled until the grant list resolves, but the form heading the test waited for renders earlier, so the click was sometimes dropped on a disabled button. ConnectorOptionsEditor: the editor reopens its card in an effect that runs after the commit showing the error class, so asserting right after that class appeared could run before the effect. Co-Authored-By: Claude <noreply@anthropic.com>
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.
Pull Request
What Changed
ObjectAuthorizeDrawer.test.tsx: wait for the bundle button to be enabled before clicking itConnectorOptionsEditor.test.tsx: wait for the options card to reopen instead of asserting it immediatelyWhy
ci-qualityonmainfailed in 4 of the last 8 completed full runs, each time on a different test. Three of the five failing tests were 10s timeouts caused by slow style computation and stopped after test: keep antd styles out of jsdom to speed up scene tests #1317. The other two are races in the tests themselves and failed again onmainafter test: keep antd styles out of jsdom to speed up scene tests #1317 (run 43042886139); each had also failed before it (runs 42999553670, 42964576332 and 42981386145).How
ObjectAuthorizeDrawer: the "new grant" heading renders before the grant list resolves, while the bundle button isdisableduntil it does. The test clicked as soon as the heading appeared, so under load the click landed on a disabled button andaria-pressednever becametrue. Delaying the mocked grant list by 80ms reproduces the exact CI failure; with the added wait the test passes under the same delay.ConnectorOptionsEditor: the editor setsdetails.openin auseEffectkeyed on the form item's errors. React runs that effect after the commit that already shows.ant-form-item-has-error, so the assertion right after waiting for that class could run first. Not reproduced locally; the order was confirmed by recording DOM mutations (theopenattribute lands after the error class).Testing
Test notes:
tsc -b,vite build,pnpm audit --prod.Risk & Rollback
ObjectAuthorizeDrawer.test.tsxalso start from the same heading, but they await another element before touching a load-gated control and have not failed on CI; they are unchanged.Additional Notes
mainwere examined.🤖 Generated with Claude Code