From 84d94b40cb8bda7bb040ae9a700777b206caae49 Mon Sep 17 00:00:00 2001
From: OZGCloud <ozgcloud@mgm-tp.com>
Date: Tue, 1 Oct 2024 12:29:53 +0200
Subject: [PATCH] OZG-6368 running from any directory

---
 alfa-client/apps/run-tests.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/alfa-client/apps/run-tests.sh b/alfa-client/apps/run-tests.sh
index 68164e39d5..eadee4428c 100755
--- a/alfa-client/apps/run-tests.sh
+++ b/alfa-client/apps/run-tests.sh
@@ -14,7 +14,8 @@ if [ -z $APP_NAME ]; then echo "App Folder not set" && exit 1; fi
 if [ -z $APP_VARIATION ]; then echo "Variation Name not set" && exit 1; fi
 if [ -z $CONFIG_FILE ]; then echo "Config File not set" && exit 1; fi
 
-BASE_PATH=${APP_NAME}
+SCRIPT_DIR="$(dirname "$0")"
+BASE_PATH=${SCRIPT_DIR}/${APP_NAME}
 SPEC_GROUP=${BASE_PATH}/src/e2e/${APP_VARIATION}
 COMMAND="npx cypress run --project ${BASE_PATH} --spec ${SPEC_GROUP} --config-file ${CONFIG_FILE}"
 REPORT_PATH=${BASE_PATH}/reports/${APP_VARIATION}
-- 
GitLab