@mablhq/mabl-cli 1.45.8 → 1.47.20
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/api/basicApiClient.js +6 -0
- package/api/featureSet.js +0 -4
- package/api/mablApiClient.js +8 -0
- package/browserEngines/browserEngine.js +40 -0
- package/browserEngines/browserEngines.js +14 -0
- package/browserEngines/chromiumBrowserEngine.js +175 -0
- package/browserEngines/firefoxBrowserEngine.js +117 -0
- package/browserEngines/unsupportedBrowserEngine.js +26 -0
- package/browserLauncher/frameBase.js +5 -1
- package/browserLauncher/pageEvent.js +1 -0
- package/{api/entities/Plan.js → browserLauncher/playwrightBrowserLauncher/browserDelegate.js} +0 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumBrowserDelegate.js +58 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumElementHandleDelegate.js +65 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumFrameDelegate.js +12 -0
- package/browserLauncher/playwrightBrowserLauncher/chromium/chromiumPageDelegate.js +117 -0
- package/browserLauncher/playwrightBrowserLauncher/elementHandleDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxBrowserDelegate.js +54 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxElementHandleDelegate.js +61 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxFrameDelegate.js +23 -0
- package/browserLauncher/playwrightBrowserLauncher/firefox/firefoxPageDelegate.js +83 -0
- package/browserLauncher/playwrightBrowserLauncher/frameDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/pageDelegate.js +2 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +44 -35
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +30 -5
- package/browserLauncher/playwrightBrowserLauncher/playwrightDom.js +33 -64
- package/browserLauncher/playwrightBrowserLauncher/playwrightFrame.js +35 -11
- package/browserLauncher/playwrightBrowserLauncher/playwrightHttpRequest.js +9 -1
- package/browserLauncher/playwrightBrowserLauncher/playwrightPage.js +28 -50
- package/commands/constants.js +6 -1
- package/commands/tests/testsUtil.js +27 -182
- package/commands/tests/tests_cmds/import.js +2 -2
- package/commands/tests/tests_cmds/run.js +9 -9
- package/commands/workspaces/workspace_cmds/copy.js +1 -2
- package/domUtil/index.js +1 -1
- package/execution/index.js +1 -1
- package/functions/apiTest/utils.js +47 -0
- package/functions/types.js +2 -0
- package/functions/utils.js +12 -0
- package/mablApi/index.js +1 -1
- package/mablscript/importer.js +3 -0
- package/mablscript/types/VariableNamespace.js +3 -3
- package/mablscriptFind/index.js +1 -1
- package/package.json +5 -4
- package/popupDismissal/index.js +7 -20
- package/proxy/index.js +1 -1
- package/resources/mablFind.js +1 -1
- package/resources/pdf-viewer/index.js +1 -1
- package/resources/pdf-viewer/libmablPdfViewer.js +117 -113
- package/resources/pdf-viewer/pdf.worker.0ceac9378bfc3bfcb634.js +81 -0
- package/resources/pdf-viewer/pdf.worker.df20a5600902b0735d4b.js +2 -0
- package/resources/popupDismissal.js +1 -1
- package/util/actionabilityUtil.js +4 -4
- package/util/browserTestUtils.js +18 -0
- package/util/clickUtil.js +7 -2
- package/util/fileUploadUtil.js +1 -1
- package/util/jestUtil.js +21 -0
- package/mablscript/types/VariableDataType.js +0 -28
- package/resources/pdf-viewer/pdf.worker.5953c23fa7251d236190.js +0 -2
- package/resources/pdf-viewer/pdf.worker.5f2736435a8b46d97859.js +0 -81
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mablhq/mabl-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.20",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "The official mabl command line interface tool",
|
|
6
6
|
"main": "index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@mablhq/newman-reporter-mabl-console": "0.1.0",
|
|
24
|
-
"@playwright/test": "1.
|
|
24
|
+
"@playwright/test": "1.29.1",
|
|
25
25
|
"@types/fs-extra": "8.1.1",
|
|
26
26
|
"@types/serve-handler": "6.1.0",
|
|
27
27
|
"@types/tmp": "0.2.0",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"mime-types": "2.1.27",
|
|
64
64
|
"minimist": "1.2.6",
|
|
65
65
|
"mochawesome-report-generator": "6.2.0",
|
|
66
|
-
"moment": "2.29.
|
|
66
|
+
"moment": "2.29.4",
|
|
67
67
|
"newman": "5.3.2",
|
|
68
68
|
"open": "6.4.0",
|
|
69
69
|
"ora": "4.0.4",
|
|
70
|
-
"playwright-core": "1.
|
|
70
|
+
"playwright-core": "1.29.1",
|
|
71
71
|
"pluralize": "8.0.0",
|
|
72
72
|
"pngjs": "6.0.0",
|
|
73
73
|
"portfinder": "1.0.28",
|
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
"retry": "0.13.1",
|
|
78
78
|
"sanitize-html": "2.3.3",
|
|
79
79
|
"serve-handler": "6.1.3",
|
|
80
|
+
"set-cookie-parser": "2.5.1",
|
|
80
81
|
"socks-proxy-agent": "6.1.1",
|
|
81
82
|
"stoppable": "1.1.0",
|
|
82
83
|
"strip-ansi": "6.0.0",
|
package/popupDismissal/index.js
CHANGED
|
@@ -23,7 +23,7 @@ const ATTRIBUTES_TO_CHECK = [
|
|
|
23
23
|
];
|
|
24
24
|
function elementsByHigherZIndex(aboveIndex) {
|
|
25
25
|
return Array.from(document.querySelectorAll('body *')).reduce((obj, element) => {
|
|
26
|
-
const zIndex = parseFloat(
|
|
26
|
+
const zIndex = parseFloat(globalThis.getComputedStyle(element).zIndex);
|
|
27
27
|
if (!Number.isNaN(zIndex) && zIndex >= aboveIndex) {
|
|
28
28
|
if (obj.has(zIndex)) {
|
|
29
29
|
obj.get(zIndex).push(element);
|
|
@@ -40,7 +40,7 @@ function getEffectiveZIndex(element) {
|
|
|
40
40
|
const isRootElement = (element) => element === undefined || element.tagName.toLowerCase() === 'html';
|
|
41
41
|
let current = element;
|
|
42
42
|
while (!isRootElement(current)) {
|
|
43
|
-
const zIndex =
|
|
43
|
+
const zIndex = globalThis.getComputedStyle(current).zIndex;
|
|
44
44
|
if (zIndex && zIndex !== ZINDEX_AUTO) {
|
|
45
45
|
return parseInt(zIndex, 10);
|
|
46
46
|
}
|
|
@@ -78,8 +78,8 @@ function checkElementAttributes(element) {
|
|
|
78
78
|
function checkElementDomCoverage(element) {
|
|
79
79
|
if (element.getBoundingClientRect) {
|
|
80
80
|
const bBox = element.getBoundingClientRect();
|
|
81
|
-
const yCoverage = bBox.width /
|
|
82
|
-
const xCoverage = bBox.height /
|
|
81
|
+
const yCoverage = bBox.width / globalThis.innerWidth;
|
|
82
|
+
const xCoverage = bBox.height / globalThis.innerHeight;
|
|
83
83
|
return (yCoverage > MINIMUM_POPUP_DISPLAY_COVERAGE_PX &&
|
|
84
84
|
xCoverage > MINIMUM_POPUP_DISPLAY_COVERAGE_PX);
|
|
85
85
|
}
|
|
@@ -146,8 +146,8 @@ function fireClickEvent(targetElement, leftEdgeClick = false) {
|
|
|
146
146
|
}
|
|
147
147
|
exports.fireClickEvent = fireClickEvent;
|
|
148
148
|
function elementsAtCoordinate(element, pointX, pointY) {
|
|
149
|
-
const x = pointX !== undefined ? pointX :
|
|
150
|
-
const y = pointY !== undefined ? pointY :
|
|
149
|
+
const x = pointX !== undefined ? pointX : element.getBoundingClientRect().x;
|
|
150
|
+
const y = pointY !== undefined ? pointY : element.getBoundingClientRect().y;
|
|
151
151
|
const elementsAtPoint = document.elementsFromPoint(x, y);
|
|
152
152
|
const targetIndex = elementsAtPoint.findIndex((iterElement) => iterElement === element);
|
|
153
153
|
return targetIndex ? elementsAtPoint.slice(0, targetIndex) : [];
|
|
@@ -156,19 +156,6 @@ exports.elementsAtCoordinate = elementsAtCoordinate;
|
|
|
156
156
|
function sleep(time) {
|
|
157
157
|
return new Promise((resolve) => setTimeout(resolve, time));
|
|
158
158
|
}
|
|
159
|
-
function getBoundingClientRectWithXY(element) {
|
|
160
|
-
const rect = element.getBoundingClientRect();
|
|
161
|
-
return {
|
|
162
|
-
x: Math.floor(rect.x),
|
|
163
|
-
y: Math.floor(rect.y),
|
|
164
|
-
top: Math.floor(rect.top),
|
|
165
|
-
bottom: Math.ceil(rect.bottom),
|
|
166
|
-
left: Math.floor(rect.left),
|
|
167
|
-
right: Math.ceil(rect.right),
|
|
168
|
-
height: Math.floor(rect.bottom) - Math.ceil(rect.top),
|
|
169
|
-
width: Math.floor(rect.right) - Math.ceil(rect.left),
|
|
170
|
-
};
|
|
171
|
-
}
|
|
172
159
|
function getAllElementsAbove(targetElement, elements) {
|
|
173
160
|
if (elements.length === 0) {
|
|
174
161
|
return [];
|
|
@@ -190,7 +177,7 @@ function getAllElementsAbove(targetElement, elements) {
|
|
|
190
177
|
}
|
|
191
178
|
exports.getAllElementsAbove = getAllElementsAbove;
|
|
192
179
|
async function detectAndDismissPopupCandidates(element) {
|
|
193
|
-
const elementBoundingBox =
|
|
180
|
+
const elementBoundingBox = element.getBoundingClientRect();
|
|
194
181
|
try {
|
|
195
182
|
let higherElements = elementsAtCoordinate(element, elementBoundingBox.x, elementBoundingBox.y);
|
|
196
183
|
const elementsInFrontCount = higherElements.length;
|