Upgrade Patrol to 4.5.0 (#4446)

This commit is contained in:
Dat Dang
2026-04-17 20:50:22 +07:00
committed by GitHub
parent 77e2381ca9
commit e3dfadce34
15 changed files with 45 additions and 31 deletions
@@ -35,19 +35,20 @@ class AppGridScenario extends BaseTestScenario {
await Future.delayed(const Duration(seconds: 2));
if (PlatformInfo.isAndroid) {
await $.native.pressHome();
await $.native.openApp();
final native = $.platformAutomator.android;
await native.pressHome();
await native.openApp();
await appGridRobot.openAppInAppGridByAppName('Twake Sync');
await Future.delayed(const Duration(seconds: 2));
await $.native.pressBack();
await native.pressBack();
await appGridRobot.openAppInAppGridByAppName('Twake Chat');
await Future.delayed(const Duration(seconds: 2));
await $.native.pressBack();
await $.native.pressBack();
await native.pressBack();
await native.pressBack();
await _expectMailboxViewVisible();
} else if (PlatformInfo.isIOS) {
@@ -45,6 +45,6 @@ class DownloadAllAttachmentsScenario extends BaseTestScenario {
}
Future<void> _expectNativeSaveButtonVisible() async {
await expectLater($.native.tap(Selector(text: 'SAVE')), completes);
await expectLater($.platformAutomator.tap(Selector(text: 'SAVE')), completes);
}
}
@@ -42,7 +42,7 @@ class ExportAttachmentScenario extends BaseTestScenario {
await emailRobot.onTapAttachmentItem();
await $.pumpAndSettle();
await $.native.pressBack();
await mobileBack($);
_expectEmailViewVisible();
_expectExportDialogLoadingInvisible(appLocalizations);
}
@@ -51,7 +51,7 @@ class LoginWithBasicAuthScenario extends BaseScenario {
await loginRobot.loginBasicAuth();
await loginRobot.grantNotificationPermission($.native);
await loginRobot.grantNotificationPermission();
await _expectThreadViewVisible();
}
@@ -53,7 +53,7 @@ class SendEmailWithReadReceiptEnabledScenario extends BaseTestScenario {
await threadRobot.openEmailWithSubject(emailSubject);
await _expectReadReceiptRequestDialog(appLocalizations);
await $.native.pressBack();
await mobileBack($);
await emailRobot.onTapBackButton();
await $.pumpAndSettle(duration: seconds(5));