mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Update Dusk script
This commit is contained in:
parent
787ffb7057
commit
9ce09a8b05
28
dusk.sh
28
dusk.sh
@ -1,10 +1,27 @@
|
||||
#!/bin/bash
|
||||
n=1
|
||||
TYPE=${!n}
|
||||
|
||||
if [ -z "$TYPE" ]; then
|
||||
TYPE="all"
|
||||
fi
|
||||
|
||||
echo "$ RUNNING: '$TYPE'"
|
||||
|
||||
echo "$ php artisan optimize"
|
||||
php artisan optimize
|
||||
|
||||
echo "=========================================="
|
||||
|
||||
GENERIC_TESTS=`find tests/Browser/ClientPortal/ -maxdepth 1 -type f -name '*.php'`
|
||||
|
||||
if [ $TYPE == 'gateways' ]; then
|
||||
GENERIC_TESTS=""
|
||||
|
||||
echo "$ Skippping generic tests."
|
||||
echo "=========================================="
|
||||
fi
|
||||
|
||||
for TEST_CLASS in $GENERIC_TESTS; do
|
||||
echo "Test class: $TEST_CLASS"
|
||||
|
||||
@ -15,13 +32,20 @@ for TEST_CLASS in $GENERIC_TESTS; do
|
||||
php artisan ninja:create-single-account &> /dev/null
|
||||
|
||||
echo "$ php artisan dusk $TEST_CLASS"
|
||||
php artisan dusk --stop-on-error --stop-on-failure $TEST_CLASS || exit 1
|
||||
php artisan dusk ${@:2} --stop-on-error --stop-on-failure $TEST_CLASS || exit 1
|
||||
|
||||
echo "=========================================="
|
||||
done || exit 1
|
||||
|
||||
GATEWAY_TESTS=`find tests/Browser/ClientPortal/Gateways/ -type f -name '*.php'`
|
||||
|
||||
if [ $TYPE == 'generic' ]; then
|
||||
GATEWAY_TESTS=""
|
||||
|
||||
echo "$ Skippping gateway tests."
|
||||
echo "=========================================="
|
||||
fi
|
||||
|
||||
for TEST_CLASS in $GATEWAY_TESTS; do
|
||||
echo "Test class: $TEST_CLASS"
|
||||
|
||||
@ -32,7 +56,7 @@ for TEST_CLASS in $GATEWAY_TESTS; do
|
||||
php artisan ninja:create-single-account &> /dev/null
|
||||
|
||||
echo "$ php artisan dusk $TEST_CLASS"
|
||||
php artisan dusk --stop-on-error --stop-on-failure $TEST_CLASS || exit 1
|
||||
php artisan dusk ${@:2} --stop-on-error --stop-on-failure $TEST_CLASS || exit 1
|
||||
|
||||
echo "=========================================="
|
||||
done || exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user