@dev-blinq/cucumber_client 1.0.1429-dev → 1.0.1429-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.
Files changed (43) hide show
  1. package/bin/assets/bundled_scripts/recorder.js +73 -73
  2. package/bin/assets/preload/css_gen.js +10 -10
  3. package/bin/assets/preload/toolbar.js +27 -29
  4. package/bin/assets/preload/unique_locators.js +1 -1
  5. package/bin/assets/preload/yaml.js +288 -275
  6. package/bin/assets/scripts/aria_snapshot.js +223 -220
  7. package/bin/assets/scripts/dom_attr.js +329 -329
  8. package/bin/assets/scripts/dom_parent.js +169 -174
  9. package/bin/assets/scripts/event_utils.js +94 -94
  10. package/bin/assets/scripts/pw.js +2050 -1949
  11. package/bin/assets/scripts/recorder.js +70 -45
  12. package/bin/assets/scripts/snapshot_capturer.js +147 -147
  13. package/bin/assets/scripts/unique_locators.js +170 -49
  14. package/bin/assets/scripts/yaml.js +796 -783
  15. package/bin/assets/templates/_hooks_template.txt +6 -2
  16. package/bin/assets/templates/utils_template.txt +16 -16
  17. package/bin/client/code_cleanup/find_step_definition_references.js +0 -1
  18. package/bin/client/code_gen/api_codegen.js +2 -2
  19. package/bin/client/code_gen/code_inversion.js +63 -2
  20. package/bin/client/code_gen/function_signature.js +4 -0
  21. package/bin/client/code_gen/page_reflection.js +52 -11
  22. package/bin/client/code_gen/playwright_codeget.js +28 -22
  23. package/bin/client/cucumber/feature_data.js +2 -2
  24. package/bin/client/cucumber/project_to_document.js +8 -2
  25. package/bin/client/cucumber/steps_definitions.js +19 -3
  26. package/bin/client/local_agent.js +3 -2
  27. package/bin/client/parse_feature_file.js +23 -26
  28. package/bin/client/playground/projects/env.json +2 -2
  29. package/bin/client/recorderv3/bvt_init.js +363 -0
  30. package/bin/client/recorderv3/bvt_recorder.js +1009 -47
  31. package/bin/client/recorderv3/implemented_steps.js +2 -0
  32. package/bin/client/recorderv3/index.js +3 -283
  33. package/bin/client/recorderv3/scriptTest.js +1 -1
  34. package/bin/client/recorderv3/services.js +818 -142
  35. package/bin/client/recorderv3/step_runner.js +28 -8
  36. package/bin/client/recorderv3/step_utils.js +514 -39
  37. package/bin/client/recorderv3/update_feature.js +32 -13
  38. package/bin/client/recorderv3/wbr_entry.js +61 -0
  39. package/bin/client/recording.js +1 -0
  40. package/bin/client/upload-service.js +4 -2
  41. package/bin/client/utils/socket_logger.js +1 -1
  42. package/bin/index.js +4 -1
  43. package/package.json +6 -4
@@ -216,6 +216,7 @@ export class BVTStepRunner {
216
216
  this.sendExecutionStatus({
217
217
  type: "cmdExecutionSuccess",
218
218
  cmdId: body.cmdId,
219
+ info,
219
220
  selectedStrategy: info?.selectedStrategy,
220
221
  });
221
222
  } else {
@@ -256,7 +257,7 @@ export class BVTStepRunner {
256
257
 
257
258
  try {
258
259
  this.#lastAttemptedCmdId = null;
259
- let cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId);
260
+ let cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId ?? cmd.id);
260
261
  bvtContext.web.pausedCmd = null;
261
262
 
262
263
  // Clear the liveExecutionMap and set up new entries for this step
@@ -272,7 +273,21 @@ export class BVTStepRunner {
272
273
  if (bvtContext.web) {
273
274
  bvtContext.web.getCmdId = () => {
274
275
  if (cmdIDs.length === 0) {
275
- cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId);
276
+ cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId ?? cmd.id);
277
+ }
278
+ const cId = cmdIDs.shift();
279
+ this.sendExecutionStatus({
280
+ type: "cmdExecutionStart",
281
+ cmdId: cId,
282
+ });
283
+ this.#lastAttemptedCmdId = cId;
284
+ return cId;
285
+ };
286
+ }
287
+ if (bvtContext.api) {
288
+ bvtContext.api.getCmdId = () => {
289
+ if (cmdIDs.length === 0) {
290
+ cmdIDs = (step.commands || []).map((cmd) => cmd.cmdId ?? cmd.id);
276
291
  }
277
292
  const cId = cmdIDs.shift();
278
293
  this.sendExecutionStatus({
@@ -319,6 +334,7 @@ export class BVTStepRunner {
319
334
  codePage,
320
335
  projectDir: this.projectDir,
321
336
  stepsDefinitions,
337
+ parametersMap,
322
338
  });
323
339
  if (codePage) {
324
340
  await codePage.save(stepDefsFilePath);
@@ -379,13 +395,17 @@ export class BVTStepRunner {
379
395
  this.#currentStepController = null;
380
396
  global.__BVT_STEP_ABORT_SIGNAL = null;
381
397
 
382
- // Clean up temp folder
383
- const __temp_features_FolderName = process.env.tempFeaturesFolderPath;
384
- if (__temp_features_FolderName) {
385
- const tempFolderPath = path.join(this.projectDir, __temp_features_FolderName);
386
- if (fs.existsSync(tempFolderPath)) {
387
- fs.rmSync(tempFolderPath, { recursive: true });
398
+ try {
399
+ // Clean up temp folder
400
+ const __temp_features_FolderName = process.env.tempFeaturesFolderPath;
401
+ if (__temp_features_FolderName) {
402
+ const tempFolderPath = path.join(this.projectDir, __temp_features_FolderName);
403
+ if (fs.existsSync(tempFolderPath)) {
404
+ fs.rmSync(tempFolderPath, { recursive: true });
405
+ }
388
406
  }
407
+ } catch (error) {
408
+ console.error("Error cleaning up temp folder", error);
389
409
  }
390
410
  }
391
411
  }