@dev-blinq/cucumber_client 1.0.1193-dev → 1.0.1195-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.
- package/bin/client/code_gen/code_inversion.js +3 -3
- package/bin/client/recorderv3/bvt_recorder.js +1 -4
- package/bin/client/recorderv3/cli.js +1 -0
- package/bin/client/recorderv3/implemented_steps.js +1 -1
- package/bin/client/recorderv3/step_utils.js +8 -6
- package/bin/client/recording.js +1 -0
- package/package.json +1 -1
|
@@ -521,9 +521,9 @@ const invertCodeToCommand = (codeString, elements = {}, stepParams, stepsDefinit
|
|
|
521
521
|
if (propName === "web" || propName === "stable") {
|
|
522
522
|
const step = invertStableCommand(call, elements, stepParams);
|
|
523
523
|
if (step) steps.push(step);
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
524
|
+
} else if (propName === "api") {
|
|
525
|
+
const step = invertApiCommand(stepsDefinitions, codePage, stepName);
|
|
526
|
+
if (step) steps.push(step);
|
|
527
527
|
} else {
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
@@ -214,7 +214,6 @@ export class BVTRecorder {
|
|
|
214
214
|
this.world = { attach: () => {} };
|
|
215
215
|
this.shouldTakeScreenshot = true;
|
|
216
216
|
this.watcher = null;
|
|
217
|
-
this.sendEvent("BVTRecorder.getTestData", {});
|
|
218
217
|
}
|
|
219
218
|
events = {
|
|
220
219
|
onFrameNavigate: "BVTRecorder.onFrameNavigate",
|
|
@@ -619,9 +618,7 @@ export class BVTRecorder {
|
|
|
619
618
|
}
|
|
620
619
|
async closeBrowser() {
|
|
621
620
|
delete process.env.TEMP_RUN;
|
|
622
|
-
await this.watcher.close().then(() => {
|
|
623
|
-
this.logger.info(`Closed current testData file`);
|
|
624
|
-
});
|
|
621
|
+
await this.watcher.close().then(() => {});
|
|
625
622
|
this.watcher = null;
|
|
626
623
|
await closeContext();
|
|
627
624
|
this.pageSet.clear();
|
|
@@ -34,6 +34,7 @@ let recorder = null;
|
|
|
34
34
|
const init = async ({ envName, projectDir, roomId }) => {
|
|
35
35
|
console.log("connecting to " + WS_URL);
|
|
36
36
|
const socket = io(WS_URL);
|
|
37
|
+
// Disconnect from the server when the process exits
|
|
37
38
|
socket.on("connect", () => {
|
|
38
39
|
// console.log('connected to server')
|
|
39
40
|
});
|
|
@@ -232,7 +232,7 @@ export const getImplementedSteps = async (projectDir) => {
|
|
|
232
232
|
delete scenario.scenarioText;
|
|
233
233
|
delete scenario.featureText;
|
|
234
234
|
delete scenario.scenarioDocument;
|
|
235
|
-
|
|
235
|
+
delete scenario.examples;
|
|
236
236
|
delete scenario.steps;
|
|
237
237
|
for (const tag of scenario.tags) {
|
|
238
238
|
delete tag.location;
|
|
@@ -132,11 +132,13 @@ export async function saveRecording({ step, cucumberStep, codePage, projectDir,
|
|
|
132
132
|
step.keyword,
|
|
133
133
|
stepsDefinitions
|
|
134
134
|
);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
if (!step.isImplemented) {
|
|
136
|
+
stepsDefinitions.addStep({
|
|
137
|
+
name: step.text,
|
|
138
|
+
file: result.codePage.sourceFileName,
|
|
139
|
+
source: "recorder",
|
|
140
|
+
});
|
|
141
|
+
}
|
|
140
142
|
cucumberStep.methodName = result.methodName;
|
|
141
143
|
return result.codePage;
|
|
142
144
|
} else {
|
|
@@ -227,7 +229,7 @@ export const getCommandsForImplementedStep = (stepName, stepsDefinitions, stepPa
|
|
|
227
229
|
|
|
228
230
|
isUtilStep = codePage.sourceFileName.endsWith("utils.mjs");
|
|
229
231
|
for (const { code } of codeCommands) {
|
|
230
|
-
const command = invertCodeToCommand(code, elements, stepParams)[0];
|
|
232
|
+
const command = invertCodeToCommand(code, elements, stepParams, stepsDefinitions, codePage, stepName)[0];
|
|
231
233
|
if (command === undefined || command.type === null) continue;
|
|
232
234
|
if (command.element) {
|
|
233
235
|
const key = command.element.key;
|
package/bin/client/recording.js
CHANGED