@midscene/web 0.2.0 → 0.2.1-beta-20240806065238.0

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/dist/es/index.js CHANGED
@@ -398,6 +398,18 @@ var PageTaskExecutor = class {
398
398
  };
399
399
  return taskActionScroll;
400
400
  }
401
+ if (plan2.type === "Sleep") {
402
+ const taskActionSleep = {
403
+ type: "Action",
404
+ subType: "Sleep",
405
+ param: plan2.param,
406
+ executor: async (taskParam) => {
407
+ assert2(taskParam.timeMs, "No time to sleep");
408
+ await sleep(taskParam.timeMs);
409
+ }
410
+ };
411
+ return taskActionSleep;
412
+ }
401
413
  if (plan2.type === "Error") {
402
414
  throw new Error(`Got a task plan with type Error: ${plan2.thought}`);
403
415
  }
@@ -677,10 +689,10 @@ var groupAndCaseForTest = (testInfo) => {
677
689
  const titlePath = [...testInfo.titlePath];
678
690
  if (titlePath.length > 1) {
679
691
  taskTitle = titlePath.pop() || "unnamed";
680
- taskFile = `${titlePath.join(" > ")}:${testInfo.line}`;
692
+ taskFile = `${titlePath.join(" > ")}`;
681
693
  } else if (titlePath.length === 1) {
682
694
  taskTitle = titlePath[0];
683
- taskFile = `${taskTitle}:${testInfo.line}`;
695
+ taskFile = `${taskTitle}`;
684
696
  } else {
685
697
  taskTitle = "unnamed";
686
698
  taskFile = "unnamed";
package/dist/lib/index.js CHANGED
@@ -425,6 +425,18 @@ var PageTaskExecutor = class {
425
425
  };
426
426
  return taskActionScroll;
427
427
  }
428
+ if (plan2.type === "Sleep") {
429
+ const taskActionSleep = {
430
+ type: "Action",
431
+ subType: "Sleep",
432
+ param: plan2.param,
433
+ executor: async (taskParam) => {
434
+ (0, import_node_assert2.default)(taskParam.timeMs, "No time to sleep");
435
+ await (0, import_utils2.sleep)(taskParam.timeMs);
436
+ }
437
+ };
438
+ return taskActionSleep;
439
+ }
428
440
  if (plan2.type === "Error") {
429
441
  throw new Error(`Got a task plan with type Error: ${plan2.thought}`);
430
442
  }
@@ -704,10 +716,10 @@ var groupAndCaseForTest = (testInfo) => {
704
716
  const titlePath = [...testInfo.titlePath];
705
717
  if (titlePath.length > 1) {
706
718
  taskTitle = titlePath.pop() || "unnamed";
707
- taskFile = `${titlePath.join(" > ")}:${testInfo.line}`;
719
+ taskFile = `${titlePath.join(" > ")}`;
708
720
  } else if (titlePath.length === 1) {
709
721
  taskTitle = titlePath[0];
710
- taskFile = `${taskTitle}:${testInfo.line}`;
722
+ taskFile = `${taskTitle}`;
711
723
  } else {
712
724
  taskTitle = "unnamed";
713
725
  taskFile = "unnamed";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/web",
3
3
  "description": "Web integration for Midscene.js",
4
- "version": "0.2.0",
4
+ "version": "0.2.1-beta-20240806065238.0",
5
5
  "jsnext:source": "./src/index.ts",
6
6
  "main": "./dist/lib/index.js",
7
7
  "module": "./dist/es/index.js",
@@ -52,8 +52,8 @@
52
52
  "openai": "4.47.1",
53
53
  "sharp": "0.33.3",
54
54
  "inquirer": "10.1.5",
55
- "@midscene/core": "0.2.0",
56
- "@midscene/visualizer-report": "0.2.0"
55
+ "@midscene/core": "0.2.1-beta-20240806065238.0",
56
+ "@midscene/visualizer-report": "0.2.1-beta-20240806065238.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@modern-js/module-tools": "^2.56.1",