Skip to content

Commit

Permalink
chore: retry launchApp
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeEgret committed Aug 3, 2023
1 parent cffe82b commit 2e9102c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ios_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo $UDID
xcrun simctl install $UDID ./.github/workflows/fakeStore.app

# Launch the app
xcrun simctl launch $UDID $APPID
# xcrun simctl launch $UDID $APPID

mkdir -p report
npx flashlight-ios-poc ios-test --appId $APPID --simulatorId $UDID --testCommand 'maestro test ./packages/ios-poc/test.yaml' --resultsFilePath './report/result.json'
13 changes: 10 additions & 3 deletions packages/ios-poc/src/launchIOS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,16 @@ const launchTest = async ({
- launchApp
`
);
execSync(`maestro test ${lauchAppFile} --no-ansi`, {
stdio: "inherit",
});
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",
});
}
const recordingPromise = startRecord(simulatorId, traceFile);
execSync(`sleep 2`, {
stdio: "inherit",
Expand Down

0 comments on commit 2e9102c

Please sign in to comment.