From d31f1e2136b85fd87fad8b2ae137cdb61d816dc3 Mon Sep 17 00:00:00 2001 From: Bartek Waresiak Date: Tue, 16 Apr 2024 10:41:44 +0200 Subject: [PATCH 1/2] Test to ensure that page refresh doesn't affect url bar focus --- .maestro/browser_features/search_bar.yaml | 56 +++++++++++++++++++++++ .maestro/shared/delay.yaml | 12 +++++ 2 files changed, 68 insertions(+) create mode 100644 .maestro/browser_features/search_bar.yaml create mode 100644 .maestro/shared/delay.yaml diff --git a/.maestro/browser_features/search_bar.yaml b/.maestro/browser_features/search_bar.yaml new file mode 100644 index 0000000000..a8708011ef --- /dev/null +++ b/.maestro/browser_features/search_bar.yaml @@ -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" + diff --git a/.maestro/shared/delay.yaml b/.maestro/shared/delay.yaml new file mode 100644 index 0000000000..f97e438ccd --- /dev/null +++ b/.maestro/shared/delay.yaml @@ -0,0 +1,12 @@ +# 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 + file: onboarding_browsing.yaml + From a3464c003f621d389fd2c646198ca9aacb29b104 Mon Sep 17 00:00:00 2001 From: Bartek Waresiak Date: Thu, 18 Apr 2024 15:51:53 +0200 Subject: [PATCH 2/2] Tweak command a bit --- .maestro/shared/delay.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.maestro/shared/delay.yaml b/.maestro/shared/delay.yaml index f97e438ccd..94d4c58128 100644 --- a/.maestro/shared/delay.yaml +++ b/.maestro/shared/delay.yaml @@ -8,5 +8,6 @@ appId: com.duckduckgo.mobile.ios visible: text: "This is just a text that will be never matched so this invocation will cause 5s delay" index: 0 - file: onboarding_browsing.yaml + commands: + - stopApp