Skip to content

Commit

Permalink
test headless
Browse files Browse the repository at this point in the history
  • Loading branch information
yasserfaraazkhan committed Aug 26, 2024
1 parent a9d21c1 commit 6d47ff2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/e2e-detox-android-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,16 @@ jobs:
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --install 'system-images;android-31;google_apis;x86_64'
echo "no" | $ANDROID_HOME/cmdline-tools/latest/bin/avdmanager create avd -n pixel_6 -k 'system-images;android-31;google_apis;x86_64' --force --device "pixel_6"
echo "Emulator created successfully"
nohup $ANDROID_HOME/emulator/emulator -avd pixel_6 -no-snapshot -netdelay none -netspeed full -no-audio -no-boot-anim -accel on -gpu swiftshader_indirect -qemu -m 4096 > /dev/null 2>&1 &
# nohup $ANDROID_HOME/emulator/emulator -avd pixel_6 -no-snapshot -netdelay none -netspeed full -no-audio -no-boot-anim -accel on -gpu swiftshader_indirect -qemu -m 8192 > /dev/null 2>&1 &
nohup $ANDROID_HOME/emulator/emulator -avd pixel_6 -no-snapshot -netdelay none -netspeed full -no-audio -no-boot-anim -accel on -gpu swiftshader_indirect -no-window -qemu -m 8192 > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\''\r'\'') ]]; do sleep 1; done'
$ANDROID_HOME/platform-tools/adb devices
$ANDROID_HOME/platform-tools/adb shell input keyevent 82
$ANDROID_HOME/platform-tools/adb shell settings put global window_animation_scale 0
$ANDROID_HOME/platform-tools/adb shell settings put global transition_animation_scale 0
$ANDROID_HOME/platform-tools/adb shell settings put global animator_duration_scale 0
sleep 60
sleep 90
screencapture emulator-macos-13.jpg
$ANDROID_HOME/platform-tools/adb exec-out screencap -p > emulator-macos-13.png
Expand All @@ -227,6 +229,7 @@ jobs:

- name: Run Android Detox E2E Tests on macOS
run: |
adb shell am start -W -n com.mattermost.rnbeta/com.mattermost.rnbeta.MainActivity
cd detox && npm run e2e:android-test -- ${{ matrix.specs }}
- name: Upload Android Test Report
Expand Down

0 comments on commit 6d47ff2

Please sign in to comment.