diff --git a/integtest.sh b/integtest.sh index b99d7af2f..1f5ad059f 100755 --- a/integtest.sh +++ b/integtest.sh @@ -139,11 +139,11 @@ fi if [ "$SECURITY_ENABLED" = "true" ] then - cmd="yarn cypress:run-with-security $ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\"" + cmd="yarn cypress:run --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,AGGREGATION_VIEW=true,WAIT_FOR_LOADER_BUFFER_MS=3000,$ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\"" echo "run security enabled tests: $cmd" eval $cmd else - cmd="$ENV_VAR yarn cypress:run-without-security $ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\"" + cmd="$ENV_VAR yarn cypress:run --env SECURITY_ENABLED=false,$ENV_VAR --browser \"$BROWSER_PATH\" --spec \"$TEST_FILES\"" echo "run security disabled tests: $cmd" eval $cmd fi diff --git a/package.json b/package.json index 46ea54180..c4aea112d 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,9 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "cypress:open": "cypress open", - "cypress:run-without-security": "f() { env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false\"$1\"; }; f", - "cypress:run-with-security": "f() { env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=3000\"$1\"; }; f", + "cypress:run": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless", + "cypress:run-without-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=false", + "cypress:run-with-security": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,WAIT_FOR_LOADER_BUFFER_MS=3000", "cypress:run-with-security-and-aggregation-view": "env TZ=America/Los_Angeles NO_COLOR=1 cypress run --headless --env SECURITY_ENABLED=true,openSearchUrl=https://localhost:9200,AGGREGATION_VIEW=true,WAIT_FOR_LOADER_BUFFER_MS=3000", "cypress:run-plugin-tests-without-security": "yarn cypress:run-without-security --spec 'cypress/integration/plugins/*/*.js'", "cypress:run-plugin-tests-with-security": "yarn cypress:run-with-security --spec 'cypress/integration/plugins/*/*.js'",