@dev-blinq/cucumber_client 1.0.1199-dev → 1.0.1201-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.
|
@@ -947,7 +947,7 @@ class BVTRecorder {
|
|
|
947
947
|
value: el.value,
|
|
948
948
|
tagName: el.tagName,
|
|
949
949
|
text: el.textContent,
|
|
950
|
-
type: el.getAttribute("type"),
|
|
950
|
+
type: el.type, // el.getAttribute("type"),
|
|
951
951
|
disabled: el.disabled,
|
|
952
952
|
readOnly: el.readOnly,
|
|
953
953
|
required: el.required,
|
|
@@ -5,7 +5,7 @@ import { parseStepTextParameters, toCucumberExpression, unEscapeNonPrintables }
|
|
|
5
5
|
import { AstBuilder, GherkinClassicTokenMatcher, Parser, compile } from "@cucumber/gherkin";
|
|
6
6
|
import { IdGenerator } from "@cucumber/messages";
|
|
7
7
|
import { testStringForRegex } from "../recorderv3/update_feature.js";
|
|
8
|
-
|
|
8
|
+
import path from 'path';
|
|
9
9
|
class DataTable {
|
|
10
10
|
constructor(dataTableDocument) {
|
|
11
11
|
if (!dataTableDocument) {
|
|
@@ -311,6 +311,12 @@ class Feature {
|
|
|
311
311
|
stepInfo.template = step.getTemplate();
|
|
312
312
|
scenarioInfo.steps.push(stepInfo);
|
|
313
313
|
const stepDef = stepsDefinitions.findMatchingStep(stepInfo.template);
|
|
314
|
+
stepInfo.implemented = stepDef ? true : false;
|
|
315
|
+
if (stepDef) {
|
|
316
|
+
stepInfo.mjsFile = stepDef.file;
|
|
317
|
+
stepInfo.functionName = stepDef.functionName;
|
|
318
|
+
stepInfo.implemented_at = stepDef.implemented_at;
|
|
319
|
+
}
|
|
314
320
|
if (!stepDef && parseFailedFiles) {
|
|
315
321
|
//Check if the stepName exists in one of the failedToParseFiles
|
|
316
322
|
try {
|
|
@@ -322,7 +328,7 @@ class Feature {
|
|
|
322
328
|
const fileContent = fs.readFileSync(failedFile, "utf8");
|
|
323
329
|
if (fileContent.includes(stepName)) {
|
|
324
330
|
stepInfo.implemented = true;
|
|
325
|
-
stepInfo.mjsFile = failedFile;
|
|
331
|
+
stepInfo.mjsFile = failedFile.slice(path.normalize(failedFile).indexOf("features/step_definitions"));
|
|
326
332
|
stepInfo.functionName = stepName;
|
|
327
333
|
stepInfo.error = errorsInParsing[k].error;
|
|
328
334
|
break;
|
|
@@ -333,12 +339,6 @@ class Feature {
|
|
|
333
339
|
console.error(`Error while checking step ${stepInfo.template} in failed files:`, e);
|
|
334
340
|
}
|
|
335
341
|
}
|
|
336
|
-
stepInfo.implemented = stepDef ? true : false;
|
|
337
|
-
if (stepDef) {
|
|
338
|
-
stepInfo.mjsFile = stepDef.file;
|
|
339
|
-
stepInfo.functionName = stepDef.functionName;
|
|
340
|
-
stepInfo.implemented_at = stepDef.implemented_at;
|
|
341
|
-
}
|
|
342
342
|
}
|
|
343
343
|
document.scenarios.push(scenarioInfo);
|
|
344
344
|
}
|