@dev-blinq/cucumber_client 1.0.1441-dev → 1.0.1441-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/preload/css_gen.js +10 -10
- package/bin/assets/preload/toolbar.js +27 -29
- package/bin/assets/preload/unique_locators.js +1 -1
- package/bin/assets/preload/yaml.js +288 -275
- package/bin/assets/scripts/aria_snapshot.js +223 -220
- package/bin/assets/scripts/dom_attr.js +329 -329
- package/bin/assets/scripts/dom_parent.js +169 -174
- package/bin/assets/scripts/event_utils.js +94 -94
- package/bin/assets/scripts/pw.js +2050 -1949
- package/bin/assets/scripts/recorder.js +70 -45
- package/bin/assets/scripts/snapshot_capturer.js +147 -147
- package/bin/assets/scripts/unique_locators.js +170 -49
- package/bin/assets/scripts/yaml.js +796 -783
- package/bin/assets/templates/_hooks_template.txt +6 -2
- package/bin/assets/templates/utils_template.txt +16 -16
- package/bin/client/code_cleanup/find_step_definition_references.js +0 -1
- package/bin/client/code_cleanup/utils.js +16 -7
- package/bin/client/code_gen/api_codegen.js +2 -2
- package/bin/client/code_gen/code_inversion.js +119 -2
- 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/feature_data.js +2 -2
- package/bin/client/cucumber/project_to_document.js +8 -2
- package/bin/client/cucumber/steps_definitions.js +19 -3
- package/bin/client/local_agent.js +3 -2
- package/bin/client/parse_feature_file.js +23 -26
- package/bin/client/playground/projects/env.json +2 -2
- package/bin/client/recorderv3/bvt_init.js +305 -0
- package/bin/client/recorderv3/bvt_recorder.js +1024 -58
- package/bin/client/recorderv3/implemented_steps.js +2 -0
- package/bin/client/recorderv3/index.js +3 -283
- package/bin/client/recorderv3/services.js +818 -142
- package/bin/client/recorderv3/step_runner.js +20 -6
- package/bin/client/recorderv3/step_utils.js +542 -73
- 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 +4 -2
- 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,7 @@ export class BVTStepRunner {
|
|
|
306
319
|
});
|
|
307
320
|
}
|
|
308
321
|
|
|
309
|
-
if (!step.isImplemented && step.commands.length > 0) {
|
|
322
|
+
if ((!(step.isImplemented && !step.shouldOverride) || step.shouldMakeStepTextUnique) && step.commands.length > 0) {
|
|
310
323
|
const pageName = generatePageName(step.startFrame?.url ?? "default");
|
|
311
324
|
const stepDefinitionFolderPath = path.join(tempFolderPath, "step_definitions");
|
|
312
325
|
if (!existsSync(stepDefinitionFolderPath)) {
|
|
@@ -320,6 +333,8 @@ export class BVTStepRunner {
|
|
|
320
333
|
codePage,
|
|
321
334
|
projectDir: this.projectDir,
|
|
322
335
|
stepsDefinitions,
|
|
336
|
+
parametersMap,
|
|
337
|
+
logger: socketLogger,
|
|
323
338
|
});
|
|
324
339
|
if (codePage) {
|
|
325
340
|
await codePage.save(stepDefsFilePath);
|
|
@@ -380,7 +395,6 @@ export class BVTStepRunner {
|
|
|
380
395
|
this.#currentStepController = null;
|
|
381
396
|
global.__BVT_STEP_ABORT_SIGNAL = null;
|
|
382
397
|
|
|
383
|
-
|
|
384
398
|
try {
|
|
385
399
|
// Clean up temp folder
|
|
386
400
|
const __temp_features_FolderName = process.env.tempFeaturesFolderPath;
|