@argos-ci/browser
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -177,7 +177,12 @@ (function () { | ||
*/ function waitForNoBusy(document) { | ||
const checkIsVisible = (element)=>Boolean(element.offsetWidth || element.offsetHeight || element.getClientRects().length); | ||
const checkIsVisible = (element)=>{ | ||
// Basic check for HTMLElement | ||
if (element instanceof HTMLElement && (element.offsetHeight !== 0 || element.offsetWidth !== 0)) { | ||
return true; | ||
} | ||
// Check for HTMLElement & SVGElement | ||
return element.getClientRects().length > 0; | ||
}; | ||
const elements = Array.from(document.querySelectorAll('[aria-busy="true"]')); | ||
return elements.every((element)=>{ | ||
return !(element instanceof HTMLElement) || !checkIsVisible(element); | ||
}); | ||
return elements.every((element)=>!checkIsVisible(element)); | ||
} | ||
@@ -184,0 +189,0 @@ /** |
{ | ||
"name": "@argos-ci/browser", | ||
"description": "Browser utilities to stabilize visual testing.", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"author": "Smooth Code", | ||
@@ -53,3 +53,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "ba44d1ef3390ed31192b42acf958bc4eb6138e54" | ||
"gitHead": "672a6e0fce11cd9e0acd8b77dad137d85d224ef9" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15291
419