Skip to content

Commit

Permalink
ci(e2e): run tests on iOS 17.2 or merges to main (#4989)
Browse files Browse the repository at this point in the history
### Description

Runs our e2e test suite on iOS 17.2 on merges to main. Also closes
simulators at the end of each run to prevent CI machines from having iOS
15.0 and iOS 17.2 simulators active on the machine.

### Test plan

- Tested locally on iOS
- Tested in CI: [action
run](https://github.com/valora-inc/wallet/actions/runs/8071629141/job/22051669825?pr=4989).

### Related issues

- Fixes ACT-1102

### Backwards compatibility

N/A

### Network scalability

N/A
  • Loading branch information
MuckT committed Feb 28, 2024
1 parent 7c749f7 commit 3184462
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/e2e-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,6 @@ jobs:
with:
name: ios-${{ inputs.ios-version }}-test-report
path: e2e/test-results
- name: 'Close simulators'
if: always()
run: xcrun simctl shutdown all
2 changes: 1 addition & 1 deletion .github/workflows/e2e-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
max-parallel: 2
fail-fast: false
matrix:
ios-version: ['15.0']
ios-version: ['15.0', '17.2']
uses: ./.github/workflows/e2e-ios.yml
with:
ios-version: ${{ matrix.ios-version }}
Expand Down
4 changes: 1 addition & 3 deletions e2e/src/usecases/RestoreAccountOnboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ export default RestoreAccountOnboarding = () => {
}

// start wallet import
await waitFor(element(by.id('ImportWalletButton')))
.toBeVisible()
.withTimeout(1000 * 5)
await scrollIntoView('Restore', 'ImportWalletKeyboardAwareScrollView')
await element(by.id('ImportWalletButton')).tap()

// verification step comes after restoring wallet, skip this step
Expand Down
4 changes: 1 addition & 3 deletions e2e/src/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,7 @@ export async function quickOnboarding(mnemonic = SAMPLE_BACKUP_KEY) {
await device.pressBack()
}

await waitFor(element(by.id('ImportWalletButton')))
.toBeVisible()
.withTimeout(1000 * 5)
await scrollIntoView('Restore', 'ImportWalletKeyboardAwareScrollView')
await element(by.id('ImportWalletButton')).tap()

try {
Expand Down
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,13 @@
"os": "iOS 15.0"
}
},
"simulator.17.2": {
"type": "ios.simulator",
"device": {
"type": "iPhone SE (3rd generation)",
"os": "iOS 17.2"
}
},
"emulator": {
"type": "android.emulator",
"device": {
Expand All @@ -419,6 +426,10 @@
"device": "simulator.15.0",
"app": "ios.release"
},
"ios.release.17.2": {
"device": "simulator.17.2",
"app": "ios.release"
},
"android.debug": {
"device": "emulator",
"app": "android.debug"
Expand Down
1 change: 1 addition & 0 deletions src/import/ImportWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ function ImportWallet({ navigation, route }: Props) {
!keyboardVisible && insets && { marginBottom: insets.bottom },
]}
keyboardShouldPersistTaps={'always'}
testID="ImportWalletKeyboardAwareScrollView"
>
<Text style={styles.title}>{t('importExistingKey.title')}</Text>
<Text style={styles.description}>{t('importExistingKey.description')}</Text>
Expand Down

0 comments on commit 3184462

Please sign in to comment.