Skip to content

Commit

Permalink
Fix client integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Serious-senpai committed Nov 27, 2024
1 parent d562bd0 commit 84e8be1
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions app/resident_manager/integration_test/widget_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,28 @@ void main() {
await tester.pumpAndSettle();
expect(find.byWidgetPredicate((widget) => widget is RegisterQueuePage), findsOneWidget);

// Open drawer
await tester.tap(find.byIcon(Icons.menu_outlined));
// Back to home page
await tester.tap(find.byIcon(Icons.arrow_back_outlined));
await tester.pumpAndSettle();

// Open residents list
await tester.tap(find.byIcon(Icons.people_outlined));
await tester.pumpAndSettle();
expect(find.byWidgetPredicate((widget) => widget is ResidentsPage), findsOneWidget);

// Open drawer
await tester.tap(find.byIcon(Icons.menu_outlined));
// Back to home page
await tester.tap(find.byIcon(Icons.arrow_back_outlined));
await tester.pumpAndSettle();

// Open rooms list
await tester.tap(find.byIcon(Icons.room_outlined));
await tester.pumpAndSettle();
expect(find.byWidgetPredicate((widget) => widget is RoomsPage), findsOneWidget);

// Back to home page
await tester.tap(find.byIcon(Icons.arrow_back_outlined));
await tester.pumpAndSettle();

// Open drawer
await tester.tap(find.byIcon(Icons.menu_outlined));
await tester.pumpAndSettle();
Expand Down Expand Up @@ -254,6 +258,10 @@ void main() {
// Wait until loading is completed (only 1 checkbox remains)
await pumpUntilNoExcept(() => expect(find.byWidgetPredicate((widget) => widget is Checkbox), findsOne), tester);

// Back to home page
await tester.tap(find.byIcon(Icons.arrow_back_outlined));
await tester.pumpAndSettle();

// Open drawer
await tester.tap(find.byIcon(Icons.menu_outlined));
await tester.pumpAndSettle();
Expand Down Expand Up @@ -362,6 +370,10 @@ void main() {
// Wait until loading is completed (only 1 checkbox remains)
await pumpUntilNoExcept(() => expect(find.byWidgetPredicate((widget) => widget is Checkbox), findsOne), tester);

// Back to home page
await tester.tap(find.byIcon(Icons.arrow_back_outlined));
await tester.pumpAndSettle();

// Open drawer
await tester.tap(find.byIcon(Icons.menu_outlined));
await tester.pumpAndSettle();
Expand Down

0 comments on commit 84e8be1

Please sign in to comment.