-
Notifications
You must be signed in to change notification settings - Fork 5
chore: Playwright tests for mobile #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
WiktorStarczewski
wants to merge
31
commits into
main
Choose a base branch
from
wiktor-mobile-playwright
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
1361cb9
feat: Add mobile E2E testing framework with Appium + WebdriverIO
WiktorStarczewski 0973802
fix: Mobile E2E tests - fix biometric toggle and WebView helpers
WiktorStarczewski eed0a88
feat: trim whitespace from seed phrase inputs
WiktorStarczewski fcf446c
feat: add Android E2E test support with platform-aware selectors
WiktorStarczewski 4916135
fix: Android E2E selectors for send/receive tests
WiktorStarczewski 73d36e6
feat: add iOS E2E test support for send/receive flows
WiktorStarczewski 3ab42c1
chore: add mobile-e2e screenshots and logs to gitignore
WiktorStarczewski 008b05a
feat: add aria-label and data-testid to NavigationHeader buttons
WiktorStarczewski f9c1fc0
refactor: remove redundant wallet-features.spec.ts, add send/receive …
WiktorStarczewski dbdd92a
fix: use WebView JS navigation for Android E2E test cleanup
WiktorStarczewski d09304a
perf: use simctl to clear iOS app data instead of fullReset
WiktorStarczewski 765136a
docs: add mobile E2E testing guide and CI workflow notes to CLAUDE.md
WiktorStarczewski 9fc3762
refactor: move mobile E2E to pr.yml, add Android test runner script
WiktorStarczewski fd03689
chore: update translation files
github-actions[bot] d6e0130
Potential fix for code scanning alert no. 16: Workflow does not conta…
WiktorStarczewski 9ea9ca3
Potential fix for code scanning alert no. 18: Workflow does not conta…
WiktorStarczewski f489ee9
Potential fix for code scanning alert no. 17: Workflow does not conta…
WiktorStarczewski e205535
fix: exclude mobile-e2e from Jest test runner
WiktorStarczewski 7b0d6b4
fix: use xcodeproj instead of xcworkspace for iOS CI build
WiktorStarczewski 2745068
fix: use workspace for iOS CI, update to Java 21 for Android
WiktorStarczewski 72d8b8f
fix: commit Package.resolved for iOS SPM, handle existing Appium driver
WiktorStarczewski 7bc7c4b
fix: pin capacitor-swift-pm to 8.0.0 for plugin compatibility
WiktorStarczewski 55096a5
fix: simplify Android emulator setup, use API 31 with default target
WiktorStarczewski dba08c5
fix: update capacitor-swift-pm to 8.0.1, fix Android E2E emulator config
WiktorStarczewski 7a4e4a2
fix: remove splash-screen plugin in CI, update Package.resolved to 8.0.1
WiktorStarczewski 18840f2
fix: allow iOS E2E to fail (SPM bug), use npx wdio for Android
WiktorStarczewski a953328
fix: allow Android E2E to fail (emulator stability issues)
WiktorStarczewski 6e0007f
fix: start Appium manually in CI, skip wdio Appium service in CI
WiktorStarczewski 2591a65
chore: disable iOS E2E tests until Capacitor SPM bug is fixed
WiktorStarczewski faf6971
fix: commit Package.resolved to fix iOS E2E CI builds
WiktorStarczewski e93c4f9
fix: increase Android E2E timeouts and enable KVM for faster emulator
WiktorStarczewski File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| name: Mobile E2E Tests | ||
| permissions: | ||
| contents: read | ||
|
|
||
| # This workflow is for manual runs only. | ||
| # PR runs are handled by pr.yml to coordinate with the translations job. | ||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| ios-e2e: | ||
| name: iOS E2E Tests | ||
| runs-on: macos-14 | ||
| timeout-minutes: 60 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Build mobile app | ||
| run: yarn build:mobile | ||
|
|
||
| - name: Sync Capacitor | ||
| run: npx cap sync ios | ||
|
|
||
| - name: Select Xcode version | ||
| run: sudo xcode-select -s /Applications/Xcode_15.4.app | ||
|
|
||
| - name: Build iOS app for simulator | ||
| run: | | ||
| xcodebuild -workspace ios/App/App.xcworkspace \ | ||
| -scheme App \ | ||
| -sdk iphonesimulator \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 15,OS=17.5' \ | ||
| -configuration Debug \ | ||
| -derivedDataPath ios/App/build \ | ||
| build | ||
|
|
||
| - name: Boot iOS Simulator | ||
| run: | | ||
| xcrun simctl boot "iPhone 15" || true | ||
| xcrun simctl list devices | ||
|
|
||
| - name: Install Appium | ||
| run: | | ||
| npm install -g appium | ||
| appium driver install xcuitest | ||
|
|
||
| - name: Start Appium server | ||
| run: | | ||
| appium --relaxed-security & | ||
| sleep 10 | ||
|
|
||
| - name: Run iOS E2E tests | ||
| run: yarn test:e2e:ios | ||
| env: | ||
| APPIUM_APP_PATH: ${{ github.workspace }}/ios/App/build/Build/Products/Debug-iphonesimulator/App.app | ||
|
|
||
| - name: Upload test screenshots | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ios-e2e-screenshots | ||
| path: mobile-e2e/screenshots/ | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload Appium logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ios-appium-logs | ||
| path: mobile-e2e/logs/ | ||
| retention-days: 7 | ||
|
|
||
| android-e2e: | ||
| name: Android E2E Tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 60 | ||
| permissions: | ||
| contents: read | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '21' | ||
| distribution: 'temurin' | ||
|
|
||
| - name: Setup Android SDK | ||
| uses: android-actions/setup-android@v3 | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --frozen-lockfile | ||
|
|
||
| - name: Build mobile app | ||
| run: yarn build:mobile | ||
|
|
||
| - name: Sync Capacitor | ||
| run: npx cap sync android | ||
|
|
||
| - name: Build Android APK | ||
| run: | | ||
| cd android | ||
| ./gradlew assembleDebug | ||
| cd .. | ||
|
|
||
| - name: Install Appium | ||
| run: | | ||
| npm install -g appium | ||
| appium driver install uiautomator2 || echo "Driver already installed" | ||
|
|
||
| - name: Run Android E2E tests | ||
| uses: reactivecircus/android-emulator-runner@v2 | ||
| timeout-minutes: 30 | ||
| with: | ||
| api-level: 31 | ||
| target: default | ||
| arch: x86_64 | ||
| emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-load | ||
| disable-animations: true | ||
| script: | | ||
| appium --relaxed-security & | ||
| sleep 10 | ||
| yarn test:e2e:android | ||
|
|
||
| - name: Upload test screenshots | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: android-e2e-screenshots | ||
| path: mobile-e2e/screenshots/ | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload Appium logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: android-appium-logs | ||
| path: mobile-e2e/logs/ | ||
| retention-days: 7 | ||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.