Detox/E2E: Update android emulator using Pixel 4 XL (#5354)
* update android emulator using Pixel 4 XL for detox tests * update per comment
This commit is contained in:
parent
e7d5f2c194
commit
6cf94d7be6
9 changed files with 109 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -95,6 +95,7 @@ coverage
|
|||
mattermost-license.txt
|
||||
*.mattermost-license
|
||||
detox/artifacts
|
||||
detox/detox_pixel_4_xl_api_30
|
||||
|
||||
# Bundle artifact
|
||||
*.jsbundle
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
"binaryPath": "../android/app/build/outputs/apk/debug/app-debug.apk",
|
||||
"build": "cd .. && ./node_modules/.bin/jetify && cd android && ./gradlew clean assembleDebug assembleAndroidTest -DtestBuildType=debug && cd ../detox",
|
||||
"device": {
|
||||
"avdName": "detox_emu_api_30"
|
||||
"avdName": "detox_pixel_4_xl_api_30"
|
||||
}
|
||||
},
|
||||
"android.emu.release": {
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
"binaryPath": "../android/app/build/outputs/apk/release/app-release.apk",
|
||||
"build": "cd .. && ./node_modules/.bin/jetify && cd android && ./gradlew clean assembleRelease assembleAndroidTest -DtestBuildType=release && cd ../detox",
|
||||
"device": {
|
||||
"avdName": "detox_emu_api_30"
|
||||
"avdName": "detox_pixel_4_xl_api_30"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
49
detox/android_emulator/config.ini
Normal file
49
detox/android_emulator/config.ini
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
AvdId = Detox_Pixel_4_XL_API_30
|
||||
PlayStore.enabled = false
|
||||
abi.type = x86
|
||||
avd.ini.displayname = Detox Pixel 4 XL API 30
|
||||
avd.ini.encoding = UTF-8
|
||||
disk.dataPartition.size = 6g
|
||||
fastboot.chosenSnapshotFile =
|
||||
fastboot.forceChosenSnapshotBoot = no
|
||||
fastboot.forceColdBoot = no
|
||||
fastboot.forceFastBoot = yes
|
||||
hw.accelerometer = no
|
||||
hw.arc = false
|
||||
hw.gyroscope = no
|
||||
hw.audioInput = no
|
||||
hw.audioOutput = no
|
||||
hw.battery = yes
|
||||
hw.camera.back = virtualscene
|
||||
hw.camera.front = emulated
|
||||
hw.cpu.arch = x86
|
||||
hw.cpu.ncore = 4
|
||||
hw.dPad = no
|
||||
hw.device.hash2 = MD5:80326cf5b53c08af25d4243cb231faa9
|
||||
hw.device.manufacturer = Google
|
||||
hw.device.name = pixel_4_xl
|
||||
hw.gps = no
|
||||
hw.gpu.enabled = yes
|
||||
hw.gpu.mode = auto
|
||||
hw.initialOrientation = Portrait
|
||||
hw.keyboard = yes
|
||||
hw.lcd.density = 560
|
||||
hw.lcd.height = 3040
|
||||
hw.lcd.width = 1440
|
||||
hw.mainKeys = no
|
||||
hw.ramSize = 2048
|
||||
hw.sdCard = no
|
||||
hw.sensors.orientation = yes
|
||||
hw.sensors.proximity = yes
|
||||
hw.trackBall = no
|
||||
image.sysdir.1 = system-images/android-30/google_apis/x86/
|
||||
runtime.network.latency = none
|
||||
runtime.network.speed = full
|
||||
sdcard.size = 0
|
||||
showDeviceFrame = yes
|
||||
skin.dynamic = yes
|
||||
skin.name = pixel_4_xl
|
||||
skin.path = /change_to_absolute_path/pixel_4_xl_skin
|
||||
tag.display = Google APIs
|
||||
tag.id = google_apis
|
||||
vm.heapSize = 576
|
||||
BIN
detox/android_emulator/pixel_4_xl_skin/back.webp
Normal file
BIN
detox/android_emulator/pixel_4_xl_skin/back.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 532 KiB |
36
detox/android_emulator/pixel_4_xl_skin/layout
Normal file
36
detox/android_emulator/pixel_4_xl_skin/layout
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
parts {
|
||||
device {
|
||||
display {
|
||||
width 1440
|
||||
height 3040
|
||||
x 0
|
||||
y 0
|
||||
}
|
||||
}
|
||||
portrait {
|
||||
background {
|
||||
image back.webp
|
||||
}
|
||||
foreground {
|
||||
mask mask.webp
|
||||
cutout emu01
|
||||
}
|
||||
}
|
||||
}
|
||||
layouts {
|
||||
portrait {
|
||||
width 1571
|
||||
height 3332
|
||||
event EV_SW:0:1
|
||||
part1 {
|
||||
name portrait
|
||||
x 0
|
||||
y 0
|
||||
}
|
||||
part2 {
|
||||
name device
|
||||
x 61
|
||||
y 195
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
detox/android_emulator/pixel_4_xl_skin/mask.webp
Normal file
BIN
detox/android_emulator/pixel_4_xl_skin/mask.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
1
detox/android_emulator/quickbootChoice.ini
Normal file
1
detox/android_emulator/quickbootChoice.ini
Normal file
|
|
@ -0,0 +1 @@
|
|||
saveOnExit = true
|
||||
19
detox/create_android_emulator.sh
Executable file
19
detox/create_android_emulator.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
set -o pipefail
|
||||
|
||||
NAME=detox_pixel_4_xl_api_30
|
||||
|
||||
if emulator -list-avds | grep -q $NAME; then
|
||||
echo "'${NAME}' Android virtual device already exists."
|
||||
else
|
||||
# Create virtual device in a relative "detox_pixel_4_xl_api_30" folder
|
||||
avdmanager create avd -n $NAME -k 'system-images;android-30;google_apis;x86' -g google_apis -p $NAME -d 'pixel'
|
||||
|
||||
# Copy predefined config and skin
|
||||
cp -r android_emulator/ $NAME/
|
||||
sed -i -e "s|skin.path = /change_to_absolute_path/pixel_4_xl_skin|skin.path = $(pwd)/${NAME}/pixel_4_xl_skin|g" $NAME/config.ini
|
||||
|
||||
echo "Android virtual device successfully created: ${NAME}"
|
||||
fi
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
"uuid": "8.3.2"
|
||||
},
|
||||
"scripts": {
|
||||
"e2e:android-create-emulator": "avdmanager create avd -n detox_emu_api_30 -k 'system-images;android-30;google_apis;x86' -g google_apis -d 'pixel'",
|
||||
"e2e:android-create-emulator": "./create_android_emulator.sh",
|
||||
"e2e:android-build": "detox build -c android.emu.debug",
|
||||
"e2e:android-test": "detox test -c android.emu.debug",
|
||||
"e2e:android-build-release": "detox build -c android.emu.release",
|
||||
|
|
|
|||
Loading…
Reference in a new issue