@mablhq/mabl-cli 1.29.11 → 1.31.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mablhq/mabl-cli",
3
- "version": "1.29.11",
3
+ "version": "1.31.3",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "The official mabl command line interface tool",
6
6
  "main": "index.js",
@@ -25,7 +25,7 @@
25
25
  "postinstall": "node ./util/postInstallMessage.js"
26
26
  },
27
27
  "dependencies": {
28
- "@playwright/test": "1.24.1",
28
+ "@playwright/test": "1.25.1",
29
29
  "@types/fs-extra": "8.1.1",
30
30
  "@types/serve-handler": "6.1.0",
31
31
  "@types/tmp": "0.2.0",
@@ -70,7 +70,7 @@
70
70
  "newman": "5.3.2",
71
71
  "open": "6.4.0",
72
72
  "ora": "4.0.4",
73
- "playwright-core": "1.24.1",
73
+ "playwright-core": "1.25.1",
74
74
  "pluralize": "8.0.0",
75
75
  "pngjs": "6.0.0",
76
76
  "portfinder": "1.0.28",
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.elementsInFrontCount = exports.detectAndDismissPopupCandidates = exports.getAllElementsAbove = exports.elementsAtCoordinate = exports.elementsByHigherZIndex = void 0;
3
+ exports.elementsInFrontCount = exports.detectAndDismissPopupCandidates = exports.getAllElementsAbove = exports.elementsAtCoordinate = exports.fireClickEvent = exports.fireDoubleClickEvent = exports.elementsByHigherZIndex = void 0;
4
4
  const DISMISSAL_WAIT_TIME_MS = 750;
5
5
  const ZINDEX_AUTO = 'auto';
6
6
  const MINIMUM_POPUP_DISPLAY_COVERAGE_PX = 0.95;
@@ -113,11 +113,11 @@ function developCloseCandidates(candidates) {
113
113
  });
114
114
  return candidatesByZIndex;
115
115
  }
116
- function fireClickEvent(targetElement, leftEdgeClick) {
116
+ function dispatchMouseEvent(targetElement, eventType, leftEdgeClick = false) {
117
117
  const boundingBox = targetElement.getBoundingClientRect();
118
118
  const halfHeight = boundingBox.height / 2;
119
119
  const xDistance = leftEdgeClick ? 1 : boundingBox.width / 2;
120
- const mouseEvent = new MouseEvent('click', {
120
+ const mouseEvent = new MouseEvent(eventType, {
121
121
  bubbles: true,
122
122
  cancelable: true,
123
123
  view: window,
@@ -135,6 +135,16 @@ function fireClickEvent(targetElement, leftEdgeClick) {
135
135
  });
136
136
  targetElement.dispatchEvent(mouseEvent);
137
137
  }
138
+ function fireDoubleClickEvent(targetElement) {
139
+ fireClickEvent(targetElement, false);
140
+ fireClickEvent(targetElement, false);
141
+ dispatchMouseEvent(targetElement, 'dblclick');
142
+ }
143
+ exports.fireDoubleClickEvent = fireDoubleClickEvent;
144
+ function fireClickEvent(targetElement, leftEdgeClick = false) {
145
+ dispatchMouseEvent(targetElement, 'click', leftEdgeClick);
146
+ }
147
+ exports.fireClickEvent = fireClickEvent;
138
148
  function elementsAtCoordinate(element, pointX, pointY) {
139
149
  const x = pointX !== undefined ? pointX : getBoundingClientRectWithXY(element).x;
140
150
  const y = pointY !== undefined ? pointY : getBoundingClientRectWithXY(element).y;