@dev-blinq/cucumber_client 1.0.1383-dev → 1.0.1385-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.
|
@@ -443,6 +443,36 @@ const invertStableCommand = (call, elements, stepParams) => {
|
|
|
443
443
|
}
|
|
444
444
|
break;
|
|
445
445
|
}
|
|
446
|
+
case "extractProperty": {
|
|
447
|
+
step.type = Types.EXTRACT_PROPERTY;
|
|
448
|
+
step.element = extractElement(call.arguments[0]);
|
|
449
|
+
const attribute = call.arguments[1].value;
|
|
450
|
+
const variable = parseDataSource(call.arguments[2], stepParams);
|
|
451
|
+
if (variable.type === "literal") {
|
|
452
|
+
step.parameters = [attribute, variable.value];
|
|
453
|
+
} else {
|
|
454
|
+
step.dataSource = variable.dataSource;
|
|
455
|
+
step.dataKey = variable.dataKey;
|
|
456
|
+
step.parameters = [attribute, toVariableName(variable.dataKey)];
|
|
457
|
+
}
|
|
458
|
+
if (call.arguments[4].type === "ObjectExpression") {
|
|
459
|
+
const properties = call.arguments[4].properties;
|
|
460
|
+
const regexProp = properties.findIndex((prop) => prop.key.name === "regex");
|
|
461
|
+
if (regexProp !== -1) {
|
|
462
|
+
const regex = properties[regexProp].value.value;
|
|
463
|
+
step.regex = regex;
|
|
464
|
+
}
|
|
465
|
+
const trimSpacesProp = properties.findIndex((prop) => prop.key.name === "trimSpaces");
|
|
466
|
+
if (trimSpacesProp !== -1) {
|
|
467
|
+
const trimSpaces = properties[trimSpacesProp].value.value;
|
|
468
|
+
step.trimSpaces = trimSpaces;
|
|
469
|
+
}
|
|
470
|
+
} else {
|
|
471
|
+
step.regex = "";
|
|
472
|
+
step.trimSpaces = false;
|
|
473
|
+
}
|
|
474
|
+
break;
|
|
475
|
+
}
|
|
446
476
|
default:
|
|
447
477
|
return; // Skip if no matching method
|
|
448
478
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dev-blinq/cucumber_client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1385-dev",
|
|
4
4
|
"description": " ",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@cucumber/tag-expressions": "^6.1.1",
|
|
33
33
|
"@dev-blinq/cucumber-js": "1.0.181-dev",
|
|
34
34
|
"@faker-js/faker": "^8.1.0",
|
|
35
|
-
"automation_model": "1.0.
|
|
35
|
+
"automation_model": "1.0.815-dev",
|
|
36
36
|
"axios": "^1.7.4",
|
|
37
37
|
"chokidar": "^3.6.0",
|
|
38
38
|
"create-require": "^1.1.1",
|