Skip to content

Commit

Permalink
Test to ensure that page refresh doesn't affect url bar focus (#2749)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1207004088983506/f
Tech Design URL:
CC:

Description:

Add test to ensure URL bar doesn't lose focus on site refresh.
  • Loading branch information
bwaresiak authored Apr 18, 2024
1 parent 884e6dd commit bc981c7
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .maestro/browser_features/search_bar.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# search_bar.yaml
appId: com.duckduckgo.mobile.ios
tags:
- release

---

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

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

# Manage onboarding
- runFlow:
when:
visible:
text: "Got It"
index: 0
file: ../shared/onboarding_browsing.yaml

- assertVisible: "Website that refreshes every 3 seconds."

# Start typing
- tapOn:
id: "searchEntry"
- inputText: "abcd"
- assertVisible: "abcd"

# Delay execution and let page refresh
- runFlow:
file: ../shared/delay.yaml

# More text to append
- inputText: "efgh"
- assertVisible: "abcdefgh"

# Delay execution and let page refresh
- runFlow:
file: ../shared/delay.yaml

- inputText: "ijkl"
- assertVisible: "abcdefghijkl"

13 changes: 13 additions & 0 deletions .maestro/shared/delay.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# delay.yaml

appId: com.duckduckgo.mobile.ios
---

- runFlow:
when:
visible:
text: "This is just a text that will be never matched so this invocation will cause 5s delay"
index: 0
commands:
- stopApp

0 comments on commit bc981c7

Please sign in to comment.