cypress_run () {
local specs="$1"
local timeout="$2"
- local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs}"
+ local override_config="ignoreTestFiles=*.po.ts,retries=0,testFiles=${specs},chromeWebSecurity=false"
if [[ -n "$timeout" ]]; then
override_config="${override_config},defaultCommandTimeout=${timeout}"
fi
cd ${CEPH_DEV_FOLDER}/src/pybind/mgr/dashboard/frontend
-cypress_run "orchestrator/workflow/*-spec.ts"
+# check if the prometheus daemon is running
+# before starting the e2e tests
+
+PROMETHEUS_RUNNING_COUNT=$(kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq -r '.[] | .status.running')
+while [[ $PROMETHEUS_RUNNING_COUNT -lt 1 ]]; do
+ PROMETHEUS_RUNNING_COUNT=$(kcli ssh -u root ceph-node-00 'cephadm shell "ceph orch ls --service_name=prometheus --format=json"' | jq -r '.[] | .status.running')
+done
+
+cypress_run ["orchestrator/workflow/*.feature, orchestrator/workflow/*-spec.ts"]
+cypress_run "orchestrator/grafana/*.feature"