mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-21 23:10:40 +00:00
added profile deletion to e2e test
This commit is contained in:
parent
63b5723684
commit
622e4a65be
3 changed files with 18 additions and 2 deletions
|
@ -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,
|
||||||
|
|
|
@ -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: [
|
||||||
|
|
|
@ -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: [
|
||||||
|
|
Loading…
Reference in a new issue