@dev-blinq/cucumber_client 1.0.1453-dev → 1.0.1453-stage
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/assets/bundled_scripts/recorder.js +73 -73
- package/bin/assets/scripts/recorder.js +87 -49
- package/bin/assets/scripts/snapshot_capturer.js +10 -17
- package/bin/assets/scripts/unique_locators.js +169 -47
- package/bin/assets/templates/_hooks_template.txt +6 -2
- package/bin/assets/templates/utils_template.txt +16 -16
- package/bin/client/code_cleanup/utils.js +16 -7
- package/bin/client/code_gen/code_inversion.js +115 -0
- package/bin/client/code_gen/duplication_analysis.js +2 -1
- package/bin/client/code_gen/function_signature.js +4 -0
- package/bin/client/code_gen/page_reflection.js +52 -11
- package/bin/client/code_gen/playwright_codeget.js +163 -75
- package/bin/client/cucumber/feature.js +4 -17
- package/bin/client/cucumber/steps_definitions.js +13 -0
- package/bin/client/local_agent.js +1 -0
- package/bin/client/recorderv3/bvt_init.js +305 -0
- package/bin/client/recorderv3/bvt_recorder.js +1031 -61
- package/bin/client/recorderv3/implemented_steps.js +2 -0
- package/bin/client/recorderv3/index.js +3 -286
- package/bin/client/recorderv3/services.js +818 -142
- package/bin/client/recorderv3/step_runner.js +23 -5
- package/bin/client/recorderv3/step_utils.js +569 -75
- package/bin/client/recorderv3/update_feature.js +87 -39
- package/bin/client/recorderv3/wbr_entry.js +61 -0
- package/bin/client/recording.js +1 -0
- package/bin/client/upload-service.js +2 -0
- package/bin/client/utils/app_dir.js +21 -0
- package/bin/client/utils/socket_logger.js +87 -125
- package/bin/index.js +4 -1
- package/package.json +11 -5
- package/bin/client/recorderv3/app_dir.js +0 -23
- package/bin/client/recorderv3/network.js +0 -299
- package/bin/client/recorderv3/scriptTest.js +0 -5
- package/bin/client/recorderv3/ws_server.js +0 -72
|
@@ -67,8 +67,7 @@ export class BVTStepRunner {
|
|
|
67
67
|
resolve();
|
|
68
68
|
}
|
|
69
69
|
} else {
|
|
70
|
-
|
|
71
|
-
socketLogger.error(`No paused command found for cmdId: ${cmdId}`);
|
|
70
|
+
socketLogger.error(`No paused command found for cmdId: ${cmdId}`, undefined, "BVTStepRunner.resumeExecution");
|
|
72
71
|
}
|
|
73
72
|
}
|
|
74
73
|
}
|
|
@@ -257,7 +256,7 @@ export class BVTStepRunner {
|
|
|
257
256
|
|
|
258
257
|
try {
|
|
259
258
|
this.#lastAttemptedCmdId = null;
|
|
260
|
-
let cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId);
|
|
259
|
+
let cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId ?? cmd.id);
|
|
261
260
|
bvtContext.web.pausedCmd = null;
|
|
262
261
|
|
|
263
262
|
// Clear the liveExecutionMap and set up new entries for this step
|
|
@@ -273,7 +272,21 @@ export class BVTStepRunner {
|
|
|
273
272
|
if (bvtContext.web) {
|
|
274
273
|
bvtContext.web.getCmdId = () => {
|
|
275
274
|
if (cmdIDs.length === 0) {
|
|
276
|
-
cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId);
|
|
275
|
+
cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId ?? cmd.id);
|
|
276
|
+
}
|
|
277
|
+
const cId = cmdIDs.shift();
|
|
278
|
+
this.sendExecutionStatus({
|
|
279
|
+
type: "cmdExecutionStart",
|
|
280
|
+
cmdId: cId,
|
|
281
|
+
});
|
|
282
|
+
this.#lastAttemptedCmdId = cId;
|
|
283
|
+
return cId;
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
if (bvtContext.api) {
|
|
287
|
+
bvtContext.api.getCmdId = () => {
|
|
288
|
+
if (cmdIDs.length === 0) {
|
|
289
|
+
cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId ?? cmd.id);
|
|
277
290
|
}
|
|
278
291
|
const cId = cmdIDs.shift();
|
|
279
292
|
this.sendExecutionStatus({
|
|
@@ -306,7 +319,10 @@ export class BVTStepRunner {
|
|
|
306
319
|
});
|
|
307
320
|
}
|
|
308
321
|
|
|
309
|
-
if (
|
|
322
|
+
if (
|
|
323
|
+
step.isUtilStep ||
|
|
324
|
+
((!(step.isImplemented && !step.shouldOverride) || step.shouldMakeStepTextUnique) && step.commands.length > 0)
|
|
325
|
+
) {
|
|
310
326
|
const pageName = generatePageName(step.startFrame?.url ?? "default");
|
|
311
327
|
const stepDefinitionFolderPath = path.join(tempFolderPath, "step_definitions");
|
|
312
328
|
if (!existsSync(stepDefinitionFolderPath)) {
|
|
@@ -320,6 +336,8 @@ export class BVTStepRunner {
|
|
|
320
336
|
codePage,
|
|
321
337
|
projectDir: this.projectDir,
|
|
322
338
|
stepsDefinitions,
|
|
339
|
+
parametersMap,
|
|
340
|
+
logger: socketLogger,
|
|
323
341
|
});
|
|
324
342
|
if (codePage) {
|
|
325
343
|
await codePage.save(stepDefsFilePath);
|