test: cover the failed-update branch of the filter save sheet#3580
Conversation
codecov/patch on #3579 came back at 98.98% against a 99% target — one line: the choice page's error text, whose colour that PR moved to alert.error.ink. The line predates the change, but it is in the diff, so it owes a test. Drives the only path that sets the page's error state — onUpdateSavedFilter throwing — and pins what a failure has to preserve: the sheet stays open rather than dismissing and discarding the draft, the failure is stated in ink (the AA-safe step, since the fill strength measures 4.25:1 on a dark sheet), and the button is pressable again afterwards rather than wedged by a stuck _updating flag.
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds widget coverage for failed saved-filter updates, including retained modal state, alert styling, visible errors, and retry behavior. ChangesSaved-filter update failure
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3580 +/- ##
=======================================
Coverage 99.15% 99.15%
=======================================
Files 1783 1783
Lines 130638 130638
=======================================
+ Hits 129529 129538 +9
+ Misses 1109 1100 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Closes the one line
codecov/patchflagged on #3579 (98.98% against a 99% target).The miss is
design_system_filter_modal.dart:454— the error text on the savesheet's choice page, whose colour #3579 moved from
alert.error.defaultColortoalert.error.ink. The line predates that change and was never covered, but itlands in the diff, so it owes a test.
The only path that sets the page's error state is
onUpdateSavedFilterthrowing. The new test drives that and pins what a failure has to preserve:
draft the user was trying to save
alert.error.ink, not the fill strength, since thisis body-size text and the
defaultstep measures 4.25:1 on a dark sheet_updatingflag left set on the error pathLocal coverage confirms line 454 is now hit; the remaining uncovered lines in
that file are pre-existing and outside #3579's diff.
No production changes.
Summary by CodeRabbit