Files
grafana/e2e/run-suite
T
Dimitris Sotirakis 918cb580e8 E2E: Rename end-to-end-tests-server to grafana-server (#44249) (#44282)
* Rename to grafana-server / move scripts into new directory

* Change grafana-server step command

* Change scripts paths

* Use test grabpl version

* Update run-suite script

* Further name updates

* Update grabpl version

* Update contribute/style-guides/e2e-core.md

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
(cherry picked from commit 22eb2df602)
2022-01-21 11:09:31 +02:00

43 lines
994 B
Bash
Executable File

#!/bin/bash
set -xeo pipefail
. scripts/grafana-server/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