Skip to content

Commit 6c0eae8

Browse files
authored
Ensure autofill nightly tests succeed (#5092)
Task/Issue URL: https://app.asana.com/0/608920331025315/1208459234138716/f ### Description Autofill nightlies are failing because as of #5007, we require a more modern `WebView` than is available in Maestro Cloud emulators. This PR: - fixes one of the ways the tests fail, by ensuring the warning banner in password management screen doesn't upset the tests - stops running the test which tests _actual_ `WebView` autofill as part of the nightly (won't be possible to run this on CI until either Maestro Cloud ships their emulators with a decent `WebView` version, or we run the tests on different infrastructure) - adds some `scrollUntilVisible` to help add resilience to the tests running on smaller devices or when there are extra warning/promo banners above the items we want to tap on ### Steps to test this PR - [ ] Make sure nightly job succeeds: https://github.com/duckduckgo/Android/actions/runs/11147826346
1 parent 94c85a5 commit 6c0eae8

File tree

4 files changed

+51
-10
lines changed

4 files changed

+51
-10
lines changed

.maestro/autofill/2_autofill_add_search_update_delete_creds.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,33 @@ tags:
2828
- assertNotVisible:
2929
id: view_menu_save
3030

31+
- scrollUntilVisible:
32+
element:
33+
id: usernameEditText
3134
- tapOn:
3235
id: usernameEditText
3336
- inputText: "user"
3437

3538
- assertVisible:
3639
id: view_menu_save
3740

41+
- scrollUntilVisible:
42+
element:
43+
id: passwordEditText
3844
- tapOn:
3945
id: passwordEditText
4046
- inputText: "123"
4147

48+
- scrollUntilVisible:
49+
element:
50+
id: domainEditText
4251
- tapOn:
4352
id: domainEditText
4453
- inputText: "${output.addLogins.domains[output.addLogins.counter]}"
4554

55+
- scrollUntilVisible:
56+
element:
57+
id: notesEditText
4658
- tapOn:
4759
id: notesEditText
4860
- inputText: "a note"
@@ -51,6 +63,9 @@ tags:
5163
id: view_menu_save
5264
retryTapIfNoChange: false
5365

66+
- scrollUntilVisible:
67+
element:
68+
text: "Last updated.*"
5469
- assertVisible: "Last updated.*"
5570

5671
- tapOn: "Navigate up"
@@ -59,15 +74,24 @@ tags:
5974
text: "Save and autofill passwords"
6075
- evalScript: ${output.addLogins.counter++}
6176

77+
- scrollUntilVisible:
78+
element:
79+
text: "#"
6280
- assertVisible:
6381
text: "#"
6482

83+
- scrollUntilVisible:
84+
element:
85+
text: "a.example.com"
6586
- assertVisible:
6687
text: "a.example.com"
6788

6889
- assertNotVisible:
6990
text: "https://a.example.com"
7091

92+
- scrollUntilVisible:
93+
element:
94+
text: "fill.dev"
7195
- assertVisible:
7296
text: "fill.dev"
7397

.maestro/autofill/3_autofill_prompted_to_save_creds_on_form.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
appId: com.duckduckgo.mobile.android
22
name: "Autofill: Prompted to save and update credentials on web form"
33
tags:
4-
- autofillNoAuthTests
4+
- autofillNoAuthTestsModernWebView
55
---
6-
# Pre-requisite: on an autofill-eligible device
6+
# Pre-requisite: on an autofill-eligible device, including having a modern WebView
77

88
- launchApp:
99
clearState: true

.maestro/autofill/steps/delete_logins.yaml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,35 @@ name: "Autofill: Delete credentials"
33
---
44
# 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
55

6+
- scrollUntilVisible:
7+
element:
8+
text: "192.168.0.100"
69
- tapOn:
7-
id: "item_container"
8-
index: 1
10+
text: "192.168.0.100"
911
- tapOn: "More options"
1012
- tapOn: "Delete"
1113
- tapOn: "Delete"
1214

15+
- scrollUntilVisible:
16+
element:
17+
text: "a.example.com"
1318
- tapOn:
14-
id: "item_container"
15-
index: 1
19+
text: "a.example.com"
1620
- tapOn: "More options"
1721
- tapOn: "Delete"
1822
- tapOn: "Delete"
1923

24+
- scrollUntilVisible:
25+
element:
26+
text: "fill.dev"
2027
- tapOn:
21-
id: "item_container"
22-
index: 1
28+
text: "fill.dev"
2329
- tapOn: "More options"
2430
- tapOn: "Delete"
2531
- tapOn: "Delete"
2632

33+
- scrollUntilVisible:
34+
element:
35+
text: "No passwords saved yet"
2736
- assertVisible:
2837
text: "No passwords saved yet"

.maestro/autofill/steps/manual_update.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@ name: "Autofill: Manually updating an existing credential"
33
---
44
# 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
55

6+
- scrollUntilVisible:
7+
element:
8+
text: "a.example.com"
69
- tapOn:
7-
id: "item_container"
8-
index: "1"
10+
text: "a.example.com"
911

1012
- tapOn: "More options"
1113
- tapOn: "Edit"
1214

15+
- scrollUntilVisible:
16+
element:
17+
id: notesEditText
1318
- tapOn:
1419
id: notesEditText
1520

@@ -21,5 +26,8 @@ name: "Autofill: Manually updating an existing credential"
2126
id: view_menu_save
2227
retryTapIfNoChange: false
2328

29+
- scrollUntilVisible:
30+
element:
31+
text: "new note"
2432
- assertVisible: "new note"
2533
- tapOn: "Navigate up"

0 commit comments

Comments
 (0)