@mablhq/mabl-cli 1.29.19 → 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/api/featureSet.js +4 -0
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowser.js +20 -3
- package/browserLauncher/playwrightBrowserLauncher/playwrightBrowserLauncher.js +1 -5
- package/commands/tests/testsUtil.js +3 -0
- package/execution/index.js +1 -1
- package/mablscript/steps/VisitUrlStep.js +9 -18
- package/package.json +3 -3
- package/popupDismissal/index.js +13 -3
- package/resources/pdf-viewer/EmbeddedPdfHandler.js +1 -0
- package/resources/pdf-viewer/index.js +1 -1
- package/resources/pdf-viewer/libEmbeddedPdfHandler.js +4 -4
- package/resources/pdf-viewer/libmablPdfViewer.js +9416 -7480
- package/resources/pdf-viewer/pdf.worker.5953c23fa7251d236190.js +2 -0
- package/resources/pdf-viewer/pdf.worker.5f2736435a8b46d97859.js +81 -0
- package/resources/popupDismissal.js +1 -1
- package/util/actionabilityUtil.js +3 -1
- package/resources/pdf-viewer/pdf.worker.js +0 -81
|
@@ -1 +1 @@
|
|
|
1
|
-
window.popupDismissal=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e),n.d(e,"elementsByHigherZIndex",(function(){return i})),n.d(e,"
|
|
1
|
+
window.popupDismissal=function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e),n.d(e,"elementsByHigherZIndex",(function(){return i})),n.d(e,"fireDoubleClickEvent",(function(){return d})),n.d(e,"fireClickEvent",(function(){return f})),n.d(e,"elementsAtCoordinate",(function(){return m})),n.d(e,"getAllElementsAbove",(function(){return p})),n.d(e,"detectAndDismissPopupCandidates",(function(){return b})),n.d(e,"elementsInFrontCount",(function(){return y}));const r=["close","dismiss","exit","not at this time","no thanks","no, thanks","i, agree","i agree"],o=[{attributeName:"className",matchFunction:s},{attributeName:"name",matchFunction:s},{attributeName:"id",matchFunction:s},{attributeName:"href",matchFunction:s},{attributeName:"innerText",matchFunction:function(t,e){const n=new RegExp(`\\b${e}\\b`);return!!t.toLowerCase().match(n)}}];function i(t){return Array.from(document.querySelectorAll("body *")).reduce((e,n)=>{const r=parseFloat(window.getComputedStyle(n).zIndex);return!Number.isNaN(r)&&r>=t&&(e.has(r)?e.get(r).push(n):e.set(r,[n])),e},new Map)}function u(t){const e=t=>void 0===t||"html"===t.tagName.toLowerCase();let n=t;for(;!e(n);){const t=window.getComputedStyle(n).zIndex;if(t&&"auto"!==t)return parseInt(t,10);n=(null==n?void 0:n.parentElement)?n.parentElement:void 0}return 0}function c(t){let e=[t];return Array.from(t.children).forEach(t=>{e=e.concat(c(t))}),e}function s(t,e){return t.toLowerCase().includes(e)}function a(t){const e=[];return t.forEach(t=>{const n=[],i=[];t.elements.forEach(t=>{var e;(null==t?void 0:t.offsetParent)&&(["BUTTON","A","DIV"].includes(null===(e=t.tagName)||void 0===e?void 0:e.toUpperCase())&&function(t){let e=0;return o.forEach(n=>{r.forEach(r=>{t.getAttribute(n.attributeName)&&n.matchFunction(t.getAttribute(n.attributeName),r)&&(e+=1)})}),e}(t)&&!i.includes(t)?i.push(t):function(t){if(t.getBoundingClientRect){const e=t.getBoundingClientRect(),n=e.width/window.innerWidth,r=e.height/window.innerHeight;return n>.95&&r>.95}return!1}(t)&&n.push(t))}),e.push({zIndex:t.zIndex,actionableElements:i,domCovering:n,dismissedStatus:!1,elementsInFront:0})}),e}function l(t,e,n=!1){const r=t.getBoundingClientRect(),o=r.height/2,i=n?1:r.width/2,u=new MouseEvent(e,{bubbles:!0,cancelable:!0,view:window,detail:0,screenX:r.left+i,screenY:r.top+o,clientX:t.clientLeft+i,clientY:t.clientTop+o,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0});t.dispatchEvent(u)}function d(t){f(t,!1),f(t,!1),l(t,"dblclick")}function f(t,e=!1){l(t,"click",e)}function m(t,e,n){const r=void 0!==e?e:g(t).x,o=void 0!==n?n:g(t).y,i=document.elementsFromPoint(r,o),u=i.findIndex(e=>e===t);return u?i.slice(0,u):[]}function h(t){return new Promise(e=>setTimeout(e,t))}function g(t){const e=t.getBoundingClientRect();return{x:Math.floor(e.x),y:Math.floor(e.y),top:Math.floor(e.top),bottom:Math.ceil(e.bottom),left:Math.floor(e.left),right:Math.ceil(e.right),height:Math.floor(e.bottom)-Math.ceil(e.top),width:Math.floor(e.right)-Math.ceil(e.left)}}function p(t,e){if(0===e.length)return[];const n=u(t),r=Math.min(...null==e?void 0:e.map(t=>u(t)));if(r<=n)return[];const o=i(r),s=Array.from(o).map(([t,e])=>({zIndex:t,elements:e.flatMap(c).reverse()}));return s.sort((t,e)=>e.zIndex-t.zIndex),s}async function b(t){const e=g(t);try{let n=m(t,e.x,e.y);const r=n.length;if(0===r)return{elementsInFront:0,dismissedStatus:!1};const o=async function(n,o){for(const i of n)if(f(i,o),await h(750),m(t,e.x,e.y).length<r)return!0;return!1};let i=p(t,n);const u=a(i);for(const t of u){let e=await o(t.domCovering,!0);if(e||(e=await o(t.actionableElements,!1)),e)return{dismissedStatus:!0,elementsInFront:0}}n=m(t,e.x,e.y),i=p(t,n);const c=a(i),s=c.length?c[0]:{zIndex:0,elementsInFront:0,dismissedStatus:!1,domCovering:[],actionableElements:[]};return s.elementsInFront=n.length,s.dismissedStatus=!1,{dismissedStatus:s.dismissedStatus,elementsInFront:s.elementsInFront}}catch(t){return{elementsInFront:0,dismissedStatus:!1,error:t.toString()}}}function y(t){return m(t).length}}]);
|
|
@@ -43,7 +43,7 @@ async function checkPopupDismissalOnAction(elementHandle, action, executionConte
|
|
|
43
43
|
if (error.message.includes(POPUP_ERROR_MESSAGE_HINT)) {
|
|
44
44
|
const hasPopup = await isElementWithPopup(elementHandle);
|
|
45
45
|
if (hasPopup) {
|
|
46
|
-
return;
|
|
46
|
+
return true;
|
|
47
47
|
}
|
|
48
48
|
const dismissalResult = await attemptPopupDismissal(elementHandle, executionContext);
|
|
49
49
|
if (recheckOnFail) {
|
|
@@ -55,8 +55,10 @@ async function checkPopupDismissalOnAction(elementHandle, action, executionConte
|
|
|
55
55
|
});
|
|
56
56
|
(0, logUtils_1.logInternal)(`Found element might not be actionable. ${error.toString()}`);
|
|
57
57
|
}
|
|
58
|
+
return dismissalResult;
|
|
58
59
|
}
|
|
59
60
|
}
|
|
61
|
+
return true;
|
|
60
62
|
}
|
|
61
63
|
exports.checkPopupDismissalOnAction = checkPopupDismissalOnAction;
|
|
62
64
|
async function checkActionabilityAt(elementHandle, executionContext, recheckOnFail = true) {
|