Skip to content

Commit

Permalink
backgrounding UI tests (#3021)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/392891325557410/1207589902638374/f
Tech Design URL:
CC: @bwaresiak

Description:
Adds tests for backgrounding the app.

Steps to test this PR:

Verify end to end test job as passed https://github.com/duckduckgo/iOS/actions/runs/9766061419
In terminal cd into .maestro
Run setup_ui_tests.sh
Optional: run all the release tests in one go using: run_tests_tests.sh release_tests
Run run_ui_tests.sh release_tests/backgrounding.yaml
  • Loading branch information
brindy committed Jul 3, 2024
1 parent 37d9f2f commit 5d343eb
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 1 deletion.
75 changes: 75 additions & 0 deletions .maestro/release_tests/backgrounding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# backgrounding.yaml
appId: com.duckduckgo.mobile.ios
tags:
- release

---

# Set up
- clearState
- launchApp
- runFlow:
file: ../shared/onboarding.yaml

# Load Site
- assertVisible:
id: "searchEntry"
- tapOn:
id: "searchEntry"
- inputText: "https://privacy-test-pages.site"
- pressKey: Enter

# Manage onboarding
- runFlow:
file: ../shared/onboarding_browsing.yaml

# Go home and hover there a bit
- pressKey: Home
- swipe:
start: 50%, 50%
end: 10%, 50%
- swipe:
start: 10%, 50%
end: 50%, 50%
- tapOn: "DuckDuckGo"

# Validate
- assertVisible: "Privacy Test Pages"
- assertVisible: "Browsing menu"
- tapOn: "Browsing menu"
- assertVisible: "Add Bookmark"
- tapOn: "Add Bookmark"
- tapOn:
id: PrivacyIcon
- assertVisible: "Protections are ON for this site"
- tapOn: "Done"

# Run background assertion from new tab page
- assertVisible: "Tab Switcher"
- tapOn: "Tab Switcher"
- tapOn: "New Tab"

# Go home and hover there a bit
- pressKey: Home
- swipe:
start: 50%, 50%
end: 10%, 50%
- swipe:
start: 10%, 50%
end: 50%, 50%
- tapOn: "DuckDuckGo"

# Check menus
- tapOn: "Cancel"
- tapOn: "Settings"
- assertVisible: "Default Browser"
- tapOn: "Done"

- assertVisible: "Bookmarks"
- tapOn: "Bookmarks"
- assertVisible: "Privacy Test Pages - Home"
- tapOn: "Done"

- assertVisible: "Tab Switcher"
- tapOn: "Tab Switcher"

2 changes: 1 addition & 1 deletion DuckDuckGo/Base.lproj/OmniBar.xib
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<rect key="frame" x="0.0" y="2" width="43" height="38"/>
</imageView>
</subviews>
<accessibility key="accessibilityConfiguration">
<accessibility key="accessibilityConfiguration" identifier="PrivacyIcon">
<accessibilityTraits key="traits" button="YES"/>
<bool key="isElement" value="YES"/>
</accessibility>
Expand Down

0 comments on commit 5d343eb

Please sign in to comment.