added profile deletion to e2e test

This commit is contained in:
Vadim 2024-11-08 12:19:39 +01:00
parent 63b5723684
commit 622e4a65be
3 changed files with 18 additions and 2 deletions

View file

@ -148,6 +148,17 @@ void testE2E(String description) {
nd: 'None', nd: 'None',
ev: mockPhotoEv100 + 1, ev: mockPhotoEv100 + 1,
); );
/// Delete profile
await tester.openSettings();
await tester.tapDescendantTextOf<SettingsScreen>(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); await pumpAndSettle(Dimens.durationML);
} }
Future<void> deleteEdits() async {
await tap(find.byIcon(Icons.delete_outlined));
await pumpAndSettle(Dimens.durationML);
}
Future<void> setDialogFilterValues<T>( Future<void> setDialogFilterValues<T>(
List<T> valuesToSelect, { List<T> valuesToSelect, {
bool deselectAll = true, bool deselectAll = true,

View file

@ -83,7 +83,7 @@ class _EquipmentProfileEditScreenState extends State<EquipmentProfileEditScreen>
onPressed: () { onPressed: () {
context.read<EquipmentProfileEditBloc>().add(const EquipmentProfileDeleteEvent()); context.read<EquipmentProfileEditBloc>().add(const EquipmentProfileDeleteEvent());
}, },
icon: const Icon(Icons.delete_outline), icon: const Icon(Icons.delete_outlined),
), ),
], ],
slivers: [ slivers: [

View file

@ -56,7 +56,7 @@ class _FilmEditScreenState extends State<FilmEditScreen> {
onPressed: () { onPressed: () {
context.read<FilmEditBloc>().add(const FilmEditDeleteEvent()); context.read<FilmEditBloc>().add(const FilmEditDeleteEvent());
}, },
icon: const Icon(Icons.delete_outline), icon: const Icon(Icons.delete_outlined),
), ),
], ],
slivers: [ slivers: [