From 8309498d9eb784803d0cf532a276f89e50a8bc93 Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Mon, 26 Jan 2026 14:51:22 +0300 Subject: [PATCH] feat: Increment app version and add tests for glossary moderation request modal widget. --- pubspec.yaml | 2 +- .../glossary_moderation_request_modal_widget_test.dart | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 2be3e4c5..d56fd893 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.3.12+93 +version: 1.3.13+94 publish_to: 'none' environment: diff --git a/test/features/diary/presentation/widgets/glossary_moderation_request_modal_widget_test.dart b/test/features/diary/presentation/widgets/glossary_moderation_request_modal_widget_test.dart index f77710e0..b1e8534b 100644 --- a/test/features/diary/presentation/widgets/glossary_moderation_request_modal_widget_test.dart +++ b/test/features/diary/presentation/widgets/glossary_moderation_request_modal_widget_test.dart @@ -33,7 +33,7 @@ void main() { expect(find.text('Сохранить'), findsOneWidget); }); - testWidgets('alert -> refuse triggers sendProductToModeration and success', (tester) async { + testWidgets('alert -> refuse triggers sendProductToModeration and closes modal', (tester) async { final cubit = MockDiaryCubit(); when( cubit.sendProductToModeration( @@ -65,9 +65,11 @@ void main() { await tester.pump(); await tester.tap(find.text('Отказаться')); - await tester.pump(); + await tester.pumpAndSettle(); // Wait for navigation animation - expect(find.textContaining('Продукт успешно отправлен'), findsOneWidget); + expect(find.textContaining('Продукт успешно отправлен'), findsNothing); + expect(find.byType(GlossaryModerationRequestModalWidget), findsNothing); + verify( cubit.sendProductToModeration( name: anyNamed('name'),