From 8dae809d3a628adab6b3801332fb53166c504811 Mon Sep 17 00:00:00 2001 From: Josh Leibstein Date: Fri, 14 Jul 2023 10:20:49 +0100 Subject: [PATCH] Add query parameter UI tests (#3342) --- ...,_utm_source_and_1_standard_parameter.yaml | 28 +++++++++++++++++++ ...Parameters,_utm_source_and_utm_medium.yaml | 28 +++++++++++++++++++ ...d,_fb_source_and_1_standard_parameter.yaml | 28 +++++++++++++++++++ ...s,_link_which_should_not_be_rewritten.yaml | 26 +++++++++++++++++ 4 files changed, 110 insertions(+) create mode 100644 .maestro/privacy_tests/10_-_Query_Parameters,_utm_source_and_1_standard_parameter.yaml create mode 100644 .maestro/privacy_tests/11_-_Query_Parameters,_utm_source_and_utm_medium.yaml create mode 100644 .maestro/privacy_tests/12_-_Query_Parameters,_fbclid,_fb_source_and_1_standard_parameter.yaml create mode 100644 .maestro/privacy_tests/13_-_Query_Parameters,_link_which_should_not_be_rewritten.yaml diff --git a/.maestro/privacy_tests/10_-_Query_Parameters,_utm_source_and_1_standard_parameter.yaml b/.maestro/privacy_tests/10_-_Query_Parameters,_utm_source_and_1_standard_parameter.yaml new file mode 100644 index 000000000000..f78a50f649c5 --- /dev/null +++ b/.maestro/privacy_tests/10_-_Query_Parameters,_utm_source_and_1_standard_parameter.yaml @@ -0,0 +1,28 @@ +appId: com.duckduckgo.mobile.android +--- +- launchApp: + clearState: true +- assertVisible: + text: ".*Not to worry! Searching and browsing privately.*" +- tapOn: "let's do it!" +- tapOn: "cancel" +- assertVisible: + text: ".*I'll also upgrade the security of your connection if possible.*" +- inputText: "https://privacy-test-pages.glitch.me/privacy-protections/query-parameters/" +- pressKey: Enter +- assertVisible: + text: ".*Got It.*" +- tapOn: + text: "HIDE" +- assertVisible: + text: "HIDE TIPS FOREVER" +- tapOn: + text: "HIDE TIPS FOREVER" +- assertVisible: + text: "Link with utm_source and 1 standard parameter" +- tapOn: + text: "Link with utm_source and 1 standard parameter" +- assertNotVisible: + text: "utm_source=something&q=other" +- assertVisible: + text: "q=other" diff --git a/.maestro/privacy_tests/11_-_Query_Parameters,_utm_source_and_utm_medium.yaml b/.maestro/privacy_tests/11_-_Query_Parameters,_utm_source_and_utm_medium.yaml new file mode 100644 index 000000000000..9595bc6f4b55 --- /dev/null +++ b/.maestro/privacy_tests/11_-_Query_Parameters,_utm_source_and_utm_medium.yaml @@ -0,0 +1,28 @@ +appId: com.duckduckgo.mobile.android +--- +- launchApp: + clearState: true +- assertVisible: + text: ".*Not to worry! Searching and browsing privately.*" +- tapOn: "let's do it!" +- tapOn: "cancel" +- assertVisible: + text: ".*I'll also upgrade the security of your connection if possible.*" +- inputText: "https://privacy-test-pages.glitch.me/privacy-protections/query-parameters/" +- pressKey: Enter +- assertVisible: + text: ".*Got It.*" +- tapOn: + text: "HIDE" +- assertVisible: + text: "HIDE TIPS FOREVER" +- tapOn: + text: "HIDE TIPS FOREVER" +- assertVisible: + text: "Link with utm_source and utm_medium" +- tapOn: + text: "Link with utm_source and utm_medium" +- assertNotVisible: + text: "utm_source=something&utm_medium=somethingelse" +- assertVisible: + text: "" diff --git a/.maestro/privacy_tests/12_-_Query_Parameters,_fbclid,_fb_source_and_1_standard_parameter.yaml b/.maestro/privacy_tests/12_-_Query_Parameters,_fbclid,_fb_source_and_1_standard_parameter.yaml new file mode 100644 index 000000000000..4071053be822 --- /dev/null +++ b/.maestro/privacy_tests/12_-_Query_Parameters,_fbclid,_fb_source_and_1_standard_parameter.yaml @@ -0,0 +1,28 @@ +appId: com.duckduckgo.mobile.android +--- +- launchApp: + clearState: true +- assertVisible: + text: ".*Not to worry! Searching and browsing privately.*" +- tapOn: "let's do it!" +- tapOn: "cancel" +- assertVisible: + text: ".*I'll also upgrade the security of your connection if possible.*" +- inputText: "https://privacy-test-pages.glitch.me/privacy-protections/query-parameters/" +- pressKey: Enter +- assertVisible: + text: ".*Got It.*" +- tapOn: + text: "HIDE" +- assertVisible: + text: "HIDE TIPS FOREVER" +- tapOn: + text: "HIDE TIPS FOREVER" +- assertVisible: + text: "Link with fbclid, fb_source and 1 standard parameter" +- tapOn: + text: "Link with fbclid, fb_source and 1 standard parameter" +- assertNotVisible: + text: "fbclid=12345&fb_source=someting&u=14" +- assertVisible: + text: "u=14" diff --git a/.maestro/privacy_tests/13_-_Query_Parameters,_link_which_should_not_be_rewritten.yaml b/.maestro/privacy_tests/13_-_Query_Parameters,_link_which_should_not_be_rewritten.yaml new file mode 100644 index 000000000000..2b0cb49d5a48 --- /dev/null +++ b/.maestro/privacy_tests/13_-_Query_Parameters,_link_which_should_not_be_rewritten.yaml @@ -0,0 +1,26 @@ +appId: com.duckduckgo.mobile.android +--- +- launchApp: + clearState: true +- assertVisible: + text: ".*Not to worry! Searching and browsing privately.*" +- tapOn: "let's do it!" +- tapOn: "cancel" +- assertVisible: + text: ".*I'll also upgrade the security of your connection if possible.*" +- inputText: "https://privacy-test-pages.glitch.me/privacy-protections/query-parameters/" +- pressKey: Enter +- assertVisible: + text: ".*Got It.*" +- tapOn: + text: "HIDE" +- assertVisible: + text: "HIDE TIPS FOREVER" +- tapOn: + text: "HIDE TIPS FOREVER" +- assertVisible: + text: "Link which should not be rewritten" +- tapOn: + text: "Link which should not be rewritten" +- assertVisible: + text: "q=something&id=1234"