Skip to content

Commit

Permalink
🐛 parameterized serviceName in the e2e test (#5016)
Browse files Browse the repository at this point in the history
  • Loading branch information
matusdrobuliak66 authored Nov 12, 2023
1 parent a7c62fd commit 19af489
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions tests/e2e/s4l/sim4life.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ const {
url,
user,
pass,
serviceName,
newUser,
startTimeout,
basicauthUsername,
basicauthPassword,
enableDemoMode
} = utils.parseCommandLineArguments(args)

const serviceName = "sim4life";

async function runTutorial() {
const tutorial = new tutorialBase.TutorialBase(url, serviceName, user, pass, newUser, basicauthUsername, basicauthPassword, enableDemoMode);
serviceNameValue = serviceName || 'sim4life'
const tutorial = new tutorialBase.TutorialBase(url, serviceNameValue, user, pass, newUser, basicauthUsername, basicauthPassword, enableDemoMode);
let studyId;
try {
await tutorial.start();
Expand Down
9 changes: 8 additions & 1 deletion tests/e2e/utils/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ function parseCommandLineArguments(args) {
basicauthPassword = args[basicauthPasswordIdx + 1];
}
const enableDemoMode = (args.indexOf("--demo") > -1);
const serviceNameIdx = (args.indexOf("--service_name"));
let serviceName = "";
if (serviceNameIdx > -1) {
serviceName = args[serviceNameIdx + 1];
}


let newUser = false;
if (pass === null) {
Expand All @@ -92,7 +98,8 @@ function parseCommandLineArguments(args) {
startTimeout,
basicauthUsername,
basicauthPassword,
enableDemoMode
enableDemoMode,
serviceName
}
}

Expand Down

0 comments on commit 19af489

Please sign in to comment.