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
echo "no" | avdmanager --verbose create avd --force --name "$SIMULATOR_NAME" --device "pixel" --package "$SIMULATOR_IMAGE" --tag "google_apis" --abi "x86" |
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
# Start the emulator | |
emulator -avd "$SIMULATOR_NAME" -no-snapshot -no-snapshot-load -verbose -noaudio -wipe-data -no-window -gpu swiftshader_indirect & | |
#you can also pass locale settings | |
-prop persist.sys.language=en -prop persist.sys.country=GB | |
# store PID of last executed process in the shell | |
EMULATOR_PID=$! |
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
WAIT_CMD="$ANDROID_HOME/platform-tools/adb wait-for-device shell getprop init.svc.bootanim" | |
until $WAIT_CMD | grep -m 1 stopped; do | |
echo "Waiting until emulator is booted..." | |
sleep 1 | |
done |
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
# Unlock the Lock Screen | |
$ANDROID_HOME/platform-tools/adb shell input keyevent 82 |
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
echo "Capturing logcat" | |
$ANDROID_HOME/platform-tools/adb logcat -c | |
$ANDROID_HOME/platform-tools/adb logcat >./logcat.log & | |
LOGCAT_PID=$! |
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
//in package.json | |
{ | |
"e2e:ios": "cavy run-ios --scheme GreenPassIssuerProdRelease --configuration Prod.Release -t 10 --verbose", | |
// "e2e:iosDebug": "cavy run-ios --scheme GreenPassIssuerProdDebug --configuration Prod.Debug -t 10 --verbose", | |
"e2e:android": "cavy run-android --variant=prodRelease -t 2 --verbose --xml" | |
// "e2e:androidDebug": "cavy run-android --variant=prodDebug -t 2 --verbose --xml" | |
} |
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
#!/usr/bin/env bash | |
echo "Running E2E tests" | |
# ( setopt posixbuiltin; set; ) | less | cat | |
# -n if not null | |
if [ -n "$APPCENTER_ANDROID_VARIANT" ]; then | |
echo "Setup Android simulator" |
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
/* | |
IMPORTANT NOTE: Do not use console.log in script below, | |
as the all logged values will be returned to calling shell script. | |
*/ | |
const xml2js = require('xml2js'); | |
const yargs = require('yargs'); | |
const argv = yargs | |
.command('convertXmlReport', 'Converts XML JUNIT report from cavy to JSON', { |
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
cavyResults=$(<./cavy_results.xml) | |
# read output from stdOut | |
templateDataString=$(node ./scripts/cavyParser/cavyResultsAsJson.js --convertXmlReport --xmlreport="$cavyResults" --subject="$SUBJECT" --appname="$APP_NAME") | |
# remove quotes from the start and the end, so we can embed it in into existing Sendgrid JSON request | |
templateData="${templateDataString%\"}" | |
templateData="${templateData#\"}" | |
echo "zipping attachements" | |
zip -r e2e-report.zip ./deviceLog.log ./reactLog.log ./cavy_results.xml ./jestOutput.txt | |
base64attachment=$(base64 ./e2e-report.zip) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>asd</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" /> | |
<style type="text/css"> | |
body, | |
p, | |
div { |