From 72dbb345a19800b2db977dec74d323b3c90dcd7a Mon Sep 17 00:00:00 2001 From: Sabrina Tardio Date: Mon, 15 Jan 2024 10:05:02 +0100 Subject: [PATCH 1/6] fix tests --- .maestro/shared/copy_recovery_code_from_settings.yaml | 4 ++-- .maestro/shared/set_internal_user_from_settings.yaml | 6 ++++-- .maestro/shared/sync_create.yaml | 3 +-- .maestro/shared/sync_verify_unified_favorites.yaml | 2 +- .maestro/sync_tests/04_sync_data.yaml | 6 ++++++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.maestro/shared/copy_recovery_code_from_settings.yaml b/.maestro/shared/copy_recovery_code_from_settings.yaml index 16ab4cfebf..7f266e68ea 100644 --- a/.maestro/shared/copy_recovery_code_from_settings.yaml +++ b/.maestro/shared/copy_recovery_code_from_settings.yaml @@ -6,8 +6,8 @@ appId: com.duckduckgo.mobile.ios - scroll - scroll - scroll -- assertVisible: Debug Menu -- tapOn: Debug Menu +- assertVisible: All debug options +- tapOn: All debug options - tapOn: Sync Info - tapOn: Paste and Copy Recovery Code - inputText: ${CODE} diff --git a/.maestro/shared/set_internal_user_from_settings.yaml b/.maestro/shared/set_internal_user_from_settings.yaml index 97d6e6c9c4..fefcc20b78 100644 --- a/.maestro/shared/set_internal_user_from_settings.yaml +++ b/.maestro/shared/set_internal_user_from_settings.yaml @@ -4,7 +4,9 @@ appId: com.duckduckgo.mobile.ios - scroll - scroll - scroll -- assertVisible: Debug Menu -- tapOn: Debug Menu +- assertVisible: All debug options +- tapOn: All debug options - tapOn: Internal User State +- tapOn: Settings +- tapOn: Done - tapOn: Settings \ No newline at end of file diff --git a/.maestro/shared/sync_create.yaml b/.maestro/shared/sync_create.yaml index bcb1968ebe..f7be860848 100644 --- a/.maestro/shared/sync_create.yaml +++ b/.maestro/shared/sync_create.yaml @@ -1,12 +1,11 @@ appId: com.duckduckgo.mobile.ios --- -- assertVisible: Sync & Backup - tapOn: Sync & Backup - assertVisible: Sync & Backup - tapOn: Sync and Back Up This Device - assertVisible: You can sync with your other devices later. -- tapOn: Turn on Sync & Backup +- tapOn: Turn On Sync & Back Up - assertVisible: Save Recovery Code - tapOn: Copy Code - tapOn: Next diff --git a/.maestro/shared/sync_verify_unified_favorites.yaml b/.maestro/shared/sync_verify_unified_favorites.yaml index e23b239ac8..843a223a65 100644 --- a/.maestro/shared/sync_verify_unified_favorites.yaml +++ b/.maestro/shared/sync_verify_unified_favorites.yaml @@ -3,7 +3,7 @@ appId: com.duckduckgo.mobile.ios - tapOn: Sync & Backup - scroll -- assertVisible: Unify Favorites +- assertVisible: Unify Favorites Across Devices - tapOn: rightOf: id: "UnifiedFavoritesToggle" diff --git a/.maestro/sync_tests/04_sync_data.yaml b/.maestro/sync_tests/04_sync_data.yaml index 20605a75f8..48f6a617ad 100644 --- a/.maestro/sync_tests/04_sync_data.yaml +++ b/.maestro/sync_tests/04_sync_data.yaml @@ -23,6 +23,12 @@ tags: - tapOn: Close Tabs and Clear Data # Add local login +- runFlow: + when: + visible: + text: "Cancel" + commands: + - tapOn: Cancel - tapOn: Settings - runFlow: file: ../shared/add_login_from_settings.yaml From 8274d0013e4aa554ee836258a5a37b129f1792c4 Mon Sep 17 00:00:00 2001 From: Sabrina Tardio Date: Mon, 15 Jan 2024 10:11:32 +0100 Subject: [PATCH 2/6] run test --- .github/workflows/sync-end-to-end.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/sync-end-to-end.yml index 025aaae511..f2857ed750 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/sync-end-to-end.yml @@ -1,6 +1,7 @@ name: Sync-End-to-End tests on: + pull_request: schedule: - cron: '0 5 * * *' # run at 5 AM UTC From c4eaf243dbfd81b07acb7e2d517d23c808e5bd25 Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Tue, 16 Jan 2024 13:07:14 +0100 Subject: [PATCH 3/6] Use XL runners --- .github/workflows/sync-end-to-end.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/sync-end-to-end.yml index f2857ed750..fa95d0c031 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/sync-end-to-end.yml @@ -8,7 +8,7 @@ on: jobs: build-for-sync-end-to-end-tests: name: Build for Sync End To End Tests - runs-on: macos-13 + runs-on: macos-13-xlarge timeout-minutes: 30 steps: @@ -66,7 +66,7 @@ jobs: sync-end-to-end-tests: name: Sync End To End Tests needs: build-for-sync-end-to-end-tests - runs-on: macos-13 + runs-on: macos-13-xlarge timeout-minutes: 60 strategy: matrix: From a3815d7bbe799a4f03b9c21d9ebcf8b7bf089e37 Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Tue, 16 Jan 2024 13:14:55 +0100 Subject: [PATCH 4/6] Build all architectures (to have x86 built, as required by Maestro Cloud) --- .github/workflows/sync-end-to-end.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/sync-end-to-end.yml index fa95d0c031..31dfc4a1ee 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/sync-end-to-end.yml @@ -45,6 +45,7 @@ jobs: -destination "platform=iOS Simulator,name=iPhone 14" \ -derivedDataPath "DerivedData" \ -skipPackagePluginValidation \ + ONLY_ACTIVE_ARCH=NO \ | tee xcodebuild.log - name: Store Binary From 425026fc8acc742b7dc16d399cff473f4d637128 Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Tue, 16 Jan 2024 13:46:49 +0100 Subject: [PATCH 5/6] Fix non-sync end-to-end tests workflow --- .github/workflows/end-to-end.yml | 12 +++++++----- .github/workflows/sync-end-to-end.yml | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/end-to-end.yml index 2fcfe9b64e..b63bccb8f3 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/end-to-end.yml @@ -1,13 +1,14 @@ name: End-to-End tests on: + pull_request: schedule: - cron: '0 4 * * *' # run at 4 AM UTC jobs: end-to-end-tests: name: End to end Tests - runs-on: macos-13 + runs-on: macos-13-xlarge steps: - name: Check out the code @@ -40,13 +41,14 @@ jobs: run: | set -o pipefail && xcodebuild \ -scheme "DuckDuckGo" \ - -destination "platform=iOS Simulator,name=iPhone 14,OS=16.4" \ + -destination "platform=iOS Simulator,name=iPhone 15" \ -derivedDataPath "DerivedData" \ -skipPackagePluginValidation \ + ONLY_ACTIVE_ARCH=NO \ | tee xcodebuild.log - name: Release tests - uses: mobile-dev-inc/action-maestro-cloud@v1.4.1 + uses: mobile-dev-inc/action-maestro-cloud@v1.8.0 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app @@ -54,7 +56,7 @@ jobs: include-tags: release - name: Privacy tests - uses: mobile-dev-inc/action-maestro-cloud@v1.4.1 + uses: mobile-dev-inc/action-maestro-cloud@v1.8.0 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app @@ -62,7 +64,7 @@ jobs: include-tags: privacy - name: Ad Click Detection Flow tests - uses: mobile-dev-inc/action-maestro-cloud@v1.4.1 + uses: mobile-dev-inc/action-maestro-cloud@v1.8.0 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/sync-end-to-end.yml index 31dfc4a1ee..4924867caf 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/sync-end-to-end.yml @@ -42,7 +42,7 @@ jobs: run: | set -o pipefail && xcodebuild \ -scheme "DuckDuckGo" \ - -destination "platform=iOS Simulator,name=iPhone 14" \ + -destination "platform=iOS Simulator,name=iPhone 15" \ -derivedDataPath "DerivedData" \ -skipPackagePluginValidation \ ONLY_ACTIVE_ARCH=NO \ From c87c2b46d75f1aa5560541f5909742c98d398d05 Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Tue, 16 Jan 2024 15:01:19 +0100 Subject: [PATCH 6/6] Don't run E2E tests on pull requests --- .github/workflows/end-to-end.yml | 1 - .github/workflows/sync-end-to-end.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/end-to-end.yml index bba7d3bf28..2f31dc7bf3 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/end-to-end.yml @@ -1,7 +1,6 @@ name: End-to-End tests on: - pull_request: schedule: - cron: '0 4 * * *' # run at 4 AM UTC diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/sync-end-to-end.yml index 4924867caf..78d7e2ad1e 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/sync-end-to-end.yml @@ -1,7 +1,6 @@ name: Sync-End-to-End tests on: - pull_request: schedule: - cron: '0 5 * * *' # run at 5 AM UTC