Skip to content

Commit

Permalink
Improve testing of message sending page
Browse files Browse the repository at this point in the history
  • Loading branch information
vyPal committed Apr 23, 2024
1 parent 979a93b commit 23e4b0a
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions integration_test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,32 @@ void main() {
await pumpUntilFound(tester, find.text("Select recipient"));

expect(find.text("Select recipient"), findsOneWidget);

await tester.tap(find.text("Select recipient"));
await pumpUntilFound(tester, find.byType(Autocomplete));

expect(find.byType(Autocomplete), findsOneWidget);

await tester.enterText(find.byType(TextField), name);
await tester.pump(const Duration(seconds: 1));

await tester.tap(find.byType(ListTile).at(0));
await pumpUntilFound(tester, find.text(name));

expect(find.text(name), findsOneWidget);

await tester.enterText(
find.byType(TextField).at(0), "EduPage2 Automated test");

await tester.tap(find.byType(SwitchListTile).at(0));
await tester.tap(find.byType(SwitchListTile).at(1));
await tester.pump(const Duration(seconds: 1));
await tester.tap(find.byType(SwitchListTile).at(1));

await tester.tap(find.byType(ElevatedButton).at(0));

await pumpUntilFound(tester, find.text("Messages"));
expect(find.text("Messages"), findsWidgets);
});

testWidgets('Test Message page', (tester) async {
Expand Down

0 comments on commit 23e4b0a

Please sign in to comment.