diff --git a/test/demo/demo_page_test.dart b/test/demo/demo_page_test.dart index 8f51079..892566e 100644 --- a/test/demo/demo_page_test.dart +++ b/test/demo/demo_page_test.dart @@ -32,8 +32,18 @@ void main() { financialDataBloc = _MockFinancialDataBloc(); when(() => themeModeCubit.state).thenReturn(ThemeMode.light); - when(() => financialDataBloc.state) - .thenReturn(const FinancialDataState()); + when(() => financialDataBloc.state).thenReturn( + FinancialDataState( + currentSavings: 123456, + savingsDataPoints: createSampleData(), + monthlySpendingLimitGoal: 1000, + transactions: [ + const Transaction(title: 'Paycheck', amount: 3000), + const Transaction(title: 'Rent', amount: -1050.20), + const Transaction(title: 'Food', amount: -670.50), + ], + ), + ); }); testWidgets('renders AppOne when AppFlavor is one', (tester) async { diff --git a/test/src/ui/widgets/goal_progress_indicator_test.dart b/test/src/ui/widgets/goal_progress_indicator_test.dart index ec8af9d..a1608ae 100644 --- a/test/src/ui/widgets/goal_progress_indicator_test.dart +++ b/test/src/ui/widgets/goal_progress_indicator_test.dart @@ -25,7 +25,16 @@ void main() { setUp(() { financialDataBloc = _MockFinancialDataBloc(); - when(() => financialDataBloc.state).thenReturn(FinancialDataState()); + when(() => financialDataBloc.state).thenReturn( + FinancialDataState( + monthlySpendingLimitGoal: 1000, + transactions: [ + const Transaction(title: 'Paycheck', amount: 3000), + const Transaction(title: 'Rent', amount: -1050.20), + const Transaction(title: 'Food', amount: -670.50), + ], + ), + ); }); group('$GoalProgressIndicator', () {