From 26ae28a7056f36724b0deb903ec9aab9eebb8b7d Mon Sep 17 00:00:00 2001 From: misha Date: Thu, 12 Mar 2026 14:41:16 +0300 Subject: [PATCH] feat(tests): fixed test errors --- .../presentation/pages/diary_screen_smoke_test.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/features/diary/presentation/pages/diary_screen_smoke_test.dart b/test/features/diary/presentation/pages/diary_screen_smoke_test.dart index 16876e1d..3b595b46 100644 --- a/test/features/diary/presentation/pages/diary_screen_smoke_test.dart +++ b/test/features/diary/presentation/pages/diary_screen_smoke_test.dart @@ -88,7 +88,7 @@ void main() { when(diaryCubit.state).thenReturn(const DiaryState.loading()); when(diaryCubit.stream).thenAnswer((_) => const Stream.empty()); when(diaryCubit.close()).thenAnswer((_) async => Future.value()); - when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'), date: anyNamed('date'))).thenAnswer((_) async => true); + when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'))).thenAnswer((_) async => true); final commentsCubit = MockConsultantCommentsCubit(); when(commentsCubit.state).thenReturn(ConsultantCommentsState(commentsModel: ConsultantCommentModel(comment: ''))); @@ -109,7 +109,7 @@ void main() { when(diaryCubit.state).thenReturn(loadedState(hasChosenPlan: true)); when(diaryCubit.stream).thenAnswer((_) => const Stream.empty()); when(diaryCubit.close()).thenAnswer((_) async => Future.value()); - when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'), date: anyNamed('date'))).thenAnswer((_) async => true); + when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'))).thenAnswer((_) async => true); final commentsCubit = MockConsultantCommentsCubit(); when(commentsCubit.state).thenReturn(ConsultantCommentsState(commentsModel: ConsultantCommentModel(comment: ''), dayCommentNeedsToBeFilled: false)); @@ -132,7 +132,7 @@ void main() { when(diaryCubit.state).thenReturn(const DiaryState.error(errorMessage: 'err')); when(diaryCubit.stream).thenAnswer((_) => const Stream.empty()); when(diaryCubit.close()).thenAnswer((_) async => Future.value()); - when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'), date: anyNamed('date'))).thenAnswer((_) async => true); + when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'))).thenAnswer((_) async => true); final commentsCubit = MockConsultantCommentsCubit(); when(commentsCubit.state).thenReturn(ConsultantCommentsState(commentsModel: ConsultantCommentModel(comment: ''))); @@ -161,7 +161,7 @@ void main() { when(diaryCubit.state).thenReturn(DiaryState.loadedTomorrowWithDiet(diary: futureDiary, selectedDay: DateTime(2025, 1, 2), selectedMeal: 1)); when(diaryCubit.stream).thenAnswer((_) => const Stream.empty()); when(diaryCubit.close()).thenAnswer((_) async => Future.value()); - when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'), date: anyNamed('date'))).thenAnswer((_) async => true); + when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'))).thenAnswer((_) async => true); final commentsCubit = MockConsultantCommentsCubit(); when(commentsCubit.state).thenReturn(ConsultantCommentsState(commentsModel: ConsultantCommentModel(comment: ''))); @@ -193,7 +193,7 @@ void main() { when(diaryCubit.state).thenReturn(state); when(diaryCubit.stream).thenAnswer((_) => const Stream.empty()); when(diaryCubit.close()).thenAnswer((_) async => Future.value()); - when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'), date: anyNamed('date'))).thenAnswer((_) async => true); + when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'))).thenAnswer((_) async => true); final commentsCubit = MockConsultantCommentsCubit(); when(commentsCubit.state).thenReturn(ConsultantCommentsState(commentsModel: ConsultantCommentModel(comment: ''), dayCommentNeedsToBeFilled: false)); @@ -217,7 +217,7 @@ void main() { when(diaryCubit.state).thenReturn(state); when(diaryCubit.stream).thenAnswer((_) => const Stream.empty()); when(diaryCubit.close()).thenAnswer((_) async => Future.value()); - when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'), date: anyNamed('date'))).thenAnswer((_) async => true); + when(diaryCubit.fetchDiaryV2(needLoading: anyNamed('needLoading'), diaryId: anyNamed('diaryId'))).thenAnswer((_) async => true); final commentsCubit = MockConsultantCommentsCubit(); when(commentsCubit.state).thenReturn(ConsultantCommentsState(commentsModel: ConsultantCommentModel(comment: '')));