Skip to content

Commit

Permalink
TASK: Add exit 1 handling in case of failed test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Sep 26, 2024
1 parent 490d7dd commit ae48b7f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Tests/IntegrationTests/e2e.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -ex

# Global variables
BROWSER=""
USE_SAUCELABS=false
Expand Down Expand Up @@ -118,11 +120,11 @@ function run_tests() {
cd Packages/Application/Neos.Neos.Ui

if [[ $BROWSER ]]; then
yarn run testcafe "$BROWSER" "../../../${fixture}*.e2e.js" --selector-timeout=10000 --assertion-timeout=30000
yarn run testcafe "$BROWSER" "../../../${fixture}*.e2e.js" --selector-timeout=10000 --assertion-timeout=30000 || hasFailure=1
fi

if [[ $USE_SAUCELABS ]]; then
saucectl run --config .sauce/config${dimension}.yml
saucectl run --config .sauce/config${dimension}.yml || hasFailure=1
fi

# cd back to the root directory and clean up
Expand All @@ -132,6 +134,10 @@ function run_tests() {

rm -rf DistributionPackages
mv DummyDistributionPackages DistributionPackages

if [[ $hasFailure -eq 1 ]] ; then
exit 1
fi
}

parse_arguments "$@"
Expand Down

0 comments on commit ae48b7f

Please sign in to comment.