diff --git a/app/test_goldens/calendrical_events/page/past_calendrical_events_page_test.dart b/app/test_goldens/calendrical_events/page/past_calendrical_events_page_test.dart index bdfe013f8..ba2048341 100644 --- a/app/test_goldens/calendrical_events/page/past_calendrical_events_page_test.dart +++ b/app/test_goldens/calendrical_events/page/past_calendrical_events_page_test.dart @@ -104,11 +104,15 @@ void main() { group('without Sharezone Plus', () { setUp(() { - when(controller.state).thenReturn( - const PastCalendricalEventsPageNotUnlockedState( - sortingOrder: EventsSortingOrder.descending, - ), + const state = PastCalendricalEventsPageNotUnlockedState( + sortingOrder: EventsSortingOrder.descending, ); + // Mockito does not support mocking sealed classes yet, so we have to + // provide a dummy implementation of the state. + // + // Ticket: https://github.com/dart-lang/mockito/issues/675 + provideDummy(state); + when(controller.state).thenReturn(state); }); testGoldens('renders correctly (light theme)', (tester) async {