Skip to content

Commit

Permalink
In maestro tests, use the press enter command instead of using soft k…
Browse files Browse the repository at this point in the history
…eyboard (#5357)

Task/Issue URL:
https://app.asana.com/0/488551667048375/1208921164205364/f

### Description
Replace the instances where we look for a soft keyboard button with a
specific ID and directly press enter key

**Before**
```
tapOn:
     id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
```

**After**
```
- pressKey: Enter
```

### Steps to test this PR

- QA optional as long as
https://github.com/duckduckgo/Android/actions/runs/12197659365 passes
- If you want to test, run one or more of the changed test files

Co-authored-by: Craig Russell <[email protected]>
  • Loading branch information
CDRussell and CDRussell authored Dec 6, 2024
1 parent b8621d3 commit 9e578a3
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand Down
6 changes: 2 additions & 4 deletions .maestro/bookmarks/open_bookmark_and_navigate_back.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://www.search-company.site/"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand All @@ -23,8 +22,7 @@ tags:
- tapOn:
text: "https://www.search-company.site/"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: "Privacy Test Pages"
- tapOn:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site/"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand All @@ -29,8 +28,7 @@ tags:
- tapOn:
text: "https://privacy-test-pages.site/"
- inputText: "https://www.search-company.site/"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: "Search engine"
- tapOn:
Expand Down
3 changes: 1 addition & 2 deletions .maestro/browsing/visit_site.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand Down
3 changes: 1 addition & 2 deletions .maestro/favorites/favorites_bookmarks_add.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand Down
3 changes: 1 addition & 2 deletions .maestro/favorites/favorites_bookmarks_delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand Down
3 changes: 1 addition & 2 deletions .maestro/fire_button/fire_during_onboarding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand Down
6 changes: 2 additions & 4 deletions .maestro/tabs/open_multiple_tabs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ tags:
- tapOn:
text: "search or type URL"
- inputText: "https://privacy-test-pages.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: ".*keep browsing.*"
- tapOn:
Expand All @@ -26,8 +25,7 @@ tags:
- assertVisible:
text: "Search or type URL"
- inputText: "https://www.search-company.site"
- tapOn:
id: "com.google.android.inputmethod.latin:id/key_pos_ime_action"
- pressKey: Enter
- assertVisible:
text: "Search engine"
- tapOn:
Expand Down

0 comments on commit 9e578a3

Please sign in to comment.