@dev-blinq/cucumber_client 1.0.1507-dev → 1.0.1508-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.
@@ -336,19 +336,23 @@ const parameterizeLocators = ({ cmd, locs, isValueVariable, isTargetValueVariabl
336
336
  if (isValueVariable) {
337
337
  const variable = cmd.value.slice(1, -1);
338
338
  // const val = parametersMap[variable];
339
- const replacementFromValue = cmd.text.trim().replace(/\s+/, " ") ?? ""; // val.trim();
340
- if (replacementFromValue.length > 0) {
341
- const replacementToValue = `{${variable}}`;
342
- locs = _parameterizeLocators(locs, replacementFromValue, replacementToValue);
339
+ if (typeof cmd.text === "string") {
340
+ const replacementFromValue = cmd.text.trim().replace(/\s+/, " ") ?? "" // val.trim();
341
+ if (replacementFromValue.length > 0) {
342
+ const replacementToValue = `{${variable}}`;
343
+ locs = _parameterizeLocators(locs, replacementFromValue, replacementToValue);
344
+ }
343
345
  }
344
346
  }
345
347
  if (isTargetValueVariable) {
346
348
  const variable = cmd.targetValue.slice(1, -1);
347
349
  // const val = parametersMap[variable];
348
- const replacementFromValue = cmd.targetText.trim().replace(/\s+/, " ") ?? ""; // val.trim();
349
- if (replacementFromValue.length > 0) {
350
- const replacementToValue = `{${variable}}`;
351
- locs = _parameterizeLocators(locs, replacementFromValue, replacementToValue);
350
+ if (typeof cmd.targetText === "string") {
351
+ const replacementFromValue = cmd.targetText.trim().replace(/\s+/, " ") ?? "" // val.trim();
352
+ if (replacementFromValue.length > 0) {
353
+ const replacementToValue = `{${variable}}`;
354
+ locs = _parameterizeLocators(locs, replacementFromValue, replacementToValue);
355
+ }
352
356
  }
353
357
  }
354
358
  return locs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1507-dev",
3
+ "version": "1.0.1508-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",