Skip to content

Commit

Permalink
Add sync data test
Browse files Browse the repository at this point in the history
  • Loading branch information
loremattei committed Nov 9, 2023
1 parent a1bb477 commit fe94123
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .maestro/sync_tests/03_recover_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ tags:
- tapOn: Recover Your Synced Data
- assertVisible: Scan QR Code
- tapOn: Manually Enter Code
- tapOn: Paste
- tapOn: Paste
- assertVisible: Device Synced!
- tapOn: Next
- tapOn: Not Now
- tapOn: Settings
- tapOn: Done
159 changes: 159 additions & 0 deletions .maestro/sync_tests/04_sync_data.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
appId: com.duckduckgo.mobile.ios
tags:
- sync

---

- clearState
- launchApp
- runFlow:
when:
visible:
text: "Let’s Do It!"
index: 0
file: ../shared/onboarding.yaml

# Add local favorite and bookmark
- tapOn:
id: searchEntry
- inputText: www.duckduckgo.com
- pressKey: Enter
- runFlow:
when:
visible:
text: "Got It"
commands:
- tapOn: Got It
- tapOn: Browsing Menu
- tapOn: Add Favorite
- tapOn:
id: searchEntry
- inputText: www.spreadprivacy.com
- pressKey: Enter
- tapOn: Browsing Menu
- tapOn: Add Bookmark

# Add local login
- tapOn: Browsing Menu
- tapOn: Settings
- tapOn: Logins
- tapOn: Add 24
- tapOn: Title
- inputText: My Personal Website
- tapOn: [email protected]
- inputText: [email protected]
- tapOn: example.com
- inputText: mypersonalwebsite.com
- tapOn: Save
- tapOn: Logins
- tapOn: Settings
- tapOn: Done

# Sync data
# <HACK>This is a workaround to:
# - Put the code in the clipboard on Maestro Cloud
# - Prevent iOS from showing the Paste permission alert
- tapOn:
id: searchEntry
- inputText: ${CODE}
- longPressOn:
id: searchEntry
- tapOn: Select All
- tapOn: Cut
- tapOn:
id: searchEntry
- longPressOn:
id: searchEntry
- tapOn: Paste
- tapOn: Cancel

- tapOn: Close Tabs and Clear Data
- tapOn: Close Tabs and Clear Data
- tapOn: Cancel
#</HACK>

- tapOn: Settings
- runFlow:
file: ../shared/set_internal_user.yaml
- assertVisible: Sync
- tapOn: Sync
- assertVisible: Sync
- tapOn: "0"
- assertVisible: Turn on Sync?
- tapOn: Recover Your Synced Data
- assertVisible: Scan QR Code
- tapOn: Manually Enter Code
- tapOn: Paste
- assertVisible: Device Synced!
- tapOn: Next
- tapOn: Not Now
- tapOn: Settings
- tapOn: Done

# Verify bookmarks and favorites have been merged
- tapOn: Bookmarks

- assertVisible: Spread Privacy
- assertVisible: Stack Overflow - Where Developers Learn, Share, & Build Careers
- assertVisible: DuckDuckGo — Privacy, simplified.
- assertVisible: DuckDuckGo · GitHub
- assertVisible: "Wolfram|Alpha: Computational Intelligence"
- assertVisible: news
- assertVisible: code
- assertVisible: sports
- tapOn: news
- assertVisible: Breaking News, Latest News and Videos | CNN
- assertVisible: News, sport and opinion from the Guardian's global edition | The Guardian
- tapOn: Bookmarks
- tapOn: code
- assertVisible: "GitHub - duckduckgo/Android: DuckDuckGo Android App"
- assertVisible: "GitHub - duckduckgo/iOS: DuckDuckGo iOS Application"
- tapOn: Bookmarks
- tapOn: sports
- assertVisible: NFL.com | Official Site of the National Football League
- assertVisible: AS.com - Diario online deportivo. Fútbol, motor y mucho más
- tapOn: Bookmarks
- tapOn: Favorites
- assertVisible: DuckDuckGo — Privacy, simplified.
- assertVisible: NFL.com | Official Site of the National Football League
- assertVisible: DuckDuckGo · GitHub
- assertVisible: Stack Overflow - Where Developers Learn, Share, & Build Careers
- tapOn: Done

# Verify favorites in home screen
- assertVisible:
id: "searchEntry"
- assertVisible: DuckDuckGo — Privacy, simplified.
- assertVisible: NFL.com | Official Site of the National Football League
- assertVisible: DuckDuckGo · GitHub
- assertVisible: Stack Overflow - Where Developers Learn, Share, & Build Careers

# Verify logins
- tapOn: Settings
- tapOn: Logins
- assertVisible: Unlock device to access saved Logins
- tapOn: Passcode field
- inputText: "0000"
- pressKey: Enter
- assertVisible: Dax Login
- tapOn: Dax Login
- assertVisible: daxthetest
- assertVisible: duckduckgo.com
- tapOn: Logins
- assertVisible: Github
- tapOn: Github
- assertVisible: githubusername
- assertVisible: github.com
- tapOn: Logins
- assertVisible: StackOverflow
- tapOn: StackOverflow
- assertVisible: stacker
- assertVisible: stackoverflow.com
- tapOn: Logins
- assertVisible: My Personal Website
- tapOn: My Personal Website
- assertVisible: [email protected]
- assertVisible: mypersonalwebsite.com
- tapOn: Logins
- tapOn: Settings
- tapOn: Done

0 comments on commit fe94123

Please sign in to comment.