Skip to content

Commit 60e51d2

Browse files
test: Run Snaps E2E on main build (#29322)
## **Description** This PR enables `CAN_INSTALL_THIRD_PARTY_SNAPS` when `isTest` is true (e.g. in the E2E environments) in an effort to run the Snaps E2E suite on the main build type. It installs the preinstalled example Snap in the test environment as well. To make the tests pass, it was required to replace the **invalid** mocking of the Snaps Registry with a valid dump of the existing registry (matching the implementation in extension). Additionally this PR removes the Flask build tests including the CI configuration, this may need a sanity check. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: null ## **Related issues** https://consensyssoftware.atlassian.net/browse/WPC-984 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > CI coverage changes (removing Flask E2E jobs and adding Snaps smoke suites) can cause regressions in what’s exercised/gated in PRs. Runtime behavior is only loosened in non-production/test environments, but it still affects Snap availability during automated testing. > > **Overview** > Enables running the Snaps E2E smoke suite against the **main** build by allowing third-party Snaps when `isTest` is true and conditionally preinstalling the example Snap in test runs. > > Updates E2E API mocking to return a realistic Snaps registry payload (via `snaps-registry.txt`) and a fixed signature, replacing the previous empty ACL registry mocks. > > Reshapes CI E2E execution by **removing** the Android/iOS Flask E2E smoke workflows and their required checks, and **adding** new `SmokeSnaps` jobs (sharded) to the existing Android/iOS E2E smoke workflows and reports. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 0f77286. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent e98fbb5 commit 60e51d2

40 files changed

Lines changed: 5732 additions & 504 deletions

.github/workflows/ci.yml

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -613,42 +613,6 @@ jobs:
613613
}}
614614
secrets: inherit
615615

616-
# Flask E2E tests
617-
618-
e2e-smoke-tests-android-flask:
619-
name: 'Android Flask E2E Smoke Tests'
620-
if: ${{ github.event_name != 'merge_group' && !github.event.pull_request.head.repo.fork && (needs.needs_e2e_build.outputs.android_changed == 'true' || needs.smart-e2e-selection.outputs.force_run == 'true') }}
621-
permissions:
622-
contents: read
623-
id-token: write
624-
needs: [needs_e2e_build, build-android-apks, smart-e2e-selection]
625-
uses: ./.github/workflows/run-e2e-smoke-tests-android-flask.yml
626-
with:
627-
changed_files: ${{ needs.needs_e2e_build.outputs.changed_files }}
628-
selected_tags: >-
629-
${{
630-
(fromJSON(needs.smart-e2e-selection.outputs.ai_confidence || '0') >= 80 && needs.smart-e2e-selection.outputs.ai_e2e_test_tags) ||
631-
'["ALL"]'
632-
}}
633-
secrets: inherit
634-
635-
e2e-smoke-tests-ios-flask:
636-
name: 'iOS Flask E2E Smoke Tests'
637-
if: ${{ github.event_name != 'merge_group' && !github.event.pull_request.head.repo.fork && (needs.needs_e2e_build.outputs.ios_changed == 'true' || needs.smart-e2e-selection.outputs.force_run == 'true') }}
638-
permissions:
639-
contents: read
640-
id-token: write
641-
needs: [needs_e2e_build, ios-tests-ready, smart-e2e-selection]
642-
uses: ./.github/workflows/run-e2e-smoke-tests-ios-flask.yml
643-
with:
644-
changed_files: ${{ needs.needs_e2e_build.outputs.changed_files }}
645-
selected_tags: >-
646-
${{
647-
(fromJSON(needs.smart-e2e-selection.outputs.ai_confidence || '0') >= 80 && needs.smart-e2e-selection.outputs.ai_e2e_test_tags) ||
648-
'["ALL"]'
649-
}}
650-
secrets: inherit
651-
652616
# Fixture validation — ensures committed E2E fixtures match the live app state schema
653617
validate-e2e-fixtures:
654618
name: 'Validate E2E Fixtures'
@@ -862,8 +826,6 @@ jobs:
862826
- needs_e2e_build
863827
- e2e-smoke-tests-android
864828
- e2e-smoke-tests-ios
865-
- e2e-smoke-tests-android-flask
866-
- e2e-smoke-tests-ios-flask
867829
env:
868830
SKIPPED: ${{ needs.check-skip-merge-queue.outputs.skip-merge-queue == 'true' }}
869831
steps:
@@ -896,18 +858,6 @@ jobs:
896858
echo "iOS E2E tests failed (result: $IOS_RESULT)"
897859
exit 1
898860
fi
899-
900-
ANDROID_FLASK_RESULT="${{ needs.e2e-smoke-tests-android-flask.result }}"
901-
if [[ "$ANDROID_FLASK_RESULT" == "failure" ]] || [[ "$ANDROID_FLASK_RESULT" == "cancelled" ]]; then
902-
echo "Android Flask E2E tests failed (result: $ANDROID_FLASK_RESULT)"
903-
exit 1
904-
fi
905-
906-
IOS_FLASK_RESULT="${{ needs.e2e-smoke-tests-ios-flask.result }}"
907-
if [[ "$IOS_FLASK_RESULT" == "failure" ]] || [[ "$IOS_FLASK_RESULT" == "cancelled" ]]; then
908-
echo "iOS Flask E2E tests failed (result: $IOS_FLASK_RESULT)"
909-
exit 1
910-
fi
911861
fi
912862
913863
echo "All required jobs passed"

.github/workflows/run-e2e-smoke-tests-android-flask.yml

Lines changed: 0 additions & 198 deletions
This file was deleted.

.github/workflows/run-e2e-smoke-tests-android.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,22 @@ jobs:
243243
changed_files: ${{ inputs.changed_files }}
244244
secrets: inherit
245245

246+
snaps-android-smoke:
247+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeSnaps')
248+
strategy:
249+
matrix:
250+
split: [1, 2, 3]
251+
fail-fast: false
252+
uses: ./.github/workflows/run-e2e-workflow.yml
253+
with:
254+
test-suite-name: snaps-android-smoke-${{ matrix.split }}
255+
platform: android
256+
test_suite_tag: 'SmokeSnaps'
257+
split_number: ${{ matrix.split }}
258+
total_splits: 3
259+
changed_files: ${{ inputs.changed_files }}
260+
secrets: inherit
261+
246262
report-android-smoke-tests:
247263
name: Report Android Smoke Tests
248264
runs-on: ubuntu-latest
@@ -262,6 +278,7 @@ jobs:
262278
- multichain-api-android-smoke
263279
- seedless-onboarding-android-smoke
264280
- browser-android-smoke
281+
- snaps-android-smoke
265282
steps:
266283
- name: Checkout
267284
uses: actions/checkout@v4

0 commit comments

Comments
 (0)