Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure autofill nightly tests succeed #5092

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .maestro/autofill/2_autofill_add_search_update_delete_creds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,33 @@ tags:
- assertNotVisible:
id: view_menu_save

- scrollUntilVisible:
element:
id: usernameEditText
- tapOn:
id: usernameEditText
- inputText: "user"

- 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"
Expand All @@ -51,6 +63,9 @@ tags:
id: view_menu_save
retryTapIfNoChange: false

- scrollUntilVisible:
element:
text: "Last updated.*"
- assertVisible: "Last updated.*"

- tapOn: "Navigate up"
Expand All @@ -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"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
appId: com.duckduckgo.mobile.android
name: "Autofill: Prompted to save and update credentials on web form"
tags:
- autofillNoAuthTests
- autofillNoAuthTestsModernWebView
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this to prevent it from running during autofill nightlies (since Maestro Cloud emulators don't come with a modern WebView version, we can't test for actual autofill in the WebView)

Copy link
Contributor

@cmonfortep cmonfortep Oct 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow-up, do you think makes sense to skip our capabilities checks (in maestro) and run it anyways? it should work there

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think I understand; if the capability checks are telling us it won't run, why would we try it in the UI test?

---
# Pre-requisite: on an autofill-eligible device
# Pre-requisite: on an autofill-eligible device, including having a modern WebView

- launchApp:
clearState: true
Expand Down
21 changes: 15 additions & 6 deletions .maestro/autofill/steps/delete_logins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 10 additions & 2 deletions .maestro/autofill/steps/manual_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Loading