### Start iOS Development Environment Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/dev.md Commands to start the iOS development environment, including starting the Metro development server and running the application on the iOS simulator. It also includes a TMUX one-liner for a two-pane setup. ```bash yarn start yarn ios ``` ```bash tmux new-session -d -s mySession 'yarn start' \; split-window -h 'yarn ios' \; attach-session -d -t mySession ``` -------------------------------- ### Start Android Development Environment Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/dev.md Commands to start the Android development environment, including the Metro development server, the Android emulator, and running the application on the emulator. It also includes a TMUX one-liner for a multi-pane setup. ```bash yarn start make emulator yarn android ``` ```bash tmux new-session -d -s mySession 'yarn start' \; split-window -h 'sleep 3 && yarn android' \; select-pane -t 0 \; split-window -v 'make emulator' \; attach-session -d -t mySession ``` -------------------------------- ### Xcode and Simulator Setup using xcodes CLI Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/dev.md Commands to install specific Xcode versions and iOS simulator runtimes using the 'xcodes' command-line interface. This simplifies the process of ensuring compatibility with the development environment. ```bash xcodes install 16.4 # Or whatever version direnv tells you about xcodes runtimes install "iOS 18.5" # Or the latest iOS out there ``` -------------------------------- ### TMUX One-Liner for E2E Setup Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md A single tmux command to set up a multi-pane terminal environment for running E2E tests. It includes commands for setting up the local backend, starting the development server, and optionally launching an Android emulator. ```shell tmux new-session \; \ send-keys 'make tilt-up' C-m \; \ split-window -h \; \ send-keys 'yarn start' C-m \; \ split-window -v \; \ send-keys 'make emulator' C-m \; \ select-pane -t 0 \; \ split-window -v \; \ select-pane -t 3 ``` -------------------------------- ### Build and Test Android E2E with Detox Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Commands to build and run E2E tests on Android emulators using Detox. Requires local backend setup and the 'yarn start' process running in the background. ```shell yarn e2e:build android.emu.debug yarn e2e:test android.emu.debug ``` -------------------------------- ### Allow Direnv to Run Setup Scripts Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/dev.md Allows Direnv to execute its configuration scripts, which downloads project dependencies, sets up the NodeJS runtime, Android SDKs, creates an AVD, and builds Ruby. It also checks for supported Xcode versions on macOS. ```bash direnv allow ``` -------------------------------- ### Install Node and Cocoapods Dependencies Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/dev.md Installs project dependencies using Yarn, including Node.js modules and Cocoapods for iOS development. This command should be run after the project has been cloned and Direnv has been allowed. ```bash yarn install ``` -------------------------------- ### Install Appium v2 and Drivers Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Instructions to install Appium v2 globally using npm and install necessary drivers for Android (uiautomator2) and iOS (xcuitest) automation. Verification command is also included. ```shell npm install -g appium@next appium driver install uiautomator2 appium driver install xcuitest appium --version ``` -------------------------------- ### Appium Troubleshooting Command Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md A command to run Appium Doctor, a utility that checks the installed Appium components and their configurations to help diagnose and resolve installation or setup issues. ```shell yarn appium-doctor ``` -------------------------------- ### Build and Test iOS E2E with Detox Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Commands to build and run E2E tests on iOS simulators using Detox. This process must be performed on a Mac. Requires local backend setup and the 'yarn start' process running in the background. ```shell yarn e2e:build ios.sim.debug yarn e2e:test ios.sim.debug ``` -------------------------------- ### Clone Blink Mobile Repository Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/dev.md Clones the Blink Mobile repository to your local machine and navigates into the project directory. This is the initial step for setting up the development environment. ```bash git clone git@github.com:GaloyMoney/blink-mobile.git cd blink-mobile ``` -------------------------------- ### Local Appium Testing Workflow Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Steps to perform local E2E testing with Appium. This involves running the debug version of the app, starting the Appium server, and then executing the platform-specific test commands. ```shell # In one terminal: yarn android or yarn ios # In a new terminal: yarn start:appium # In another new terminal: yarn test:e2e:android or yarn test:e2e:ios ``` -------------------------------- ### Manually Set Android Test Device Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Example of manually setting the environment variable for the Android test device and specifying the APK path for E2E testing. ```shell TEST_DEVICE_ANDROID="Pixel 3 API 29" yarn test:e2e:android TEST_APK_PATH="./android/app/build/outputs/apk/debug/app-universal-debug.apk" ``` -------------------------------- ### Manually Set iOS Test Device Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Example of manually setting the environment variable for the iOS test device for E2E testing. ```shell TEST_DEVICE_IOS="iPhone 13" yarn test:e2e:ios ``` -------------------------------- ### BrowserStack E2E Testing Setup Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Environment variables required to configure and run E2E tests on BrowserStack. These variables include user credentials, access key, and the application ID for the app hosted on BrowserStack. ```shell export BROWSERSTACK_USER=YOURUSER export BROWSERSTACK_ACCESS_KEY=YOURKEY export BROWSERSTACK_APP_ID=bs://YOURAPPID yarn test:browserstack:android ``` -------------------------------- ### Required Environment Variables for E2E Testing Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md A list of essential environment variables required for E2E testing, including tokens for authentication, MailSlurp API key, and device type specification. Suggests using direnv for managing these variables. ```shell GALOY_TEST_TOKENS={YOUR_TOKEN} GALOY_TOKEN_2={SECOND_WALLET_TOKEN} MAILSLURP_API_KEY={MAILSLURP_API_API_KEY} E2E_DEVICE={ios or android} ``` -------------------------------- ### Run Specific iOS Tests Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Command to run specific iOS E2E tests by providing the test name. This method allows running tests without clearing the application state, useful for debugging or focused testing. ```shell yarn test-ios [test-name] ``` -------------------------------- ### Appium Inspector Desired Capabilities for Android Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md JSON configuration for Appium Inspector to connect to an Android emulator. Specifies platform, app path, device name, and automation name. ```json { "platformName": "Android", "appium:app": "/path/to/code/blink-mobile/android/app/build/outputs/apk/debug/app-universal-debug.apk", "appium:deviceName": "generic_x86", "appium:automationName": "UiAutomator2" } ``` -------------------------------- ### Appium Inspector Desired Capabilities for iOS Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md JSON configuration for Appium Inspector to connect to an iOS simulator. Specifies platform, device name, bundle ID, and automation name. ```json { "platformName": "iOS", "appium:deviceName": "iPhone 13", "appium:bundleId": "io.galoy.bitcoinbeach", "appium:automationName": "XCUITest" } ``` -------------------------------- ### Disable State Reset for Local Development Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md Environment variable setting to disable the state reset feature between tests during local development. This is useful for maintaining application state across multiple test runs. ```shell export NO_RESET=true ``` -------------------------------- ### Appium Inspector Desired Capabilities for iOS on BrowserStack Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md JSON configuration for Appium Inspector to connect to an iOS device on BrowserStack. Includes device name, automation name, platform version, and the app identifier from BrowserStack. ```json { "appium:deviceName": "iPhone 13", "appium:automationName": "XCUITest", "appium:platformVersion": "15.1", "appium:app": "bs://{YOUR_BROWSERSTACK_ID_FROM_CIRCLE_CI}" } ``` -------------------------------- ### TypeScript Helper for E2E Test IDs Source: https://github.com/blinkbitcoin/blink-mobile/blob/main/docs/e2e-testing.md A TypeScript function `testProps` used in E2E tests to assign unique identifiers, accessibility labels, and ensure accessibility for UI components. This helps in reliably locating elements during automated testing. ```typescript // This is used for E2E tests to apply id's to a // Usage: //