mirror of
https://github.com/wassname/talk.git
synced 2026-07-17 11:33:39 +08:00
Run all browsers before failing
This commit is contained in:
+26
-14
@@ -1,23 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "${CIRCLE_BRANCH}" == "master" ]]; then
|
||||
|
||||
exitCode=0
|
||||
|
||||
browserstack() {
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/$1" yarn e2e-browserstack -- --env "$1"
|
||||
|
||||
# Determine exit code.
|
||||
result=$?
|
||||
if [ "$result" -gt "0" ]
|
||||
then
|
||||
exitCode=$result
|
||||
fi
|
||||
|
||||
# Sleep abit to let browserstackLocal to close properly.
|
||||
sleep 2
|
||||
}
|
||||
|
||||
# Test using browserstack.
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/chrome" yarn e2e-browserstack -- --env chrome
|
||||
sleep 2
|
||||
browserstack chrome
|
||||
browserstack firefox
|
||||
browserstack safari
|
||||
browserstack ie
|
||||
browserstack edge
|
||||
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/firefox" yarn e2e-browserstack -- --env firefox
|
||||
sleep 2
|
||||
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/safari" yarn e2e-browserstack -- --env safari
|
||||
sleep 2
|
||||
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/ie" yarn e2e-browserstack -- --env ie
|
||||
sleep 2
|
||||
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/edge" yarn e2e-browserstack -- --env edge
|
||||
exit $exitCode
|
||||
else
|
||||
# When browserstack is not available test locally using chrome headless.
|
||||
REPORTS_FOLDER="$CIRCLE_TEST_REPORTS/chrome" yarn e2e -- --env chrome-headless
|
||||
|
||||
# Will exit with status of last command.
|
||||
exit $?
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user