mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
0f6ae272e9
* e2e: Fix running any suite locally * Fixed issue with testFiles filter when specifying suite name * unrelated * fixed import paths to shared * Moving dashboards to root
43 lines
977 B
Bash
Executable File
43 lines
977 B
Bash
Executable File
#!/bin/bash
|
|
set -xeo pipefail
|
|
|
|
. e2e/variables
|
|
|
|
HOST=${HOST:-$DEFAULT_HOST}
|
|
PORT=${PORT:-$DEFAULT_PORT}
|
|
|
|
echo -e "Starting Cypress scenarios"
|
|
|
|
args=("$@")
|
|
|
|
CMD="start"
|
|
PARAMS=""
|
|
SLOWMO=0
|
|
URL=${BASE_URL:-"http://$HOST:$PORT"}
|
|
integrationFolder=../../e2e
|
|
testFiles=*-suite/*spec.ts
|
|
|
|
cd packages/grafana-e2e
|
|
|
|
case "$1" in
|
|
"debug")
|
|
echo -e "Debug mode"
|
|
SLOWMO=1
|
|
PARAMS="--no-exit"
|
|
;;
|
|
"dev")
|
|
echo "Dev mode"
|
|
CMD="open"
|
|
;;
|
|
"")
|
|
;;
|
|
*)
|
|
integrationFolder=../../e2e/"${args[0]}"
|
|
testFiles="*.spec.ts"
|
|
;;
|
|
esac
|
|
|
|
yarn $CMD --env BASE_URL=$URL,SLOWMO=$SLOWMO \
|
|
--config defaultCommandTimeout=30000,testFiles=$testFiles,integrationFolder=$integrationFolder,screenshotsFolder=../../e2e/"${args[0]}"/screenshots,videosFolder=../../e2e/"${args[0]}"/videos,fileServerFolder=./cypress,viewportWidth=1920,viewportHeight=1080,trashAssetsBeforeRuns=false,videoUploadOnPasses=false \
|
|
$PARAMS
|