forked from eatvio/eatvio_app
feat: Increment app version and add tests for glossary moderation request modal widget.
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user