diff --git a/cucumber.sh b/cucumber.sh index 3807756..d318e4f 100644 --- a/cucumber.sh +++ b/cucumber.sh @@ -10,5 +10,19 @@ if [ "$SPEC" == "" ]; then else ./node_modules/.bin/wdio test/wdio.conf.js --spec "$SPEC" fi + +#Check and save the status of tests run +if [ $? -eq 0 ] +then + echo "Cucumber run success" + STATUS=0 +else + echo "Cucumber run had errors" + STATUS=1 +fi + #Kill server after run kill -9 ${server} + +#Exit with proper status +exit $STATUS diff --git a/test/features/window.tab.manipulation.feature b/test/features/window.tab.manipulation.feature index feff72d..d7be324 100644 --- a/test/features/window.tab.manipulation.feature +++ b/test/features/window.tab.manipulation.feature @@ -18,5 +18,5 @@ Feature: Window/tab Given I open "http://localhost:9000" When I open new window When I close current tab - Then txtHeader from main page should be present + Then txtHeader1 from main page should be present