Repository navigation
Look for the cancelled-screenshots toast as it shows - #402
Conversation
"only Stop ends a capture" failed on and off on Windows: the toast is shown while the test waits in real time for the dialog to close, so its 3-second timer runs on real time, and a slow run let it close before the check. The test now notes the toast while it waits, as the user would see it.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Observe cancellation toast during close test/page_screenshots_test.dart |
The test pumps real and test time while the dialog closes, records whether the cancellation toast appears, and asserts that it was observed during the wait. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Other
Possibly related PRs
- SunkenInTime/icarus#399: Reports the same screenshot test failure; this PR changes its toast timing check.
- SunkenInTime/icarus#395: Reports a failure in the same screenshot test; this PR changes its timing check.
Merge Risk: 
Minimal · up to 85a78
-
The test-only timing change has no identified merge-blocking risk.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Its timer runs on real time, so on CI it fired after the test and removed the toast from a torn-down tree (AnimationController disposed twice).
Dismissing it at the end was too late: its closing timer runs on real time and could already have started removing it, which finished after the test on a torn-down tree. Taken away when it shows, its removal runs on the test's clock and is done before the test ends.
page_screenshots_test"only Stop ends a capture" failed on and off on Windows: in CI'swindows-testlane and locally, including twice in a row on main on Oct 20. It came up again on #399, whose extra work per frame made it fail more often (locally 2 out of 3 runs on that stack, 3 out of 3 passes on main).Cause: the "Screenshots cancelled." toast is shown while the test waits in real time (
runAsync) for the dialog to close, so the toast's 3-second auto-close timer runs on real time. That breaks the test in two ways:Fix: the test takes the toast away the moment it sees it, while waiting for the dialog to close. That stops its real-time timer, so its removal runs on the test's clock and finishes inside the test. The app is unchanged.
Checked:
ci: test desktop