Skip to content

Commit

Permalink
fixing edit event page test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dante291 committed Nov 26, 2023
1 parent 6e8478c commit afdc545
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>('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);
});
});

Expand Down

0 comments on commit afdc545

Please sign in to comment.