Skip to content

Commit

Permalink
Merge branch 'main' into sam/vpn-snooze-initial-support
Browse files Browse the repository at this point in the history
* main: (24 commits)
  Add pixels to measure baseline for New Tab Page sections (#3024)
  backgrounding UI tests (#3021)
  improve bookmarks and favorites UI tests (#3019)
  [DuckPlayer] - 4. Remote Config (#3018)
  Updates BSK
  Fix issue when cancelling a download (#3030)
  Tentative fix for a crash and connectivity issues (#3027)
  autofill UI tests (#3012)
  scripts for running UI tests (#3000)
  Integrate RemoteMessaging with NewTabPage (#3017)
  Update to iOS 15 deployment target (#3001)
  Fire a pixel when removing the VPN configuration (#3014)
  Release 7.127.0-0 (#3020)
  point to BSK branch (#3016)
  [DuckPlayer] - 3. URL management & FE comms (#3007)
  Bump BSK version (#3011)
  New Tab Page layout and base elements (#3008)
  Remove Privacy Pro from device once expired account is deleted (#3009)
  Improvements to subscription settings (#2959)
  Toggle reports limiter (#3005)
  ...
  • Loading branch information
samsymons committed Jul 4, 2024
2 parents 6636459 + bd398e4 commit 5ff8d1e
Show file tree
Hide file tree
Showing 110 changed files with 4,218 additions and 793 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ Using a simulator where a physical device is unavailable is acceptable.

**OS Testing**:

* [ ] iOS 14
* [ ] iOS 15
* [ ] iOS 16
* [ ] iOS 17

**Theme Testing**:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ jobs:
set -o pipefail && xcodebuild \
-scheme "DuckDuckGo" \
-destination "platform=iOS Simulator,name=iPhone 14" \
-destination "platform=iOS Simulator,name=iPhone 15" \
-derivedDataPath "DerivedData" \
-configuration "Release" \
-skipPackagePluginValidation \
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ DerivedData/
Carthage/Checkouts
node_modules/

## UI Testing
.maestro/device_uuid.txt
xcodebuild.log

## Various settings
*.pbxuser
!default.pbxuser
Expand Down
19 changes: 19 additions & 0 deletions .maestro/clean_simulators.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Clean up simulators that were used for maestro.

echo
echo "Cleaning up maestro simulators. Error messages for shutdown simulators might appear."
echo

killall Simulator

device_id_list=$(xcrun simctl list | grep maestro | grep -oE '\([A-F0-9-]{36}\)' | tr -d '()' | sort | uniq)

if [ -z "$device_id_list" ]; then
exit 0
fi

# Iterate over each ID
echo "$device_id_list" | while read -r device_id; do
xcrun simctl shutdown $device_id
xcrun simctl delete $device_id
done
35 changes: 35 additions & 0 deletions .maestro/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/zsh

# Common constants and functions for use in UI test scripts

## Constants

project_root=$(realpath $(dirname $0)/..)
derived_data_path="$project_root"/DerivedData
app_location="$derived_data_path/Build/Products/Debug-iphonesimulator/DuckDuckGo.app"
device_uuid_path="$derived_data_path/device_uuid.txt"

echo
echo "Configuration: "
echo "project_root: $project_root"
echo "derived_data_path: $derived_data_path"
echo "app_location: $app_location"
echo "device_uuid_path: $device_uuid_path"

## Functions

fail() {
echo "‼️ $1"
echo
exit 1
}

check_command() {
if ! command -v "$1" &> /dev/null; then
echo "‼️ Error: $1 is not installed. See source of this script for information."
echo
exit 1
fi
}


75 changes: 75 additions & 0 deletions .maestro/release_tests/backgrounding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# backgrounding.yaml
appId: com.duckduckgo.mobile.ios
tags:
- release

---

# Set up
- clearState
- launchApp
- runFlow:
file: ../shared/onboarding.yaml

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

# Manage onboarding
- runFlow:
file: ../shared/onboarding_browsing.yaml

# Go home and hover there a bit
- pressKey: Home
- swipe:
start: 50%, 50%
end: 10%, 50%
- swipe:
start: 10%, 50%
end: 50%, 50%
- tapOn: "DuckDuckGo"

# Validate
- assertVisible: "Privacy Test Pages"
- assertVisible: "Browsing menu"
- tapOn: "Browsing menu"
- assertVisible: "Add Bookmark"
- tapOn: "Add Bookmark"
- tapOn:
id: PrivacyIcon
- assertVisible: "Protections are ON for this site"
- tapOn: "Done"

# Run background assertion from new tab page
- assertVisible: "Tab Switcher"
- tapOn: "Tab Switcher"
- tapOn: "New Tab"

# Go home and hover there a bit
- pressKey: Home
- swipe:
start: 50%, 50%
end: 10%, 50%
- swipe:
start: 10%, 50%
end: 50%, 50%
- tapOn: "DuckDuckGo"

# Check menus
- tapOn: "Cancel"
- tapOn: "Settings"
- assertVisible: "Default Browser"
- tapOn: "Done"

- assertVisible: "Bookmarks"
- tapOn: "Bookmarks"
- assertVisible: "Privacy Test Pages - Home"
- tapOn: "Done"

- assertVisible: "Tab Switcher"
- tapOn: "Tab Switcher"

82 changes: 82 additions & 0 deletions .maestro/release_tests/bookmarks-multi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# bookmarks-multi.yaml
appId: com.duckduckgo.mobile.ios
tags:
- release

---

# Set up
- clearState
- launchApp
- runFlow:
file: ../shared/onboarding.yaml

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

# Manage onboarding
- runFlow:
file: ../shared/onboarding_browsing.yaml

# Bookmark many pages
- evalScript: ${output.counter = 0}
- repeat:
while:
true: ${output.counter < 4}
commands:
- assertVisible:
id: "searchEntry"
- tapOn:
id: "searchEntry"
- inputText: ${ 'https://example.com/' + output.counter }
- pressKey: Enter
- assertVisible: "Example Domain"
- tapOn: "Tab Switcher"
- tapOn: "New Tab"
- evalScript: ${output.counter += 1}

- tapOn: "Cancel"
- tapOn: "Tab Switcher"
- tapOn: "Add all tabs as bookmarks"

- assertVisible: "Bookmark All Tabs?"
- tapOn: "Bookmark"
- tapOn: "Done"

- assertVisible: "Bookmarks"
- tapOn: "Bookmarks"

- tapOn: "Add Folder"
- inputText: "Examples"
- tapOn: "Save"

- tapOn: "Edit"

- evalScript: ${output.counter = 0}
- repeat:
while:
true: ${output.counter < 4}
commands:
- tapOn: "chevron"
- tapOn: "Examples"
- tapOn: "Save"
- evalScript: ${output.counter += 1}

- assertVisible: "Done"
- tapOn: "Done"
- assertNotVisible: "Example"
- assertVisible: "Examples"
- tapOn: "Edit"
- assertVisible: "Remove Examples"
- tapOn: "Remove Examples"
- tapOn: "Delete"
- assertVisible: "Delete Examples?"
- assertVisible: "Are you sure you want to delete this folder and 4 items?"
- tapOn: "Delete"
- tapOn: "Done"
- assertVisible: "No bookmarks added yet"
106 changes: 87 additions & 19 deletions .maestro/release_tests/bookmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,121 @@ tags:
- clearState
- launchApp
- runFlow:
when:
visible:
text: "Let’s Do It!"
index: 0
file: ../shared/onboarding.yaml

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

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

# Bookmark site
- assertVisible: "Browsing menu"
- tapOn: "Browsing menu"
- assertVisible: "Add Bookmark"
- tapOn: "Add Bookmark"

# Verify bookmark appears in search results and can be launched
- tapOn: "Tab Switcher"
- tapOn: "New Tab"
- assertVisible:
id: "searchEntry"
- tapOn:
id: "searchEntry"
- inputText: "pri"
- assertVisible: "Privacy Test Pages - Home"
- assertVisible: "privacy-test-pages.site"
- tapOn: "Privacy Test Pages - Home"

# Verify site has been bookmarked
- assertVisible: "Browsing menu"
- tapOn: "Browsing menu"
- assertVisible: "Bookmarks"
- tapOn: "Bookmarks"
- assertVisible: "Privacy Test Pages - Home"

# Delete bookmark
# Edit bookmark
- assertVisible: "Edit"
- tapOn: "Edit"
- assertVisible: "Remove Privacy Test Pages - Home"
- tapOn: "Remove Privacy Test Pages - Home"
- assertVisible:
text: "Delete"
index: 0
- tapOn:
text: "Delete"
index: 0
- tapOn: "chevron"
- assertVisible: "Add Folder"

# Add folder
- tapOn: "Add Folder"
- assertVisible: "Add Folder"
- assertVisible: "Save"
- assertVisible: "Bookmarks"
- assertVisible: "Title"
- tapOn: "Title"
- inputText: "Test Folder"
- tapOn: "Save"
- assertVisible: "Edit Bookmark"
- assertVisible: "Add Folder"
- assertVisible: "Test Folder"
- tapOn: "Save"
- tapOn: "Done"
- assertNotVisible: "Remove Privacy Test Pages - Home"
- assertVisible: "Test Folder"
- tapOn: "Test Folder"
- assertVisible: "Privacy Test Pages - Home"

# Move folder
- assertVisible: "Edit"
- tapOn: "Edit"
- tapOn: "chevron"
- assertVisible: "Add Folder"

- tapOn: "Add Folder"
- assertVisible: "Add Folder"
- assertVisible: "Save"
- assertVisible: "Bookmarks"
- assertVisible: "Title"
- tapOn: "Title"
- inputText: "Test Folder 2"
- tapOn: "Save"
- assertVisible: "Edit Bookmark"
- assertVisible: "Add Folder"
- assertVisible: "Test Folder"
- tapOn: "Save"
- tapOn: "Done"
- assertNotVisible: "Remove Privacy Test Pages - Home"
- assertVisible: "Test Folder"
- tapOn: "Test Folder"
- assertVisible: "Test Folder 2"
- tapOn: "Test Folder 2"

# Delete bookmark
- tapOn: "Edit"
- tapOn: "chevron"
- hideKeyboard
- assertVisible: "Delete"
- tapOn: "Delete"
- assertVisible: "Delete?"
- tapOn: "Delete"

# Verify site has been removed from bookmarks
- assertNotVisible: "Privacy Test Pages - Home"
- assertVisible: "Test Folder 2"
- assertVisible: "Test Folder"
- tapOn: "Test Folder"
- assertNotVisible: "Privacy Test Pages - Home"
- assertVisible: "Bookmarks"
- tapOn: "Bookmarks"

# Remove folder
- tapOn: "Edit"
- assertVisible: "Remove Test Folder"
- tapOn: "Remove Test Folder"
- assertVisible: "Delete"
- tapOn: "Delete"
- assertVisible: "Delete Test Folder?"
- tapOn: "Delete"
- assertVisible: "No bookmarks added yet"
- tapOn: "Done"
- tapOn: "Done"
Loading

0 comments on commit 5ff8d1e

Please sign in to comment.