Skip to content

Commit

Permalink
Clean up duplicate navigations in tests
Browse files Browse the repository at this point in the history
Remove 0_all test in favour of running each test individually.
  • Loading branch information
not-a-rootkit committed Apr 16, 2024
1 parent e6e775e commit e2cdc19
Show file tree
Hide file tree
Showing 8 changed files with 168 additions and 61 deletions.
41 changes: 0 additions & 41 deletions .maestro/security_tests/0_all.yaml

This file was deleted.

27 changes: 24 additions & 3 deletions .maestro/security_tests/1_-_AddressBarSpoof,_basicauth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
- doubleTapOn:
# 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"
- pressKey: Backspace
# Test 1 - using \u2028 character
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-basicauth-2028.html"
- pressKey: Enter

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

# Test
- tapOn: "run"
- assertVisible: "Example Domain"
- copyTextFrom:
Expand Down
26 changes: 24 additions & 2 deletions .maestro/security_tests/2_-_AddressBarSpoof,_aboutblank.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
- doubleTapOn:
# 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"
- pressKey: Backspace
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-about-blank-rewrite.html"
- pressKey: Enter

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

# Test
- tapOn: "Start"
# This test is expected to load "about:blank" not spoof the address bar with duckduckgo.com with the spoofed content.
- extendedWaitUntil:
Expand Down
27 changes: 24 additions & 3 deletions .maestro/security_tests/3_-_AddressBarSpoof,_appschemes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
# Test 1
- tapOn:
# 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"
- pressKey: Backspace
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-application-scheme.html"
- pressKey: Enter

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

# Test
- tapOn: "Start"
# This will try to open another app
- assertVisible: "Cancel"
Expand Down
27 changes: 24 additions & 3 deletions .maestro/security_tests/4_-_AddressBarSpoof,_b64_html.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
# Test 1
- doubleTapOn:
# 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"
- pressKey: Backspace
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-open-b64-html.html"
- pressKey: Enter

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

# Test
- tapOn: "Start"
# This test is expected to do nothing: loading base64 encoded HTML content in a new tab is blocked.
- copyTextFrom:
Expand Down
27 changes: 24 additions & 3 deletions .maestro/security_tests/5_-_AddressBarSpoof,_downloadpath.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
# Test Download
- doubleTapOn:
# 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"
- pressKey: Backspace
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-js-download-url.html"
- pressKey: Enter

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

# Test
- tapOn: "Start"
# Dismiss Download Prompt if shown
- runFlow:
Expand Down
27 changes: 24 additions & 3 deletions .maestro/security_tests/6_-_AddressBarSpoof,_formaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
# Test 1
- doubleTapOn:
# 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"
- pressKey: Backspace
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-form-action.html"
- pressKey: Enter

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

# Test
- tapOn: "run"
# Should navigate to duckduckgo.com without any spoofed HTML document content.
- copyTextFrom:
Expand Down
27 changes: 24 additions & 3 deletions .maestro/security_tests/7_-_AddressBarSpoof,_pagerewrite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,33 @@ appId: com.duckduckgo.mobile.ios
tags:
- securityTest
---
# Test 1
- doubleTapOn:
# 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"
- pressKey: Backspace
- inputText: "https://privacy-test-pages.site/security/address-bar-spoofing/spoof-js-page-rewrite.html"
- pressKey: Enter

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

# Test
- tapOn: "Start"
# Now check the address bar hasn't been updated too early resulting in spoofed content
- copyTextFrom:
Expand Down

0 comments on commit e2cdc19

Please sign in to comment.