@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
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
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
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
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;
|