From c57d4da5f4e5ab64ac406576a31a6d33ef200382 Mon Sep 17 00:00:00 2001 From: bwaresiak Date: Wed, 29 May 2024 13:30:51 +0200 Subject: [PATCH] Fix maestro config so it runs (#2896) Description: Maestro e2e tests fail as we apparently cannot filter out tests that are required to run in a specific order. In addition relying on ddg site for testing is prone to failures when strings change (e.g. due to experiments) --- .github/workflows/sync-end-to-end.yml | 10 +++++++++- .maestro/browser_features/swipe_tabs.yaml | 6 +++--- .maestro/config-sync | 15 +++++++++++++++ .maestro/config.yaml | 8 -------- 4 files changed, 27 insertions(+), 12 deletions(-) create mode 100644 .maestro/config-sync diff --git a/.github/workflows/sync-end-to-end.yml b/.github/workflows/sync-end-to-end.yml index c0fd320acc..0808ae0570 100644 --- a/.github/workflows/sync-end-to-end.yml +++ b/.github/workflows/sync-end-to-end.yml @@ -95,10 +95,18 @@ jobs: - name: Install Maestro run: | export MAESTRO_VERSION=1.36.0; curl -Ls "https://get.maestro.mobile.dev" | bash - + + - name: Overwrite default config with sync one + run: | + cp .maestro/config-sync .maestro/config.yaml + - name: Sync e2e tests run: | export PATH="$PATH":"$HOME/.maestro/bin"; maestro cloud --apiKey ${{ secrets.MAESTRO_CLOUD_API_KEY }} --env=CODE=${{ steps.sync-recovery-code.outputs.recovery-code }} --fail-on-timeout=true --timeout=150 --ios-version=${{ matrix.os-version }} --include-tags=sync DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app .maestro/ + + - name: Reset config + run: | + git checkout .maestro/config.yaml notify-failure: name: Notify on failure diff --git a/.maestro/browser_features/swipe_tabs.yaml b/.maestro/browser_features/swipe_tabs.yaml index d8a4d23f58..4f79623a01 100644 --- a/.maestro/browser_features/swipe_tabs.yaml +++ b/.maestro/browser_features/swipe_tabs.yaml @@ -20,7 +20,7 @@ tags: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://duckduckgo.com" +- inputText: "https://www.search-company.site" - pressKey: Enter # Manage onboarding @@ -31,7 +31,7 @@ tags: index: 0 file: ../shared/onboarding_browsing.yaml -- assertVisible: "Privacy, simplified." +- assertVisible: "Search engine" # Open New Tab - tapOn: "Tab Switcher" @@ -53,7 +53,7 @@ tags: start: 10%, 10% end: 90%, 10% -- assertVisible: "Privacy, simplified." +- assertVisible: "Search engine" # Ensure address bar still works - assertVisible: diff --git a/.maestro/config-sync b/.maestro/config-sync new file mode 100644 index 0000000000..13ee9dbe32 --- /dev/null +++ b/.maestro/config-sync @@ -0,0 +1,15 @@ +appStartup: + enabled: false +appSize: + enabled: false +flows: + - "**" +executionOrder: + flowsOrder: + - 01_create_account + - 02_login_account + - 03_recover_account + - 04_sync_data_setup + - 05_sync_data_check + - 06_delete_account + diff --git a/.maestro/config.yaml b/.maestro/config.yaml index 13ee9dbe32..fd2b9297ea 100644 --- a/.maestro/config.yaml +++ b/.maestro/config.yaml @@ -4,12 +4,4 @@ appSize: enabled: false flows: - "**" -executionOrder: - flowsOrder: - - 01_create_account - - 02_login_account - - 03_recover_account - - 04_sync_data_setup - - 05_sync_data_check - - 06_delete_account