From 622e4a65bee3265d210b45270bbca9918edddb42 Mon Sep 17 00:00:00 2001 From: Vadim <44135514+vodemn@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:19:39 +0100 Subject: [PATCH] added profile deletion to e2e test --- integration_test/e2e_test.dart | 16 ++++++++++++++++ .../screen_equipment_profile_edit.dart | 2 +- lib/screens/film_edit/screen_film_edit.dart | 2 +- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/integration_test/e2e_test.dart b/integration_test/e2e_test.dart index 39034a0..b935298 100644 --- a/integration_test/e2e_test.dart +++ b/integration_test/e2e_test.dart @@ -148,6 +148,17 @@ void testE2E(String description) { nd: 'None', ev: mockPhotoEv100 + 1, ); + + /// Delete profile + await tester.openSettings(); + await tester.tapDescendantTextOf(S.current.equipmentProfiles); + await tester.tap(find.text(mockEquipmentProfiles[0].name).first); + await tester.pumpAndSettle(); + await tester.tap(find.byIcon(Icons.edit).first); + await tester.pumpAndSettle(); + await tester.deleteEdits(); + expect(find.text(mockEquipmentProfiles[0].name), findsNothing); + expect(find.text(mockEquipmentProfiles[1].name), findsOneWidget); }, ); } @@ -192,6 +203,11 @@ extension on WidgetTester { await pumpAndSettle(Dimens.durationML); } + Future deleteEdits() async { + await tap(find.byIcon(Icons.delete_outlined)); + await pumpAndSettle(Dimens.durationML); + } + Future setDialogFilterValues( List valuesToSelect, { bool deselectAll = true, diff --git a/lib/screens/equipment_profile_edit/screen_equipment_profile_edit.dart b/lib/screens/equipment_profile_edit/screen_equipment_profile_edit.dart index d33a889..6d6ce2b 100644 --- a/lib/screens/equipment_profile_edit/screen_equipment_profile_edit.dart +++ b/lib/screens/equipment_profile_edit/screen_equipment_profile_edit.dart @@ -83,7 +83,7 @@ class _EquipmentProfileEditScreenState extends State onPressed: () { context.read().add(const EquipmentProfileDeleteEvent()); }, - icon: const Icon(Icons.delete_outline), + icon: const Icon(Icons.delete_outlined), ), ], slivers: [ diff --git a/lib/screens/film_edit/screen_film_edit.dart b/lib/screens/film_edit/screen_film_edit.dart index 9f8c4cc..2c7fe7a 100644 --- a/lib/screens/film_edit/screen_film_edit.dart +++ b/lib/screens/film_edit/screen_film_edit.dart @@ -56,7 +56,7 @@ class _FilmEditScreenState extends State { onPressed: () { context.read().add(const FilmEditDeleteEvent()); }, - icon: const Icon(Icons.delete_outline), + icon: const Icon(Icons.delete_outlined), ), ], slivers: [