@dev-blinq/cucumber_client 1.0.1294-dev → 1.0.1295-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.
|
@@ -525,11 +525,7 @@ class StepsDefinitions {
|
|
|
525
525
|
};
|
|
526
526
|
|
|
527
527
|
executeStepRemote = async ({ feature_file_path, scenario, tempFolderPath, stepText }, options) => {
|
|
528
|
-
|
|
529
|
-
options = {
|
|
530
|
-
skipAfter: true,
|
|
531
|
-
};
|
|
532
|
-
}
|
|
528
|
+
const { skipAfter = true, skipBefore = true } = options || {};
|
|
533
529
|
const environment = {
|
|
534
530
|
...process.env,
|
|
535
531
|
};
|
|
@@ -555,11 +551,16 @@ class StepsDefinitions {
|
|
|
555
551
|
// console.log("step", step.pattern);
|
|
556
552
|
// });
|
|
557
553
|
|
|
558
|
-
if (
|
|
554
|
+
if (skipAfter) {
|
|
559
555
|
// ignore afterAll/after hooks
|
|
560
556
|
support.afterTestCaseHookDefinitions = [];
|
|
561
557
|
support.afterTestRunHookDefinitions = [];
|
|
562
558
|
}
|
|
559
|
+
if (skipBefore) {
|
|
560
|
+
// ignore beforeAll/before hooks
|
|
561
|
+
support.beforeTestCaseHookDefinitions = [];
|
|
562
|
+
support.beforeTestRunHookDefinitions = [];
|
|
563
|
+
}
|
|
563
564
|
|
|
564
565
|
let errorMesssage = null;
|
|
565
566
|
let info = null;
|
|
@@ -789,7 +789,7 @@ export class BVTRecorder {
|
|
|
789
789
|
}, 100);
|
|
790
790
|
this.timerId = timerId;
|
|
791
791
|
}
|
|
792
|
-
async runStep({ step, parametersMap, tags }, options) {
|
|
792
|
+
async runStep({ step, parametersMap, tags, isFirstStep }, options) {
|
|
793
793
|
const _env = {
|
|
794
794
|
TOKEN: this.TOKEN,
|
|
795
795
|
TEMP_RUN: true,
|
|
@@ -815,7 +815,7 @@ export class BVTRecorder {
|
|
|
815
815
|
tags
|
|
816
816
|
},
|
|
817
817
|
this.bvtContext,
|
|
818
|
-
options
|
|
818
|
+
options ? { ...options, skipBefore: !isFirstStep } : { skipBefore: !isFirstStep }
|
|
819
819
|
);
|
|
820
820
|
await this.revertMode();
|
|
821
821
|
return { result, info };
|
|
@@ -829,11 +829,6 @@ export class BVTRecorder {
|
|
|
829
829
|
this.bvtContext.navigate = false;
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
async runScenario({ steps, parametersMap, tags }) {
|
|
833
|
-
for (const step of steps) {
|
|
834
|
-
await this.runStep({ step, parametersMap, tags });
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
832
|
async saveScenario({ scenario, featureName, override, isSingleStep }) {
|
|
838
833
|
await updateStepDefinitions({ scenario, featureName, projectDir: this.projectDir }); // updates mjs files
|
|
839
834
|
if (!isSingleStep) await updateFeatureFile({ featureName, scenario, override, projectDir: this.projectDir }); // updates gherkin files
|
|
@@ -139,9 +139,6 @@ const init = ({ envName, projectDir, roomId, TOKEN }) => {
|
|
|
139
139
|
"recorderWindow.runStep": async (input) => {
|
|
140
140
|
return recorder.runStep(input);
|
|
141
141
|
},
|
|
142
|
-
"recorderWindow.runScenario": async (input) => {
|
|
143
|
-
return recorder.runScenario(input);
|
|
144
|
-
},
|
|
145
142
|
"recorderWindow.saveScenario": async (input) => {
|
|
146
143
|
return recorder.saveScenario(input);
|
|
147
144
|
},
|