From afdc545004f570195f2acb4257544f697aa9d4cb Mon Sep 17 00:00:00 2001 From: Dante291 Date: Sun, 26 Nov 2023 16:14:19 +0530 Subject: [PATCH] fixing edit event page test --- .../events/edit_event_page_test.dart | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart b/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart index 4a758bfa5..c2eb5df00 100644 --- a/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart +++ b/test/widget_tests/after_auth_screens/events/edit_event_page_test.dart @@ -170,20 +170,16 @@ void main() { await tester.pumpWidget(editEventScreen(theme: TalawaTheme.darkTheme)); await tester.pumpAndSettle(); - await tester.tap(find.byKey(const Key('EventDateTimeTileTime')).first); + await tester.tap(find.byKey(const Key('EventDateTimeTileTime')).last); await tester.pump(); expect(find.byType(TimePickerDialog), findsOneWidget); - final center = tester - .getCenter(find.byKey(const ValueKey('time-picker-dial'))); - await tester.tapAt(Offset(center.dx - 10, center.dy)); - await tester.pump(); - await tester.tapAt(Offset(center.dx, center.dy + 10)); + await tester.tap(find.text('PM')); await tester.tap(find.text('OK')); await tester.pump(); - expect(find.text('9:30 AM'), findsOneWidget); + expect(find.text('12:00 PM'), findsOneWidget); }); });