A whole lot of stuff

This commit is contained in:
Courtney Arnold 2026-08-18 11:04:58 -05:00
parent faf319322a
commit ad850d2be6
50 changed files with 3013 additions and 213 deletions

View file

@ -61,4 +61,43 @@ void main() {
// already-persisted user settings by renaming it there.
expect(prefs.getString('theme_mode'), 'dark');
});
group('Estimated Fuel Refund toggle', () {
testWidgets('off by default, flips on and persists when tapped', (tester) async {
final appState = AppState()..isLoading = false;
await tester.pumpWidget(
ChangeNotifierProvider.value(
value: appState,
child: const MaterialApp(home: UiSettingsScreen()),
),
);
expect(appState.showEstimatedFuelRefund, isFalse);
expect(tester.widget<SwitchListTile>(find.byType(SwitchListTile)).value, isFalse);
await tester.tap(find.text('Estimated Fuel Refund'));
await tester.pumpAndSettle();
expect(appState.showEstimatedFuelRefund, isTrue);
final prefs = await SharedPreferences.getInstance();
expect(prefs.getBool('show_estimated_fuel_refund'), isTrue);
});
testWidgets('explanation mentions the Missouri Highway Fuel Tax Refund and the current rate',
(tester) async {
final appState = AppState()..isLoading = false;
await tester.pumpWidget(
ChangeNotifierProvider.value(
value: appState,
child: const MaterialApp(home: UiSettingsScreen()),
),
);
expect(find.textContaining('Missouri Highway Fuel Tax Refund'), findsOneWidget);
expect(find.textContaining('current rate'), findsOneWidget);
});
});
}