style: apply dart formatting fixes across lib/ and test/
11 files had formatting inconsistencies that caused the --set-exit-if-changed gate to fail. Automated formatting via dart format now passes cleanly.
This commit is contained in:
@@ -54,46 +54,51 @@ void main() {
|
||||
|
||||
test('does not double-convert timestamps with explicit UTC designator', () {
|
||||
const String utcStamp = '2026-05-15T03:00:00Z';
|
||||
final String expected = DateFormat('jm').format(DateTime.parse(utcStamp).toLocal());
|
||||
final String expected = DateFormat(
|
||||
'jm',
|
||||
).format(DateTime.parse(utcStamp).toLocal());
|
||||
|
||||
expect(
|
||||
formatStartingTime(
|
||||
utcStamp,
|
||||
sourceTimezone: 'America/Los_Angeles',
|
||||
),
|
||||
formatStartingTime(utcStamp, sourceTimezone: 'America/Los_Angeles'),
|
||||
expected,
|
||||
);
|
||||
});
|
||||
|
||||
test('keeps wall-clock time when local matches source zone for naive input', () {
|
||||
const String sourceTime = '2026-05-14 20:00:00';
|
||||
const String sourceZone = 'America/Los_Angeles';
|
||||
test(
|
||||
'keeps wall-clock time when local matches source zone for naive input',
|
||||
() {
|
||||
const String sourceTime = '2026-05-14 20:00:00';
|
||||
const String sourceZone = 'America/Los_Angeles';
|
||||
|
||||
final tz.TZDateTime source = tz.TZDateTime(
|
||||
tz.getLocation(sourceZone),
|
||||
2026,
|
||||
5,
|
||||
14,
|
||||
20,
|
||||
);
|
||||
final String expected = DateFormat('jm').format(
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
source.millisecondsSinceEpoch,
|
||||
isUtc: true,
|
||||
).toLocal(),
|
||||
);
|
||||
final tz.TZDateTime source = tz.TZDateTime(
|
||||
tz.getLocation(sourceZone),
|
||||
2026,
|
||||
5,
|
||||
14,
|
||||
20,
|
||||
);
|
||||
final String expected = DateFormat('jm').format(
|
||||
DateTime.fromMillisecondsSinceEpoch(
|
||||
source.millisecondsSinceEpoch,
|
||||
isUtc: true,
|
||||
).toLocal(),
|
||||
);
|
||||
|
||||
expect(
|
||||
formatStartingTime(sourceTime, sourceTimezone: sourceZone),
|
||||
expected,
|
||||
);
|
||||
});
|
||||
expect(
|
||||
formatStartingTime(sourceTime, sourceTimezone: sourceZone),
|
||||
expected,
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
group('formatTimeWindow', () {
|
||||
test('returns mm:ss style duration from server times', () {
|
||||
expect(
|
||||
formatTimeWindow('2026-05-15 05:18:46.000000', '2026-05-15 05:23:21.000000'),
|
||||
formatTimeWindow(
|
||||
'2026-05-15 05:18:46.000000',
|
||||
'2026-05-15 05:23:21.000000',
|
||||
),
|
||||
'04:35',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -16,7 +16,13 @@ void main() {
|
||||
await tester.pump();
|
||||
|
||||
expect(find.text('KRYZ Go!'), findsWidgets);
|
||||
expect(find.widgetWithIcon(ElevatedButton, Icons.play_arrow_rounded), findsOneWidget);
|
||||
expect(find.widgetWithIcon(ElevatedButton, Icons.stop_rounded), findsOneWidget);
|
||||
expect(
|
||||
find.widgetWithIcon(ElevatedButton, Icons.play_arrow_rounded),
|
||||
findsOneWidget,
|
||||
);
|
||||
expect(
|
||||
find.widgetWithIcon(ElevatedButton, Icons.stop_rounded),
|
||||
findsOneWidget,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user