@dev-blinq/cucumber_client 1.0.1292-dev → 1.0.1294-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.
|
@@ -240,13 +240,17 @@ this.imports[2].node.source.value
|
|
|
240
240
|
}
|
|
241
241
|
return templates;
|
|
242
242
|
}
|
|
243
|
-
getExpectedTimeout(expectedNumofCmds) {
|
|
243
|
+
getExpectedTimeout(expectedNumofCmds, finalTimeout) {
|
|
244
|
+
const timeoutNum = parseFloat(finalTimeout);
|
|
245
|
+
if (finalTimeout && !isNaN(timeoutNum)) {
|
|
246
|
+
return -1;
|
|
247
|
+
}
|
|
244
248
|
return expectedNumofCmds * 60 * 1000;
|
|
245
249
|
}
|
|
246
|
-
addCucumberStep(type, cucumberLine, method, expectedNumofCmds) {
|
|
250
|
+
addCucumberStep(type, cucumberLine, method, expectedNumofCmds, finalTimeout) {
|
|
247
251
|
const result = {};
|
|
248
252
|
let code = "\n";
|
|
249
|
-
code += `${type}(${JSON.stringify(cucumberLine)}, ${expectedNumofCmds ? `{ timeout: ${this.getExpectedTimeout(expectedNumofCmds)}}, ` : ""}${method});\n`;
|
|
253
|
+
code += `${type}(${JSON.stringify(cucumberLine)}, ${expectedNumofCmds ? `{ timeout: ${this.getExpectedTimeout(expectedNumofCmds, finalTimeout)}}, ` : ""}${method});\n`;
|
|
250
254
|
let existCodePart = null;
|
|
251
255
|
for (let i = 0; i < this.cucumberCalls.length; i++) {
|
|
252
256
|
if (
|
|
@@ -166,7 +166,13 @@ export async function saveRecording({ step, cucumberStep, codePage, projectDir,
|
|
|
166
166
|
path
|
|
167
167
|
);
|
|
168
168
|
const keyword = (cucumberStep.keywordAlias ?? cucumberStep.keyword).trim();
|
|
169
|
-
const stepResult = codePage.addCucumberStep(
|
|
169
|
+
const stepResult = codePage.addCucumberStep(
|
|
170
|
+
keyword,
|
|
171
|
+
cucumberStep.getTemplate(),
|
|
172
|
+
methodName,
|
|
173
|
+
steps.length,
|
|
174
|
+
step.finalTimeout
|
|
175
|
+
);
|
|
170
176
|
|
|
171
177
|
if (!step.isImplemented) {
|
|
172
178
|
stepsDefinitions.addStep({
|
|
@@ -328,7 +334,6 @@ export async function updateStepDefinitions({ scenario, featureName, projectDir
|
|
|
328
334
|
const stepDefsFilePath = locateDefinitionPath(featureFolder, pageName);
|
|
329
335
|
// path.join(stepDefinitionFolderPath, pageName + "_page.mjs");
|
|
330
336
|
let codePage = getCodePage(stepDefsFilePath);
|
|
331
|
-
|
|
332
337
|
codePage = await saveRecording({ step, cucumberStep, codePage, projectDir, stepsDefinitions });
|
|
333
338
|
if (!codePage) {
|
|
334
339
|
continue;
|
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.1294-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.176-dev",
|
|
34
34
|
"@faker-js/faker": "^8.1.0",
|
|
35
|
-
"automation_model": "1.0.
|
|
35
|
+
"automation_model": "1.0.765-dev",
|
|
36
36
|
"axios": "^1.7.4",
|
|
37
37
|
"chokidar": "^3.6.0",
|
|
38
38
|
"create-require": "^1.1.1",
|