Skip to content

Commit

Permalink
Fix message page test
Browse files Browse the repository at this point in the history
  • Loading branch information
vyPal committed Mar 11, 2024
1 parent 73fa633 commit bd29140
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ android {
versionName flutterVersionName
targetSdkVersion 33
minSdkVersion 21
compileSdkVersion 33
compileSdkVersion 34
multiDexEnabled true
}

Expand Down
21 changes: 11 additions & 10 deletions integration_test/app_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,25 @@ void main() {
expect(find.text("Messages"), findsWidgets);
expect(find.byType(Card), findsWidgets);
});

testWidgets('Test Message page', (tester) async {
await prep(tester, username, password, name, false, "", true, token);
await prep(tester, username, password, name, false, "", false, "");

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

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

await tester.tap(find.byType(InkWell).at(0));
Finder f = find.byWidgetPredicate((widget) =>
widget is Icon &&
widget.size == 18 &&
widget.icon == Icons.arrow_right_rounded);
await pumpUntilFound(tester, f);
expect(f, findsWidgets);

await tester.tap(f.at(0));
await tester.pump(const Duration(seconds: 1));

await pumpUntilFound(tester,
find.byWidget(const Icon(Icons.arrow_right_rounded, size: 18)));
expect(find.byWidget(const Icon(Icons.arrow_right_rounded, size: 18)),
findsOneWidget);
await pumpUntilFound(tester, f);
expect(f, findsOneWidget);
expect(find.byType(Card), findsWidgets);
});

Expand Down

0 comments on commit bd29140

Please sign in to comment.