This repository was archived by the owner on Mar 26, 2026. It is now read-only.
Commit 3f3b32f
authored
Add upgrade test (#1788)
* Add upgrade tests workflow and UI test
Add a GitHub Actions workflow (upgrade_tests.yml) to run upgrade verification on a self-hosted macOS runner: it creates a simulator, installs/builds an old tagged release to create a wallet, then checks out the current SHA and verifies the wallet survives the upgrade. Add a new UITest (UpgradeVerificationTests.swift) that asserts onboarding is skipped and the Bitcoin receive flow still shows the expected address. Update Gem.xcodeproj to include the new test file and extend the justfile to add test-upgrade-setup and test-upgrade-verify targets and allow running _test-ui for a specific test target.
* Temporarily enable pull_request trigger for testing
Add a pull_request trigger scoped to the main branch to exercise the upgrade_tests workflow on this branch. A TODO notes that the pull_request trigger should be removed before merging; workflow_dispatch inputs are unchanged.
* Use xcodebuild in upgrade_tests; bump default
Update the upgrade_tests GitHub Actions workflow to use explicit xcodebuild commands for resolving packages, building UI tests, and running a targeted test, replacing several just tasks. Bump the default old_version input (and related env/job name) from 1.3.327 to 1.3.335 and clarify the input description (must be >= 1.3.328). Reorganize and rename steps to separate Phase 1 (build/run old version to create wallet) and Phase 2 (build/run current version to verify), and pipe xcodebuild output through xcbeautify for cleaner CI logs.
* Add waitForExistence checks to UI upgrade test
Improve stability of UpgradeVerificationTests by waiting for UI elements before interacting with them. Store buttons in local variables and assert their existence with timeouts (10s for asset and action buttons, 5s for the address) to reduce flakiness when tapping elements after an app upgrade.
* Adjust UI test message and wallet service mock
Refines tests to improve clarity and stability. In UpgradeVerificationTests the Bitcoin asset assertion message was updated to mention 'after upgrade' and a subsequent bitcoin address existence assertion was removed (to avoid a brittle check). In WalletServiceTests the WalletService.mock is now created with an injected walletStore backed by a mocked DB pre-populated with the Ethereum chain so the test has the expected initial state for deleteLastWalletNotifiesObservers.
* Update upgrade verification UI test flow
Replace the old Receive->SelectAsset->Copy flow with a Wallet-detail based verification. The test now navigates to the Wallets screen, opens wallet settings (gearshape), taps Show Secret Phrase, proceeds through the security reminder, and verifies the displayed secret phrase words against UITestKitConstants. This adapts the test to the updated UI and ensures the wallet keys were not corrupted after upgrade.
* Replace CI upgrade test with local script
Remove GitHub Actions workflow and consolidate upgrade test into a single
`just test-upgrade <commit>` command that uses git worktree for isolation.
* Remove SPM cache
Update build-system/scripts/upgrade-test.sh to remove explicit SPM cache and parallel build settings. Deleted OLD_SPM_CACHE and SPM_CACHE variables and removed BUILD_THREADS. Also removed -clonedSourcePackagesDirPath, -parallelizeTargets and -jobs from xcodebuild invocations, simplifying the script's build/test commands.1 parent c13ec8e commit 3f3b32f
4 files changed
Lines changed: 124 additions & 0 deletions
File tree
- Gem.xcodeproj
- GemUITestsAppTests
- build-system/scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| 230 | + | |
229 | 231 | | |
230 | 232 | | |
231 | 233 | | |
| |||
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
| 572 | + | |
570 | 573 | | |
571 | 574 | | |
572 | 575 | | |
| |||
1169 | 1172 | | |
1170 | 1173 | | |
1171 | 1174 | | |
| 1175 | + | |
1172 | 1176 | | |
1173 | 1177 | | |
1174 | 1178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
141 | 145 | | |
142 | 146 | | |
143 | 147 | | |
| |||
0 commit comments