diff --git a/.github/workflows/ios_e2e.sh b/.github/workflows/ios_e2e.sh index 5ebc0dda..8c43e340 100755 --- a/.github/workflows/ios_e2e.sh +++ b/.github/workflows/ios_e2e.sh @@ -1,10 +1,17 @@ #!/bin/bash -curl -Ls "https://get.maestro.mobile.dev" | bash -export PATH="$PATH":"$HOME/.maestro/bin" brew tap facebook/fb brew install facebook/fb/idb-companion +git clone https://github.com/bamlab/maestro.git +cd maestro +git checkout feat/prevent-driver-uninstall-ios +git submodule update --init +./gradlew distZip && unzip -o maestro-cli/build/distributions/maestro.zip -d dist +cd .. + +export PATH=$PATH:$(pwd)/maestro/dist/maestro/bin + yarn tsc --build && yarn workspace @perf-profiler/web-reporter build npx link-lerna-package-binaries @@ -22,6 +29,10 @@ echo $UDID # Install the app xcrun simctl install $UDID ./.github/workflows/fakeStore.app +maestro initDriver + +sleep 5 + # Launch the app # xcrun simctl launch $UDID $APPID diff --git a/packages/ios-poc/src/launchIOS.ts b/packages/ios-poc/src/launchIOS.ts index 5b360ac0..8d1ccb27 100644 --- a/packages/ios-poc/src/launchIOS.ts +++ b/packages/ios-poc/src/launchIOS.ts @@ -80,21 +80,14 @@ const launchTest = async ({ - launchApp ` ); - try { - execSync(`maestro test ${lauchAppFile} --no-ansi`, { - stdio: "inherit", - }); - } catch (e) { - console.log("Error while launching app: ", e); - execSync(`maestro test ${lauchAppFile} --no-ansi`, { - stdio: "inherit", - }); - } + execSync(`maestro test ${lauchAppFile} --no-ansi --skipDriverSetup`, { + stdio: "inherit", + }); const recordingPromise = startRecord(simulatorId, traceFile); execSync(`sleep 2`, { stdio: "inherit", }); - execSync(`${testCommand} --no-ansi`, { + execSync(`${testCommand} --no-ansi --skipDriverSetup`, { stdio: "inherit", }); const stopAppFile = writeTmpFile( @@ -104,7 +97,7 @@ const launchTest = async ({ - stopApp ` ); - execSync(`maestro test ${stopAppFile} --no-ansi`, { + execSync(`maestro test ${stopAppFile} --no-ansi --skipDriverSetup`, { stdio: "inherit", }); try {