File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -79,9 +79,6 @@ check_device_available() {
7979 if [ " $DEVICE " == " docker" ]; then
8080 [ -x " $( command -v docker) " ] || failed=true
8181 else
82- cd $DASH_DIR /frontend
83- npx cypress verify
84-
8582 case " $DEVICE " in
8683 chrome)
8784 [ -x " $( command -v chrome) " ] || [ -x " $( command -v google-chrome) " ] ||
@@ -124,19 +121,22 @@ DASH_DIR=`pwd`
124121cd ../../../../${BUILD_DIR}
125122FULL_PATH_BUILD_DIR=` pwd`
126123
127- [[ " $( command -v npm) " == ' ' ]] && . ${FULL_PATH_BUILD_DIR} /src/pybind/mgr/dashboard/frontend/node-env/bin/activate
128-
129- : ${CYPRESS_CACHE_FOLDER:= " ${FULL_PATH_BUILD_DIR} /src/pybind/mgr/dashboard/cypress" }
130-
131- export CYPRESS_BASE_URL CYPRESS_CACHE_FOLDER CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD NO_COLOR CYPRESS_CEPH2_URL
132-
133124check_device_available
134125
135126if [ " $CYPRESS_BASE_URL " == " " ]; then
136127 start_ceph
137128fi
138129
130+ # node-env is used for all frontend related actions like npm, npx etc.
131+ [[ " $( command -v npm) " == ' ' ]] && . ${FULL_PATH_BUILD_DIR} /src/pybind/mgr/dashboard/frontend/node-env/bin/activate
132+
133+ : ${CYPRESS_CACHE_FOLDER:= " ${FULL_PATH_BUILD_DIR} /src/pybind/mgr/dashboard/cypress" }
134+
135+ export CYPRESS_BASE_URL CYPRESS_CACHE_FOLDER CYPRESS_LOGIN_USER CYPRESS_LOGIN_PWD NO_COLOR CYPRESS_CEPH2_URL
136+
137+ # Verify Cypress installation
139138cd $DASH_DIR /frontend
139+ npx cypress verify
140140
141141# Remove existing XML results
142142rm -f cypress/reports/results-* .xml || true
You can’t perform that action at this time.
0 commit comments