mirror of
https://github.com/kuhyx/wake-alarm.git
synced 2026-11-28 15:09:15 +01:00
Flutter 3.47.6; dismiss re-arm test no longer passes only on Tue-Thu
The expectation resolved the next alarm without the earned ramp set, while the app (correctly) re-arms with the minute the dismiss just earned. On a non-workday that is one minute apart, so the test failed Fri-Mon on any Flutter version. It now loads the policy exactly as the app does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FBbkN4ZB4aUPJPzR2prRan
This commit is contained in:
parent
f95cf826d2
commit
9325103f5d
@ -115,7 +115,10 @@ void main() {
|
|||||||
await AlarmPolicy.setEarlier(5, 0);
|
await AlarmPolicy.setEarlier(5, 0);
|
||||||
final answers = await pumpApp(tester);
|
final answers = await pumpApp(tester);
|
||||||
await dismiss(tester, answers);
|
await dismiss(tester, answers);
|
||||||
final next = AlarmPolicy.resolve(DateTime.now(), null);
|
// With the ramp minute this dismiss just earned: on a non-workday that is
|
||||||
|
// a minute earlier than the bare baseline, so a resolve() without the
|
||||||
|
// earned set only passed on Tue-Thu.
|
||||||
|
final next = await AlarmPolicy.load();
|
||||||
expect(
|
expect(
|
||||||
calls.lastIndexOf('armSchedule'),
|
calls.lastIndexOf('armSchedule'),
|
||||||
greaterThan(calls.indexOf('dismiss')),
|
greaterThan(calls.indexOf('dismiss')),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user