checkpoint: focus seed 1.0.1 localized dev switch

This commit is contained in:
2026-06-11 23:35:49 +08:00
parent c51abdfb73
commit d06dc35ee6
72 changed files with 6155 additions and 1390 deletions
+25
View File
@@ -0,0 +1,25 @@
import 'package:flutter_test/flutter_test.dart';
import 'package:focus_seed/src/core/ambience.dart';
void main() {
group('dayPhaseFor', () {
test('uses the documented local time boundaries', () {
expect(dayPhaseFor(DateTime(2026, 6, 11, 4, 59)), DayPhase.night);
expect(dayPhaseFor(DateTime(2026, 6, 11, 5)), DayPhase.dawn);
expect(dayPhaseFor(DateTime(2026, 6, 11, 10)), DayPhase.day);
expect(dayPhaseFor(DateTime(2026, 6, 11, 17)), DayPhase.dusk);
expect(dayPhaseFor(DateTime(2026, 6, 11, 21)), DayPhase.night);
});
test('schedules the next boundary without background polling', () {
expect(
nextDayPhaseBoundary(DateTime(2026, 6, 11, 21, 15)),
DateTime(2026, 6, 12, 5),
);
expect(
nextDayPhaseBoundary(DateTime(2026, 6, 11, 8)),
DateTime(2026, 6, 11, 10),
);
});
});
}