-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: setup maestro test action * chore: test * chore: test 2 * chore: add example test * chore: test 3 * chore: test 4 * fix: app id * chore: save apk build artifact * chore: update path * chore: update path * chore: install apk on emulator * chore: remove incorrect value * chore: update path * chore: enable maestro tests * chore: add second test * chore: check if app is installed * chore: run maestro * chore: run single test * chore: customise emulator options * chore: update config * chore: update config * chore: update config * chore: use virtual display * chore: don't install emulator * chore: disable virtual screen * chore: change options * add maestro script * add yarn bootstrap no pods * bump node version * migrate example test * add ios test * fix ios bundle name * merge two pipelines * change executor * fix ios * remove unused file --------- Co-authored-by: Piotr Trocki <[email protected]>
- Loading branch information
Showing
10 changed files
with
136 additions
and
129 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
20 changes: 20 additions & 0 deletions
20
maestro-tests/basic_example/tc14_pager_basic_example.yaml.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
appId: ${APP_ID} | ||
--- | ||
- launchApp | ||
- assertVisible: 'PagerView Example' | ||
- tapOn: 'Basic Example' | ||
- assertVisible: 'Basic Example' | ||
- tapOn: 'Last' | ||
- assertVisible: 'page number 9' | ||
- assertVisible: 'Page 10 / 10 ' | ||
- assertVisible: 'Prev' | ||
- tapOn: 'Prev' | ||
- repeat: | ||
times: 8 | ||
commands: | ||
- tapOn: 'Prev' | ||
- assertVisible: 'page number 0' | ||
- assertVisible: 'Page 1 / 10 ' | ||
- tapOn: 'Prev' | ||
- assertVisible: 'page number 0' | ||
- assertVisible: 'Page 1 / 10 ' |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
appId: ${APP_ID} | ||
--- | ||
- launchApp |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
trap 'exit' INT | ||
|
||
PLATFORM=${1:-} | ||
|
||
# Validate passed platform | ||
case $PLATFORM in | ||
ios | android ) | ||
;; | ||
|
||
*) | ||
echo "Error! You must pass either 'android' or 'ios'" | ||
echo "" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [ "$PLATFORM" == "ios" ]; then | ||
APPID="com.pagerviewexample" | ||
allTestFiles=$(ls maestro-tests/*.yaml maestro-tests/basic_example/*.yaml) | ||
else | ||
APPID="com.pagerviewexample" | ||
allTestFiles=$(ls maestro-tests/*.yaml maestro-tests/basic_example/*.yaml) | ||
fi | ||
|
||
failedTests=() | ||
for file in $allTestFiles | ||
do | ||
if ! maestro test "$file" -e APP_ID="$APPID"; | ||
then | ||
echo "Test ${file} failed. Retrying in 30 seconds..." | ||
sleep 30 | ||
if ! maestro test "$file" -e APP_ID="$APPID"; | ||
then | ||
echo "Test ${file} failed again. Retrying for the last time in 120 seconds..." | ||
sleep 120 | ||
if ! maestro test "$file" -e APP_ID="$APPID"; | ||
then | ||
failedTests+=("$file") | ||
fi | ||
fi | ||
fi | ||
done | ||
|
||
if [ ${#failedTests[@]} -eq 0 ]; then | ||
exit 0 | ||
else | ||
echo "These tests failed:" | ||
printf '%s\n' "${failedTests[@]}" | ||
exit 1 | ||
fi |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ | |
"skipLibCheck": true, | ||
"strict": true, | ||
"target": "esnext" | ||
} | ||
}, | ||
"exclude": ["fabricexample"] | ||
} |