@dev-blinq/cucumber_client 1.0.1423-stage → 1.0.1424-stage

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";
@@ -664,6 +664,7 @@ export async function saveRecording({ step, cucumberStep, codePage, projectDir,
664
664
  generateCodeResult.codeLines,
665
665
  step.renamedText,
666
666
  step.text,
667
+ parametersMap,
667
668
  protect,
668
669
  "recorder",
669
670
  path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1423-stage",
3
+ "version": "1.0.1424-stage",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",