fix: flush the SCIM revoke Popconfirm in act() to stop CI timeouts - #722
Merged
Conversation
The revoke test polled findByRole across the whole ScimConfigPage while the Popconfirm portal mounted, re-running an expensive role scan on every motion mutation: 8.3s on CI and >15s on a slow runner, which failed main. Open the popup inside act() and look the trigger up by aria-label instead. Local: 4.44s -> 0.31s.
Contributor
Contributor
Coverage Report for Frontend Coverage (frontend)
File CoverageNo changed files found. |
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.
mainwent red on run 31801298636 (merge of #721). Every area job passed except Frontend, where exactly one test blew the 15s budget:Not a product bug — a slow test that ran out of headroom on a slower runner. It was already the second-slowest test in the suite: 8 275 ms on #721's green run, and the whole main run was ~1.8x slower than that one.
Why it was slow
await screen.findByRole('button', { name: 'Revoke' })polled a whole-document RTL role scan while AntD's Popconfirm portal mounted and animated, so the cost was (number of scans during motion) x (scan cost, proportional to DOM size) — andScimConfigPageis a full page (form + 3 Selects + token table + 2 modals). The same shape is cheap on a small component (ApiKeysSectionrevoke = 0.51 s); the expense of role queries over a rendered AntD table under jsdom is already documented atRolesPage.test.tsx:115.Fix
Open the Popconfirm inside
act()— the pattern already used for AntD portal confirms inQueryDetailPage.test.tsx:328-350— so the OK button exists on the first scan, and look the trigger up byaria-labelinstead of computing accessible names for every button. The assertion (revokeScimToken('tok-1')only fires after confirming) is unchanged.Local: 4.44 s → 0.31 s, in line with the file's other five tests (0.01–0.31 s). Full suite green: 1480 passed, plus
lint/typecheck/build.No global
testTimeoutbump and no vitestretry: the next-slowest test still has 2x headroom, and both would only delay detection of the next real problem.