@dev-blinq/cucumber_client 1.0.1669-dev → 1.0.1670-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -370,7 +370,7 @@ export class CodePage {
|
|
|
370
370
|
return result;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
addInfraCommandUtil(methodName, description, stepVariables, stepCodeLines, renamedText, previousText, protectStep = false, source = null, codePath = "") {
|
|
373
|
+
addInfraCommandUtil(methodName, description, stepVariables, stepCodeLines, renamedText, previousText, parametersMap, protectStep = false, source = null, codePath = "") {
|
|
374
374
|
let code = "\n";
|
|
375
375
|
code += "/**\n";
|
|
376
376
|
code += ` * ${description}\n`;
|
|
@@ -393,7 +393,11 @@ export class CodePage {
|
|
|
393
393
|
code += `// source: ${source}\n`;
|
|
394
394
|
code += `// implemented_at: ${new Date().toISOString()}\n`;
|
|
395
395
|
stepCodeLines.forEach((line) => (code += ` ${line}\n`));
|
|
396
|
-
if (renamedText) {
|
|
396
|
+
if (renamedText === "verify_page_title" || renamedText === "verify_page_url") {
|
|
397
|
+
const parameters = stepVariables.map((v) => parametersMap[v.text.replace(/[<>]/g, "")]);
|
|
398
|
+
code += `await ${renamedText}(${parameters.map((v) => (isNaN(Number(v)) ? `"${v}"` : Number(v))).join(", ")});\n`;
|
|
399
|
+
}
|
|
400
|
+
else {
|
|
397
401
|
code += `await ${renamedText}(${stepVariables.map((v) => (isNaN(Number(v.text)) ? `"${v.text}"` : Number(v.text))).join(", ")});\n`;
|
|
398
402
|
}
|
|
399
403
|
code += "}\n";
|