Skip to content

chore: Playwright tests for mobile#85

Draft
WiktorStarczewski wants to merge 31 commits intomainfrom
wiktor-mobile-playwright
Draft

chore: Playwright tests for mobile#85
WiktorStarczewski wants to merge 31 commits intomainfrom
wiktor-mobile-playwright

Conversation

@WiktorStarczewski
Copy link
Copy Markdown
Collaborator

  • Add mobile E2E testing framework using WebdriverIO + Appium

    • Support both iOS and Android platforms with cross-platform selectors
    • Add iOS and Android E2E jobs to PR workflow
    • Optimize iOS test performance using simctl data clearing instead of fullReset

    Changes

    Mobile E2E Framework (mobile-e2e/)

    • WebdriverIO + Appium setup with platform-specific configs for iOS and Android
    • Cross-platform selectors that work in native context using XPath
    • WebView helpers for JS execution when native selectors fail (React input values, inaccessible elements)
    • Test fixtures for app reset, wallet creation/import, and common flows

    Test Coverage

    • Onboarding tests: Create wallet, import from seed, seed phrase validation
    • Wallet tests: Send flow, receive flow with address display and QR code

    CI Integration

    • Added ios-e2e and android-e2e jobs to pr.yml with needs: translations
    • Manual-only mobile-e2e.yml workflow for standalone runs
    • Screenshots and logs uploaded on test failure

    Performance Optimizations

    • iOS: Use simctl to clear app data instead of fullReset: true (~30-40s savings per test file)
    • Android: Use WebView JS navigation for reliable test cleanup

    Component Improvements

    • Added aria-label and data-testid to NavigationHeader buttons for testability
    • Added data-testid to seed word inputs, password fields, and other form elements
    • Trim whitespace from seed phrase inputs for better UX

    Documentation

    • Comprehensive mobile E2E testing guide in CLAUDE.md
    • CI workflow notes about translations job ordering requirement

    Test plan

    • iOS E2E tests pass locally (~5 min)
    • Android E2E tests pass locally (~4 min)
    • CI jobs run successfully on PR

- Add wdio configuration for iOS and Android testing
- Add test fixtures for app state management and wallet setup
- Add WebView helpers for React controlled input handling
- Add selectors using XPath for native iOS context
- Add import wallet test that validates full onboarding flow
- Add accessibility improvements (aria-labels, data-testid)
- Enable WebView inspection for iOS debugging
- Add CI workflow for mobile E2E tests
- Fix disableBiometricsToggle() to find checkbox by name="enableBiometric"
- Add pause before disabling toggle to let async biometric check complete
- Update wallet fixtures to use WebView helpers for React inputs
- Add getSeedWordsFromBackup() helper for create wallet flow
- Fix verifySeedPhrase selector case sensitivity
- Increase wallet creation timeout to 180s
- Reorder create-wallet tests so wallet-creating test runs last
- Skip whitespace trimming test (app doesn't support this feature)
- Fix nav close button selector for Android WebView (aria-label not exposed)
- Add proper selectors for copy button, upload button, QR code, token list
- Update send/receive tests to use working Android selectors
- Add afterEach hooks to navigate back to Explore between tests
- Add bail:1 for faster test debugging
- Add WebView JS click helpers for iOS (clickLinkViaJS, clickExploreLink, navigateToHomeViaJS)
- iOS WebView Link components have accessible="false", requiring JS clicks
- Update send/receive tests to use platform-aware click methods
- Add send.spec.ts and receive.spec.ts to iOS test config
- Skip token selection test on iOS (CardItem onClick limitation)
- Move iOS and Android E2E jobs from mobile-e2e.yml to pr.yml
- Add needs: translations to prevent cancel-in-progress issues
- Add run-android-tests.sh for local emulator management
- Remove dapp-browser tests (not ready for CI)
- Add resetForTesting() for E2E test cleanup
- Update selectors and helpers for better cross-platform support
github-actions bot and others added 15 commits January 21, 2026 01:45
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Un-ignore and commit the workspace SPM Package.resolved so CI uses
the same pinned dependency versions as local builds, avoiding the
Capacitor 8 SPM API incompatibility that occurs during fresh resolution.
@WiktorStarczewski WiktorStarczewski marked this pull request as draft January 22, 2026 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants