mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
34 lines
1.6 KiB
Bash
Executable file
34 lines
1.6 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/../../../../bash/common.lib.sh"
|
|
|
|
prepare_for_behat_with_js() {
|
|
# Install certificates
|
|
run_command "$SYLIUS_CACHE_DIR/symfony server:ca:install"
|
|
|
|
# Run headless Chrome
|
|
run_command "google-chrome-stable --enable-automation --disable-background-networking --no-default-browser-check --no-first-run --disable-popup-blocking --disable-default-apps --disable-gpu --allow-insecure-localhost --disable-translate --disable-extensions --no-sandbox --enable-features=Metal --headless --remote-debugging-port=9222 --window-size=2880,1800 --proxy-server='direct://' --proxy-bypass-list='*' http://127.0.0.1 > /dev/null 2>&1 &"
|
|
|
|
# Run webserver
|
|
run_command "$SYLIUS_CACHE_DIR/symfony server:start --port=8080 --dir=public --daemon"
|
|
}
|
|
|
|
run_behat() {
|
|
local code=0
|
|
|
|
print_header "Testing (Behat - brand new, javascript scenarios; @javascript && ~@todo && ~@cli)" "Sylius"
|
|
run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"@javascript && ~@todo && ~@cli\"" || code=$?
|
|
if [[ ${code} = 1 ]]; then
|
|
run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"@javascript && ~@todo && ~@cli\" --rerun" ; code=$?
|
|
fi
|
|
if [[ ${code} = 1 ]]; then
|
|
run_command "vendor/bin/behat --strict --no-interaction -vvv -f progress --tags=\"@javascript && ~@todo && ~@cli\" --rerun" ; code=$?
|
|
fi
|
|
|
|
return ${code}
|
|
}
|
|
|
|
print_header "Preparing for testing (Behat - javascript scenarios; @javascript)" "Sylius"
|
|
prepare_for_behat_with_js
|
|
|
|
run_behat
|