From c28993738f7b119aedbb9d299b79a191d76fa86e Mon Sep 17 00:00:00 2001 From: Craig Russell Date: Wed, 2 Oct 2024 17:26:33 +0100 Subject: [PATCH] Ensure autofill nightly tests succeed --- ...tofill_add_search_update_delete_creds.yaml | 24 +++++++++++++++++++ ...tofill_prompted_to_save_creds_on_form.yaml | 4 ++-- .maestro/autofill/steps/delete_logins.yaml | 21 +++++++++++----- .maestro/autofill/steps/manual_update.yaml | 12 ++++++++-- 4 files changed, 51 insertions(+), 10 deletions(-) diff --git a/.maestro/autofill/2_autofill_add_search_update_delete_creds.yaml b/.maestro/autofill/2_autofill_add_search_update_delete_creds.yaml index 3ef054cce02b..fb801b37349c 100644 --- a/.maestro/autofill/2_autofill_add_search_update_delete_creds.yaml +++ b/.maestro/autofill/2_autofill_add_search_update_delete_creds.yaml @@ -28,6 +28,9 @@ tags: - assertNotVisible: id: view_menu_save + - scrollUntilVisible: + element: + id: usernameEditText - tapOn: id: usernameEditText - inputText: "user" @@ -35,14 +38,23 @@ tags: - assertVisible: id: view_menu_save + - scrollUntilVisible: + element: + id: passwordEditText - tapOn: id: passwordEditText - inputText: "123" + - scrollUntilVisible: + element: + id: domainEditText - tapOn: id: domainEditText - inputText: "${output.addLogins.domains[output.addLogins.counter]}" + - scrollUntilVisible: + element: + id: notesEditText - tapOn: id: notesEditText - inputText: "a note" @@ -51,6 +63,9 @@ tags: id: view_menu_save retryTapIfNoChange: false + - scrollUntilVisible: + element: + text: "Last updated.*" - assertVisible: "Last updated.*" - tapOn: "Navigate up" @@ -59,15 +74,24 @@ tags: text: "Save and autofill passwords" - evalScript: ${output.addLogins.counter++} +- scrollUntilVisible: + element: + text: "#" - assertVisible: text: "#" +- scrollUntilVisible: + element: + text: "a.example.com" - assertVisible: text: "a.example.com" - assertNotVisible: text: "https://a.example.com" +- scrollUntilVisible: + element: + text: "fill.dev" - assertVisible: text: "fill.dev" diff --git a/.maestro/autofill/3_autofill_prompted_to_save_creds_on_form.yaml b/.maestro/autofill/3_autofill_prompted_to_save_creds_on_form.yaml index 224e1bde0db3..0c155b33ba97 100644 --- a/.maestro/autofill/3_autofill_prompted_to_save_creds_on_form.yaml +++ b/.maestro/autofill/3_autofill_prompted_to_save_creds_on_form.yaml @@ -1,9 +1,9 @@ appId: com.duckduckgo.mobile.android name: "Autofill: Prompted to save and update credentials on web form" tags: - - autofillNoAuthTests + - autofillNoAuthTestsModernWebView --- -# Pre-requisite: on an autofill-eligible device +# Pre-requisite: on an autofill-eligible device, including having a modern WebView - launchApp: clearState: true diff --git a/.maestro/autofill/steps/delete_logins.yaml b/.maestro/autofill/steps/delete_logins.yaml index 2c98a0251696..9efc3bc1462d 100644 --- a/.maestro/autofill/steps/delete_logins.yaml +++ b/.maestro/autofill/steps/delete_logins.yaml @@ -3,26 +3,35 @@ name: "Autofill: Delete credentials" --- # Pre-requisite: the user is viewing the password manager screen with some saved passwords added by a previous test step, on an autofill-eligible device +- scrollUntilVisible: + element: + text: "192.168.0.100" - tapOn: - id: "item_container" - index: 1 + text: "192.168.0.100" - tapOn: "More options" - tapOn: "Delete" - tapOn: "Delete" +- scrollUntilVisible: + element: + text: "a.example.com" - tapOn: - id: "item_container" - index: 1 + text: "a.example.com" - tapOn: "More options" - tapOn: "Delete" - tapOn: "Delete" +- scrollUntilVisible: + element: + text: "fill.dev" - tapOn: - id: "item_container" - index: 1 + text: "fill.dev" - tapOn: "More options" - tapOn: "Delete" - tapOn: "Delete" +- scrollUntilVisible: + element: + text: "No passwords saved yet" - assertVisible: text: "No passwords saved yet" \ No newline at end of file diff --git a/.maestro/autofill/steps/manual_update.yaml b/.maestro/autofill/steps/manual_update.yaml index 7c49d0ae484d..3de85bc0c0a6 100644 --- a/.maestro/autofill/steps/manual_update.yaml +++ b/.maestro/autofill/steps/manual_update.yaml @@ -3,13 +3,18 @@ name: "Autofill: Manually updating an existing credential" --- # Pre-requisite: the user is viewing the password manager screen with some saved passwords added by a previous test step, on an autofill-eligible device +- scrollUntilVisible: + element: + text: "a.example.com" - tapOn: - id: "item_container" - index: "1" + text: "a.example.com" - tapOn: "More options" - tapOn: "Edit" +- scrollUntilVisible: + element: + id: notesEditText - tapOn: id: notesEditText @@ -21,5 +26,8 @@ name: "Autofill: Manually updating an existing credential" id: view_menu_save retryTapIfNoChange: false +- scrollUntilVisible: + element: + text: "new note" - assertVisible: "new note" - tapOn: "Navigate up" \ No newline at end of file