test(frontend): stop two Dashboard tests flaking under CI load (#645) #652
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/645-dashboard-flakes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Test-only. Fixes the two failures that turned Renovate #639 (a Python dependency bump) red in run 1087, plus a third problem found while verifying.
makes the next-session countdown a link to that session. The countdown renders only after two chained async loads: campaigns, then each card's next session. The default 1 sfindBywait isn't always enough on a loaded shared runner, so it now has{ timeout: 5000 }. That's a ceiling, not a delay; a fast run is unaffected.serves next-session from the client cache on a remount within the TTL. It assertedfetchNextSessionwas called exactly 4 times, but how often a card's effect runs depends on React's scheduling, and CI saw 5. It's now>= 4. The real claim,global.fetchstaying at 2 because the cache served the remount, is unchanged.listCampaignTrash() … reading 'then'). #644 added alistCampaignTrash()call to the Dashboard, and this suite'sbeforeEachnever mocked it. The test passed only because an earlier test in the file left the mock set. It's now set in thebeforeEach.Verification
Dashboard.test.jsx: 21 passed. The dedup test also passes when run alone.cacheable = falseinapi/client.js), the dedup test, run alone, fails on the fetch count:expected "spy" to be called 2 times, but got 4 timesat:318. So the relaxed call count didn't make the test vacuous.Once this merges, Renovate #639 needs a fresh run (tick its rebase box).
Closes #645
🤖 Generated with Claude Code