TF-3493 Upgrade Patrol to version 3.14.0 and Patrol_CLI to version 3.5.0

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2025-02-20 19:31:10 +07:00
committed by Dat H. Pham
parent 687c06aba5
commit 81da9e6e07
11 changed files with 156 additions and 38 deletions
+17 -3
View File
@@ -11,7 +11,14 @@ class SearchRobot extends CoreRobot {
SearchRobot(super.$);
Future<void> enterQueryString(String queryString) async {
await $(#search_email_text_field).enterText(queryString);
final finder = $(#search_email_text_field).$(TextField);
final isTextFieldFocused = finder
.which<TextField>((view) => view.focusNode?.hasFocus ?? false)
.exists;
if (!isTextFieldFocused) {
await finder.tap();
}
await finder.enterText(queryString);
}
Future<void> scrollToEndListSearchFilter() async {
@@ -33,7 +40,14 @@ class SearchRobot extends CoreRobot {
}
Future<void> enterKeyword(String keyword) async {
await $(SearchEmailView).$(TextFieldBuilder).enterText(keyword);
final finder = $(SearchEmailView).$(TextFieldBuilder);
final isTextFieldFocused = finder
.which<TextFieldBuilder>((view) => view.focusNode?.hasFocus ?? false)
.exists;
if (!isTextFieldFocused) {
await finder.tap();
}
await finder.enterText(keyword);
}
Future<void> tapOnShowAllResultsText() async {
@@ -59,7 +73,7 @@ class SearchRobot extends CoreRobot {
await $.pump(const Duration(seconds: 2));
}
Future<void> openEmail(String subject) async {
Future<void> openEmailWithSubject(String subject) async {
await $(find.byType(EmailTileBuilder)).first.tap();
await $.pump(const Duration(seconds: 2));
}