@wdio/image-comparison-core 1.0.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/CHANGELOG.md +82 -0
- package/LICENSE +21 -0
- package/README.md +12 -0
- package/assets/ios/ipadair4th.ipadair5th-bottom.png +0 -0
- package/assets/ios/ipadair4th.ipadair5th-top.png +0 -0
- package/assets/ios/ipadmini6th-bottom.png +0 -0
- package/assets/ios/ipadmini6th-top.png +0 -0
- package/assets/ios/ipadpro11-bottom.png +0 -0
- package/assets/ios/ipadpro11-top.png +0 -0
- package/assets/ios/ipadpro129-bottom.png +0 -0
- package/assets/ios/ipadpro129-top.png +0 -0
- package/assets/ios/iphone11promax-bottom.png +0 -0
- package/assets/ios/iphone11promax-top.png +0 -0
- package/assets/ios/iphone12.iphone12pro-top.png +0 -0
- package/assets/ios/iphone12.iphone12pro.iphone13.iphone13pro.iphone14-bottom.png +0 -0
- package/assets/ios/iphone12mini-top.png +0 -0
- package/assets/ios/iphone12mini.iphone13mini-bottom.png +0 -0
- package/assets/ios/iphone12promax-top.png +0 -0
- package/assets/ios/iphone12promax.iphone13promax.iphone14plus-bottom.png +0 -0
- package/assets/ios/iphone13.iphone13pro.iphone14-top.png +0 -0
- package/assets/ios/iphone13mini-top.png +0 -0
- package/assets/ios/iphone13promax.iphone14plus-top.png +0 -0
- package/assets/ios/iphone14pro-bottom.png +0 -0
- package/assets/ios/iphone14pro-top.png +0 -0
- package/assets/ios/iphone14promax-bottom.png +0 -0
- package/assets/ios/iphone14promax-top.png +0 -0
- package/assets/ios/iphone15-bottom.png +0 -0
- package/assets/ios/iphone15-top.png +0 -0
- package/assets/ios/iphonex.iphonexs.iphone11pro-bottom.png +0 -0
- package/assets/ios/iphonex.iphonexs.iphone11pro-top.png +0 -0
- package/assets/ios/iphonexr.iphone11-bottom.png +0 -0
- package/assets/ios/iphonexr.iphone11-top.png +0 -0
- package/assets/ios/iphonexsmax-bottom.png +0 -0
- package/assets/ios/iphonexsmax-top.png +0 -0
- package/dist/base.d.ts +18 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.interfaces.d.ts +200 -0
- package/dist/base.interfaces.d.ts.map +1 -0
- package/dist/base.interfaces.js +1 -0
- package/dist/base.js +58 -0
- package/dist/base.test.d.ts +2 -0
- package/dist/base.test.d.ts.map +1 -0
- package/dist/base.test.js +45 -0
- package/dist/clientSideScripts/checkMetaTag.d.ts +2 -0
- package/dist/clientSideScripts/checkMetaTag.d.ts.map +1 -0
- package/dist/clientSideScripts/checkMetaTag.js +9 -0
- package/dist/clientSideScripts/checkMetaTag.test.d.ts +2 -0
- package/dist/clientSideScripts/checkMetaTag.test.d.ts.map +1 -0
- package/dist/clientSideScripts/checkMetaTag.test.js +25 -0
- package/dist/clientSideScripts/customCss.interfaces.d.ts +8 -0
- package/dist/clientSideScripts/customCss.interfaces.d.ts.map +1 -0
- package/dist/clientSideScripts/customCss.interfaces.js +1 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.d.ts +8 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.d.ts.map +1 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.interfaces.d.ts +4 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.interfaces.d.ts.map +1 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.interfaces.js +1 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.js +275 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.test.d.ts +2 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.test.d.ts.map +1 -0
- package/dist/clientSideScripts/drawTabbableOnCanvas.test.js +251 -0
- package/dist/clientSideScripts/elementPosition.interfaces.d.ts +3 -0
- package/dist/clientSideScripts/elementPosition.interfaces.d.ts.map +1 -0
- package/dist/clientSideScripts/elementPosition.interfaces.js +1 -0
- package/dist/clientSideScripts/getBoundingClientRect.d.ts +6 -0
- package/dist/clientSideScripts/getBoundingClientRect.d.ts.map +1 -0
- package/dist/clientSideScripts/getBoundingClientRect.js +12 -0
- package/dist/clientSideScripts/getBoundingClientRect.test.d.ts +2 -0
- package/dist/clientSideScripts/getBoundingClientRect.test.d.ts.map +1 -0
- package/dist/clientSideScripts/getBoundingClientRect.test.js +28 -0
- package/dist/clientSideScripts/getDocumentScrollHeight.d.ts +5 -0
- package/dist/clientSideScripts/getDocumentScrollHeight.d.ts.map +1 -0
- package/dist/clientSideScripts/getDocumentScrollHeight.js +48 -0
- package/dist/clientSideScripts/getDocumentScrollHeight.test.d.ts +2 -0
- package/dist/clientSideScripts/getDocumentScrollHeight.test.d.ts.map +1 -0
- package/dist/clientSideScripts/getDocumentScrollHeight.test.js +30 -0
- package/dist/clientSideScripts/getElementPositionTopDom.d.ts +6 -0
- package/dist/clientSideScripts/getElementPositionTopDom.d.ts.map +1 -0
- package/dist/clientSideScripts/getElementPositionTopDom.js +11 -0
- package/dist/clientSideScripts/getElementPositionTopDom.test.d.ts +2 -0
- package/dist/clientSideScripts/getElementPositionTopDom.test.d.ts.map +1 -0
- package/dist/clientSideScripts/getElementPositionTopDom.test.js +11 -0
- package/dist/clientSideScripts/getElementPositionTopScreenNativeMobile.d.ts +14 -0
- package/dist/clientSideScripts/getElementPositionTopScreenNativeMobile.d.ts.map +1 -0
- package/dist/clientSideScripts/getElementPositionTopScreenNativeMobile.js +19 -0
- package/dist/clientSideScripts/getElementPositionTopScreenNativeMobile.test.d.ts +2 -0
- package/dist/clientSideScripts/getElementPositionTopScreenNativeMobile.test.d.ts.map +1 -0
- package/dist/clientSideScripts/getElementPositionTopScreenNativeMobile.test.js +52 -0
- package/dist/clientSideScripts/getMobileWebviewClickAndDimensions.d.ts +6 -0
- package/dist/clientSideScripts/getMobileWebviewClickAndDimensions.d.ts.map +1 -0
- package/dist/clientSideScripts/getMobileWebviewClickAndDimensions.js +17 -0
- package/dist/clientSideScripts/getMobileWebviewClickAndDimensions.test.d.ts +2 -0
- package/dist/clientSideScripts/getMobileWebviewClickAndDimensions.test.d.ts.map +1 -0
- package/dist/clientSideScripts/getMobileWebviewClickAndDimensions.test.js +47 -0
- package/dist/clientSideScripts/getScreenDimensions.d.ts +6 -0
- package/dist/clientSideScripts/getScreenDimensions.d.ts.map +1 -0
- package/dist/clientSideScripts/getScreenDimensions.js +104 -0
- package/dist/clientSideScripts/getScreenDimensions.test.d.ts +2 -0
- package/dist/clientSideScripts/getScreenDimensions.test.d.ts.map +1 -0
- package/dist/clientSideScripts/getScreenDimensions.test.js +161 -0
- package/dist/clientSideScripts/hideRemoveElements.d.ts +8 -0
- package/dist/clientSideScripts/hideRemoveElements.d.ts.map +1 -0
- package/dist/clientSideScripts/hideRemoveElements.js +60 -0
- package/dist/clientSideScripts/hideRemoveElements.test.d.ts +2 -0
- package/dist/clientSideScripts/hideRemoveElements.test.d.ts.map +1 -0
- package/dist/clientSideScripts/hideRemoveElements.test.js +199 -0
- package/dist/clientSideScripts/hideScrollbars.d.ts +9 -0
- package/dist/clientSideScripts/hideScrollbars.d.ts.map +1 -0
- package/dist/clientSideScripts/hideScrollbars.js +15 -0
- package/dist/clientSideScripts/hideScrollbars.test.d.ts +2 -0
- package/dist/clientSideScripts/hideScrollbars.test.d.ts.map +1 -0
- package/dist/clientSideScripts/hideScrollbars.test.js +12 -0
- package/dist/clientSideScripts/injectWebviewOverlay.d.ts +5 -0
- package/dist/clientSideScripts/injectWebviewOverlay.d.ts.map +1 -0
- package/dist/clientSideScripts/injectWebviewOverlay.js +35 -0
- package/dist/clientSideScripts/injectWebviewOverlay.test.d.ts +2 -0
- package/dist/clientSideScripts/injectWebviewOverlay.test.d.ts.map +1 -0
- package/dist/clientSideScripts/injectWebviewOverlay.test.js +74 -0
- package/dist/clientSideScripts/removeElementFromDom.d.ts +5 -0
- package/dist/clientSideScripts/removeElementFromDom.d.ts.map +1 -0
- package/dist/clientSideScripts/removeElementFromDom.js +9 -0
- package/dist/clientSideScripts/removeElementFromDom.test.d.ts +2 -0
- package/dist/clientSideScripts/removeElementFromDom.test.d.ts.map +1 -0
- package/dist/clientSideScripts/removeElementFromDom.test.js +43 -0
- package/dist/clientSideScripts/screenDimensions.interfaces.d.ts +96 -0
- package/dist/clientSideScripts/screenDimensions.interfaces.d.ts.map +1 -0
- package/dist/clientSideScripts/screenDimensions.interfaces.js +1 -0
- package/dist/clientSideScripts/scrollElementIntoView.d.ts +5 -0
- package/dist/clientSideScripts/scrollElementIntoView.d.ts.map +1 -0
- package/dist/clientSideScripts/scrollElementIntoView.js +31 -0
- package/dist/clientSideScripts/scrollElementIntoView.test.d.ts +2 -0
- package/dist/clientSideScripts/scrollElementIntoView.test.d.ts.map +1 -0
- package/dist/clientSideScripts/scrollElementIntoView.test.js +79 -0
- package/dist/clientSideScripts/scrollToPosition.d.ts +5 -0
- package/dist/clientSideScripts/scrollToPosition.d.ts.map +1 -0
- package/dist/clientSideScripts/scrollToPosition.js +25 -0
- package/dist/clientSideScripts/scrollToPosition.test.d.ts +2 -0
- package/dist/clientSideScripts/scrollToPosition.test.d.ts.map +1 -0
- package/dist/clientSideScripts/scrollToPosition.test.js +72 -0
- package/dist/clientSideScripts/setCustomCss.d.ts +6 -0
- package/dist/clientSideScripts/setCustomCss.d.ts.map +1 -0
- package/dist/clientSideScripts/setCustomCss.js +36 -0
- package/dist/clientSideScripts/setCustomCss.test.d.ts +2 -0
- package/dist/clientSideScripts/setCustomCss.test.d.ts.map +1 -0
- package/dist/clientSideScripts/setCustomCss.test.js +68 -0
- package/dist/clientSideScripts/statusAddressToolBarOffsets.interfaces.d.ts +11 -0
- package/dist/clientSideScripts/statusAddressToolBarOffsets.interfaces.d.ts.map +1 -0
- package/dist/clientSideScripts/statusAddressToolBarOffsets.interfaces.js +1 -0
- package/dist/clientSideScripts/toggleTextTransparency.d.ts +5 -0
- package/dist/clientSideScripts/toggleTextTransparency.d.ts.map +1 -0
- package/dist/clientSideScripts/toggleTextTransparency.js +16 -0
- package/dist/clientSideScripts/toggleTextTransparency.test.d.ts +2 -0
- package/dist/clientSideScripts/toggleTextTransparency.test.d.ts.map +1 -0
- package/dist/clientSideScripts/toggleTextTransparency.test.js +35 -0
- package/dist/clientSideScripts/waitForFonts.d.ts +8 -0
- package/dist/clientSideScripts/waitForFonts.d.ts.map +1 -0
- package/dist/clientSideScripts/waitForFonts.js +20 -0
- package/dist/clientSideScripts/waitForFonts.test.d.ts +2 -0
- package/dist/clientSideScripts/waitForFonts.test.d.ts.map +1 -0
- package/dist/clientSideScripts/waitForFonts.test.js +37 -0
- package/dist/commands/check.interfaces.d.ts +35 -0
- package/dist/commands/check.interfaces.d.ts.map +1 -0
- package/dist/commands/check.interfaces.js +1 -0
- package/dist/commands/checkAppElement.d.ts +7 -0
- package/dist/commands/checkAppElement.d.ts.map +1 -0
- package/dist/commands/checkAppElement.js +44 -0
- package/dist/commands/checkAppElement.test.d.ts +2 -0
- package/dist/commands/checkAppElement.test.d.ts.map +1 -0
- package/dist/commands/checkAppElement.test.js +241 -0
- package/dist/commands/checkAppScreen.d.ts +7 -0
- package/dist/commands/checkAppScreen.d.ts.map +1 -0
- package/dist/commands/checkAppScreen.js +73 -0
- package/dist/commands/checkAppScreen.test.d.ts +2 -0
- package/dist/commands/checkAppScreen.test.d.ts.map +1 -0
- package/dist/commands/checkAppScreen.test.js +295 -0
- package/dist/commands/checkElement.d.ts +7 -0
- package/dist/commands/checkElement.d.ts.map +1 -0
- package/dist/commands/checkElement.js +10 -0
- package/dist/commands/checkElement.test.d.ts +2 -0
- package/dist/commands/checkElement.test.d.ts.map +1 -0
- package/dist/commands/checkElement.test.js +66 -0
- package/dist/commands/checkFullPageScreen.d.ts +7 -0
- package/dist/commands/checkFullPageScreen.d.ts.map +1 -0
- package/dist/commands/checkFullPageScreen.js +56 -0
- package/dist/commands/checkFullPageScreen.test.d.ts +2 -0
- package/dist/commands/checkFullPageScreen.test.d.ts.map +1 -0
- package/dist/commands/checkFullPageScreen.test.js +259 -0
- package/dist/commands/checkScreen.d.ts +7 -0
- package/dist/commands/checkScreen.d.ts.map +1 -0
- package/dist/commands/checkScreen.js +10 -0
- package/dist/commands/checkScreen.test.d.ts +2 -0
- package/dist/commands/checkScreen.test.d.ts.map +1 -0
- package/dist/commands/checkScreen.test.js +62 -0
- package/dist/commands/checkTabbablePage.d.ts +7 -0
- package/dist/commands/checkTabbablePage.d.ts.map +1 -0
- package/dist/commands/checkTabbablePage.js +28 -0
- package/dist/commands/checkTabbablePage.test.d.ts +2 -0
- package/dist/commands/checkTabbablePage.test.d.ts.map +1 -0
- package/dist/commands/checkTabbablePage.test.js +200 -0
- package/dist/commands/checkWebElement.d.ts +7 -0
- package/dist/commands/checkWebElement.d.ts.map +1 -0
- package/dist/commands/checkWebElement.js +52 -0
- package/dist/commands/checkWebElement.test.d.ts +2 -0
- package/dist/commands/checkWebElement.test.d.ts.map +1 -0
- package/dist/commands/checkWebElement.test.js +278 -0
- package/dist/commands/checkWebScreen.d.ts +7 -0
- package/dist/commands/checkWebScreen.d.ts.map +1 -0
- package/dist/commands/checkWebScreen.js +50 -0
- package/dist/commands/checkWebScreen.test.d.ts +2 -0
- package/dist/commands/checkWebScreen.test.d.ts.map +1 -0
- package/dist/commands/checkWebScreen.test.js +227 -0
- package/dist/commands/element.interfaces.d.ts +27 -0
- package/dist/commands/element.interfaces.d.ts.map +1 -0
- package/dist/commands/element.interfaces.js +1 -0
- package/dist/commands/fullPage.interfaces.d.ts +38 -0
- package/dist/commands/fullPage.interfaces.d.ts.map +1 -0
- package/dist/commands/fullPage.interfaces.js +1 -0
- package/dist/commands/save.interfaces.d.ts +27 -0
- package/dist/commands/save.interfaces.d.ts.map +1 -0
- package/dist/commands/save.interfaces.js +1 -0
- package/dist/commands/saveAppElement.d.ts +7 -0
- package/dist/commands/saveAppElement.d.ts.map +1 -0
- package/dist/commands/saveAppElement.js +30 -0
- package/dist/commands/saveAppElement.test.d.ts +2 -0
- package/dist/commands/saveAppElement.test.d.ts.map +1 -0
- package/dist/commands/saveAppElement.test.js +199 -0
- package/dist/commands/saveAppScreen.d.ts +7 -0
- package/dist/commands/saveAppScreen.d.ts.map +1 -0
- package/dist/commands/saveAppScreen.js +43 -0
- package/dist/commands/saveAppScreen.test.d.ts +2 -0
- package/dist/commands/saveAppScreen.test.d.ts.map +1 -0
- package/dist/commands/saveAppScreen.test.js +221 -0
- package/dist/commands/saveElement.d.ts +7 -0
- package/dist/commands/saveElement.d.ts.map +1 -0
- package/dist/commands/saveElement.js +10 -0
- package/dist/commands/saveElement.test.d.ts +2 -0
- package/dist/commands/saveElement.test.d.ts.map +1 -0
- package/dist/commands/saveElement.test.js +62 -0
- package/dist/commands/saveFullPageScreen.d.ts +7 -0
- package/dist/commands/saveFullPageScreen.d.ts.map +1 -0
- package/dist/commands/saveFullPageScreen.js +60 -0
- package/dist/commands/saveFullPageScreen.test.d.ts +2 -0
- package/dist/commands/saveFullPageScreen.test.d.ts.map +1 -0
- package/dist/commands/saveFullPageScreen.test.js +293 -0
- package/dist/commands/saveScreen.d.ts +7 -0
- package/dist/commands/saveScreen.d.ts.map +1 -0
- package/dist/commands/saveScreen.js +10 -0
- package/dist/commands/saveScreen.test.d.ts +2 -0
- package/dist/commands/saveScreen.test.d.ts.map +1 -0
- package/dist/commands/saveScreen.test.js +47 -0
- package/dist/commands/saveTabbablePage.d.ts +7 -0
- package/dist/commands/saveTabbablePage.d.ts.map +1 -0
- package/dist/commands/saveTabbablePage.js +20 -0
- package/dist/commands/saveTabbablePage.test.d.ts +2 -0
- package/dist/commands/saveTabbablePage.test.d.ts.map +1 -0
- package/dist/commands/saveTabbablePage.test.js +74 -0
- package/dist/commands/saveWebElement.d.ts +7 -0
- package/dist/commands/saveWebElement.d.ts.map +1 -0
- package/dist/commands/saveWebElement.js +53 -0
- package/dist/commands/saveWebElement.test.d.ts +2 -0
- package/dist/commands/saveWebElement.test.d.ts.map +1 -0
- package/dist/commands/saveWebElement.test.js +253 -0
- package/dist/commands/saveWebScreen.d.ts +7 -0
- package/dist/commands/saveWebScreen.d.ts.map +1 -0
- package/dist/commands/saveWebScreen.js +48 -0
- package/dist/commands/saveWebScreen.test.d.ts +2 -0
- package/dist/commands/saveWebScreen.test.d.ts.map +1 -0
- package/dist/commands/saveWebScreen.test.js +222 -0
- package/dist/commands/screen.interfaces.d.ts +16 -0
- package/dist/commands/screen.interfaces.d.ts.map +1 -0
- package/dist/commands/screen.interfaces.js +1 -0
- package/dist/commands/tabbable.interfaces.d.ts +29 -0
- package/dist/commands/tabbable.interfaces.d.ts.map +1 -0
- package/dist/commands/tabbable.interfaces.js +1 -0
- package/dist/helpers/afterScreenshot.d.ts +7 -0
- package/dist/helpers/afterScreenshot.d.ts.map +1 -0
- package/dist/helpers/afterScreenshot.interfaces.d.ts +46 -0
- package/dist/helpers/afterScreenshot.interfaces.d.ts.map +1 -0
- package/dist/helpers/afterScreenshot.interfaces.js +1 -0
- package/dist/helpers/afterScreenshot.js +55 -0
- package/dist/helpers/afterScreenshot.test.d.ts +2 -0
- package/dist/helpers/afterScreenshot.test.d.ts.map +1 -0
- package/dist/helpers/afterScreenshot.test.js +241 -0
- package/dist/helpers/beforeScreenshot.d.ts +6 -0
- package/dist/helpers/beforeScreenshot.d.ts.map +1 -0
- package/dist/helpers/beforeScreenshot.interfaces.d.ts +15 -0
- package/dist/helpers/beforeScreenshot.interfaces.d.ts.map +1 -0
- package/dist/helpers/beforeScreenshot.interfaces.js +1 -0
- package/dist/helpers/beforeScreenshot.js +79 -0
- package/dist/helpers/beforeScreenshot.test.d.ts +2 -0
- package/dist/helpers/beforeScreenshot.test.d.ts.map +1 -0
- package/dist/helpers/beforeScreenshot.test.js +261 -0
- package/dist/helpers/compare.interfaces.d.ts +16 -0
- package/dist/helpers/compare.interfaces.d.ts.map +1 -0
- package/dist/helpers/compare.interfaces.js +1 -0
- package/dist/helpers/constants.d.ts +108 -0
- package/dist/helpers/constants.d.ts.map +1 -0
- package/dist/helpers/constants.interfaces.d.ts +30 -0
- package/dist/helpers/constants.interfaces.d.ts.map +1 -0
- package/dist/helpers/constants.interfaces.js +11 -0
- package/dist/helpers/constants.js +436 -0
- package/dist/helpers/options.d.ts +64 -0
- package/dist/helpers/options.d.ts.map +1 -0
- package/dist/helpers/options.interfaces.d.ts +363 -0
- package/dist/helpers/options.interfaces.d.ts.map +1 -0
- package/dist/helpers/options.interfaces.js +1 -0
- package/dist/helpers/options.js +184 -0
- package/dist/helpers/options.test.d.ts +2 -0
- package/dist/helpers/options.test.d.ts.map +1 -0
- package/dist/helpers/options.test.js +428 -0
- package/dist/helpers/utils.d.ts +134 -0
- package/dist/helpers/utils.d.ts.map +1 -0
- package/dist/helpers/utils.interfaces.d.ts +254 -0
- package/dist/helpers/utils.interfaces.d.ts.map +1 -0
- package/dist/helpers/utils.interfaces.js +1 -0
- package/dist/helpers/utils.js +566 -0
- package/dist/helpers/utils.test.d.ts +2 -0
- package/dist/helpers/utils.test.d.ts.map +1 -0
- package/dist/helpers/utils.test.js +900 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/methods/compareReport.interfaces.d.ts +109 -0
- package/dist/methods/compareReport.interfaces.d.ts.map +1 -0
- package/dist/methods/compareReport.interfaces.js +1 -0
- package/dist/methods/createCompareReport.d.ts +7 -0
- package/dist/methods/createCompareReport.d.ts.map +1 -0
- package/dist/methods/createCompareReport.js +61 -0
- package/dist/methods/createCompareReport.test.d.ts +2 -0
- package/dist/methods/createCompareReport.test.d.ts.map +1 -0
- package/dist/methods/createCompareReport.test.js +236 -0
- package/dist/methods/elementPosition.d.ts +18 -0
- package/dist/methods/elementPosition.d.ts.map +1 -0
- package/dist/methods/elementPosition.interfaces.d.ts +14 -0
- package/dist/methods/elementPosition.interfaces.d.ts.map +1 -0
- package/dist/methods/elementPosition.interfaces.js +1 -0
- package/dist/methods/elementPosition.js +34 -0
- package/dist/methods/images.d.ts +69 -0
- package/dist/methods/images.d.ts.map +1 -0
- package/dist/methods/images.executeImageCompare.test.d.ts +2 -0
- package/dist/methods/images.executeImageCompare.test.d.ts.map +1 -0
- package/dist/methods/images.executeImageCompare.test.js +770 -0
- package/dist/methods/images.interfaces.d.ts +214 -0
- package/dist/methods/images.interfaces.d.ts.map +1 -0
- package/dist/methods/images.interfaces.js +1 -0
- package/dist/methods/images.js +428 -0
- package/dist/methods/images.test.d.ts +2 -0
- package/dist/methods/images.test.d.ts.map +1 -0
- package/dist/methods/images.test.js +1465 -0
- package/dist/methods/instanceData.d.ts +6 -0
- package/dist/methods/instanceData.d.ts.map +1 -0
- package/dist/methods/instanceData.interfaces.d.ts +57 -0
- package/dist/methods/instanceData.interfaces.d.ts.map +1 -0
- package/dist/methods/instanceData.interfaces.js +1 -0
- package/dist/methods/instanceData.js +42 -0
- package/dist/methods/instanceData.test.d.ts +2 -0
- package/dist/methods/instanceData.test.d.ts.map +1 -0
- package/dist/methods/instanceData.test.js +224 -0
- package/dist/methods/processDiffPixels.d.ts +59 -0
- package/dist/methods/processDiffPixels.d.ts.map +1 -0
- package/dist/methods/processDiffPixels.js +242 -0
- package/dist/methods/processDiffPixels.test.d.ts +2 -0
- package/dist/methods/processDiffPixels.test.d.ts.map +1 -0
- package/dist/methods/processDiffPixels.test.js +122 -0
- package/dist/methods/rectangles.d.ts +51 -0
- package/dist/methods/rectangles.d.ts.map +1 -0
- package/dist/methods/rectangles.interfaces.d.ts +146 -0
- package/dist/methods/rectangles.interfaces.d.ts.map +1 -0
- package/dist/methods/rectangles.interfaces.js +1 -0
- package/dist/methods/rectangles.js +266 -0
- package/dist/methods/rectangles.test.d.ts +2 -0
- package/dist/methods/rectangles.test.d.ts.map +1 -0
- package/dist/methods/rectangles.test.js +853 -0
- package/dist/methods/screenshots.d.ts +37 -0
- package/dist/methods/screenshots.d.ts.map +1 -0
- package/dist/methods/screenshots.interfaces.d.ts +203 -0
- package/dist/methods/screenshots.interfaces.d.ts.map +1 -0
- package/dist/methods/screenshots.interfaces.js +1 -0
- package/dist/methods/screenshots.js +394 -0
- package/dist/methods/screenshots.test.d.ts +2 -0
- package/dist/methods/screenshots.test.d.ts.map +1 -0
- package/dist/methods/screenshots.test.js +656 -0
- package/dist/methods/takeElementScreenshots.d.ts +3 -0
- package/dist/methods/takeElementScreenshots.d.ts.map +1 -0
- package/dist/methods/takeElementScreenshots.js +104 -0
- package/dist/methods/takeElementScreenshots.test.d.ts +2 -0
- package/dist/methods/takeElementScreenshots.test.d.ts.map +1 -0
- package/dist/methods/takeElementScreenshots.test.js +314 -0
- package/dist/methods/takeFullPageScreenshots.d.ts +3 -0
- package/dist/methods/takeFullPageScreenshots.d.ts.map +1 -0
- package/dist/methods/takeFullPageScreenshots.js +56 -0
- package/dist/methods/takeFullPageScreenshots.test.d.ts +2 -0
- package/dist/methods/takeFullPageScreenshots.test.d.ts.map +1 -0
- package/dist/methods/takeFullPageScreenshots.test.js +72 -0
- package/dist/methods/takeWebScreenshots.d.ts +3 -0
- package/dist/methods/takeWebScreenshots.d.ts.map +1 -0
- package/dist/methods/takeWebScreenshots.js +41 -0
- package/dist/methods/takeWebScreenshots.test.d.ts +2 -0
- package/dist/methods/takeWebScreenshots.test.d.ts.map +1 -0
- package/dist/methods/takeWebScreenshots.test.js +149 -0
- package/dist/mocks/image.d.ts +4 -0
- package/dist/mocks/image.d.ts.map +1 -0
- package/dist/mocks/image.js +3 -0
- package/dist/mocks/mocks.d.ts +745 -0
- package/dist/mocks/mocks.d.ts.map +1 -0
- package/dist/mocks/mocks.js +392 -0
- package/dist/resemble/compare.interfaces.d.ts +136 -0
- package/dist/resemble/compare.interfaces.d.ts.map +1 -0
- package/dist/resemble/compare.interfaces.js +1 -0
- package/dist/resemble/compareImages.d.ts +3 -0
- package/dist/resemble/compareImages.d.ts.map +1 -0
- package/dist/resemble/compareImages.js +21 -0
- package/dist/resemble/resemble.jimp.cjs +981 -0
- package/dist/resemble/resemble.jimp.d.cts +46 -0
- package/dist/resemble/resemble.jimp.d.cts.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,770 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import logger from '@wdio/logger';
|
|
4
|
+
import { promises as fsPromises } from 'node:fs';
|
|
5
|
+
import { readFileSync, writeFileSync } from 'node:fs';
|
|
6
|
+
import * as utils from '../helpers/utils.js';
|
|
7
|
+
import * as rectangles from './rectangles.js';
|
|
8
|
+
import * as processDiffPixels from './processDiffPixels.js';
|
|
9
|
+
import * as createCompareReport from './createCompareReport.js';
|
|
10
|
+
import * as compareImages from '../resemble/compareImages.js';
|
|
11
|
+
const log = logger('test');
|
|
12
|
+
vi.mock('@wdio/logger', () => import(join(process.cwd(), '__mocks__', '@wdio/logger')));
|
|
13
|
+
vi.mock('jimp', () => {
|
|
14
|
+
const mockImage = {
|
|
15
|
+
composite: vi.fn().mockReturnThis(),
|
|
16
|
+
getBase64: vi.fn().mockResolvedValue('data:image/png;base64,mock-image-data'),
|
|
17
|
+
opacity: vi.fn().mockReturnThis(),
|
|
18
|
+
width: 100,
|
|
19
|
+
height: 200,
|
|
20
|
+
bitmap: { width: 100, height: 200 },
|
|
21
|
+
background: 0,
|
|
22
|
+
formats: [],
|
|
23
|
+
inspect: vi.fn().mockReturnValue('MockImage'),
|
|
24
|
+
toString: vi.fn().mockReturnValue('MockImage'),
|
|
25
|
+
scanIterator: vi.fn(),
|
|
26
|
+
scan: vi.fn(),
|
|
27
|
+
scanQuiet: vi.fn(),
|
|
28
|
+
scanIteratorQuiet: vi.fn(),
|
|
29
|
+
scanQuietIterator: vi.fn(),
|
|
30
|
+
scanQuietIteratorQuiet: vi.fn(),
|
|
31
|
+
};
|
|
32
|
+
const JimpMock = vi.fn().mockImplementation(() => mockImage);
|
|
33
|
+
JimpMock.read = vi.fn().mockResolvedValue(mockImage);
|
|
34
|
+
JimpMock.MIME_PNG = 'image/png';
|
|
35
|
+
return {
|
|
36
|
+
Jimp: JimpMock,
|
|
37
|
+
JimpMime: {
|
|
38
|
+
png: 'image/png',
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
vi.mock('node:fs', async () => {
|
|
43
|
+
const actual = await vi.importActual('node:fs');
|
|
44
|
+
return {
|
|
45
|
+
...actual,
|
|
46
|
+
promises: {
|
|
47
|
+
access: vi.fn(),
|
|
48
|
+
unlink: vi.fn(),
|
|
49
|
+
mkdir: vi.fn(),
|
|
50
|
+
writeFile: vi.fn()
|
|
51
|
+
},
|
|
52
|
+
readFileSync: vi.fn(),
|
|
53
|
+
writeFileSync: vi.fn(),
|
|
54
|
+
constants: {
|
|
55
|
+
R_OK: 4,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
vi.mock('../helpers/utils.js', () => ({
|
|
60
|
+
getAndCreatePath: vi.fn(),
|
|
61
|
+
getBase64ScreenshotSize: vi.fn(),
|
|
62
|
+
updateVisualBaseline: vi.fn(),
|
|
63
|
+
calculateDprData: vi.fn(),
|
|
64
|
+
prepareComparisonFilePaths: vi.fn()
|
|
65
|
+
}));
|
|
66
|
+
vi.mock('./rectangles.js', () => ({
|
|
67
|
+
determineStatusAddressToolBarRectangles: vi.fn(),
|
|
68
|
+
isWdioElement: vi.fn(),
|
|
69
|
+
prepareIgnoreRectangles: vi.fn()
|
|
70
|
+
}));
|
|
71
|
+
vi.mock('./processDiffPixels.js', () => ({
|
|
72
|
+
processDiffPixels: vi.fn(),
|
|
73
|
+
generateAndSaveDiff: vi.fn()
|
|
74
|
+
}));
|
|
75
|
+
vi.mock('./createCompareReport.js', () => ({
|
|
76
|
+
createCompareReport: vi.fn(),
|
|
77
|
+
createJsonReportIfNeeded: vi.fn()
|
|
78
|
+
}));
|
|
79
|
+
vi.mock('../resemble/compareImages.js', () => ({
|
|
80
|
+
default: vi.fn()
|
|
81
|
+
}));
|
|
82
|
+
vi.mock('../helpers/constants.js', () => ({
|
|
83
|
+
DEFAULT_RESIZE_DIMENSIONS: { top: 0, right: 0, bottom: 0, left: 0 }
|
|
84
|
+
}));
|
|
85
|
+
vi.mock('process', () => ({
|
|
86
|
+
argv: ['node', 'test.js']
|
|
87
|
+
}));
|
|
88
|
+
vi.mock('./images.js', async () => {
|
|
89
|
+
const actual = await vi.importActual('./images.js');
|
|
90
|
+
return {
|
|
91
|
+
...actual,
|
|
92
|
+
checkBaselineImageExists: vi.fn(),
|
|
93
|
+
removeDiffImageIfExists: vi.fn(),
|
|
94
|
+
saveBase64Image: vi.fn(),
|
|
95
|
+
addBlockOuts: vi.fn(),
|
|
96
|
+
};
|
|
97
|
+
});
|
|
98
|
+
import { executeImageCompare } from './images.js';
|
|
99
|
+
import * as images from './images.js';
|
|
100
|
+
describe('executeImageCompare', () => {
|
|
101
|
+
const mockDeviceRectangles = {
|
|
102
|
+
bottomBar: { x: 0, y: 0, width: 0, height: 0 },
|
|
103
|
+
homeBar: { x: 0, y: 0, width: 0, height: 0 },
|
|
104
|
+
leftSidePadding: { x: 0, y: 0, width: 0, height: 0 },
|
|
105
|
+
rightSidePadding: { x: 0, y: 0, width: 0, height: 0 },
|
|
106
|
+
screenSize: { width: 1920, height: 1080 },
|
|
107
|
+
statusBarAndAddressBar: { x: 0, y: 0, width: 0, height: 0 },
|
|
108
|
+
statusBar: { x: 0, y: 0, width: 0, height: 0 },
|
|
109
|
+
viewport: { x: 0, y: 0, width: 1920, height: 1080 }
|
|
110
|
+
};
|
|
111
|
+
const mockOptions = {
|
|
112
|
+
devicePixelRatio: 2,
|
|
113
|
+
deviceRectangles: mockDeviceRectangles,
|
|
114
|
+
ignoreRegions: [],
|
|
115
|
+
isAndroidNativeWebScreenshot: false,
|
|
116
|
+
isAndroid: false,
|
|
117
|
+
fileName: 'test.png',
|
|
118
|
+
folderOptions: {
|
|
119
|
+
actualFolder: '/actual',
|
|
120
|
+
autoSaveBaseline: false,
|
|
121
|
+
baselineFolder: '/baseline',
|
|
122
|
+
browserName: 'chrome',
|
|
123
|
+
deviceName: 'desktop',
|
|
124
|
+
diffFolder: '/diff',
|
|
125
|
+
isMobile: false,
|
|
126
|
+
savePerInstance: false
|
|
127
|
+
},
|
|
128
|
+
compareOptions: {
|
|
129
|
+
wic: {
|
|
130
|
+
scaleImagesToSameSize: true,
|
|
131
|
+
rawMisMatchPercentage: false,
|
|
132
|
+
saveAboveTolerance: 0,
|
|
133
|
+
createJsonReportFiles: false,
|
|
134
|
+
diffPixelBoundingBoxProximity: 10,
|
|
135
|
+
returnAllCompareData: false
|
|
136
|
+
},
|
|
137
|
+
method: {}
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const mockTestContext = {
|
|
141
|
+
commandName: 'test',
|
|
142
|
+
framework: 'mocha',
|
|
143
|
+
parent: 'Test Suite',
|
|
144
|
+
tag: 'test',
|
|
145
|
+
title: 'Test Title',
|
|
146
|
+
instanceData: {
|
|
147
|
+
browser: { name: 'chrome', version: '100' },
|
|
148
|
+
deviceName: 'desktop',
|
|
149
|
+
platform: { name: 'windows', version: '10' },
|
|
150
|
+
app: 'test-app',
|
|
151
|
+
isMobile: false,
|
|
152
|
+
isAndroid: false,
|
|
153
|
+
isIOS: false
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
let logWarnSpy;
|
|
157
|
+
beforeEach(async () => {
|
|
158
|
+
vi.clearAllMocks();
|
|
159
|
+
const jimp = await import('jimp');
|
|
160
|
+
const jimpReadMock = vi.mocked(jimp.Jimp.read);
|
|
161
|
+
const mockImage = {
|
|
162
|
+
composite: vi.fn().mockReturnThis(),
|
|
163
|
+
getBase64: vi.fn().mockResolvedValue('data:image/png;base64,mock-image-data'),
|
|
164
|
+
opacity: vi.fn().mockReturnThis(),
|
|
165
|
+
width: 100,
|
|
166
|
+
height: 200,
|
|
167
|
+
bitmap: { width: 100, height: 200 },
|
|
168
|
+
background: 0,
|
|
169
|
+
formats: [],
|
|
170
|
+
inspect: vi.fn().mockReturnValue('MockImage'),
|
|
171
|
+
toString: vi.fn().mockReturnValue('MockImage'),
|
|
172
|
+
scanIterator: vi.fn(),
|
|
173
|
+
scan: vi.fn(),
|
|
174
|
+
scanQuiet: vi.fn(),
|
|
175
|
+
scanIteratorQuiet: vi.fn(),
|
|
176
|
+
scanQuietIterator: vi.fn(),
|
|
177
|
+
scanQuietIteratorQuiet: vi.fn(),
|
|
178
|
+
};
|
|
179
|
+
jimpReadMock.mockResolvedValue(mockImage);
|
|
180
|
+
vi.mocked(fsPromises.access).mockResolvedValue(undefined);
|
|
181
|
+
vi.mocked(fsPromises.unlink).mockResolvedValue(undefined);
|
|
182
|
+
vi.mocked(fsPromises.mkdir).mockResolvedValue(undefined);
|
|
183
|
+
vi.mocked(fsPromises.writeFile).mockResolvedValue(undefined);
|
|
184
|
+
vi.mocked(readFileSync).mockReturnValue(Buffer.from('mock-image-data'));
|
|
185
|
+
vi.mocked(writeFileSync).mockReturnValue(undefined);
|
|
186
|
+
vi.mocked(utils.getAndCreatePath).mockReturnValue('/mock/path');
|
|
187
|
+
vi.mocked(utils.getBase64ScreenshotSize).mockReturnValue({ width: 100, height: 200 });
|
|
188
|
+
vi.mocked(utils.updateVisualBaseline).mockReturnValue(false);
|
|
189
|
+
vi.mocked(utils.calculateDprData).mockImplementation((rectangles) => rectangles);
|
|
190
|
+
vi.mocked(utils.prepareComparisonFilePaths).mockReturnValue({
|
|
191
|
+
actualFolderPath: '/mock/actual',
|
|
192
|
+
baselineFolderPath: '/mock/baseline',
|
|
193
|
+
diffFolderPath: '/mock/diff',
|
|
194
|
+
actualFilePath: '/mock/actual/test.png',
|
|
195
|
+
baselineFilePath: '/mock/baseline/test.png',
|
|
196
|
+
diffFilePath: '/mock/diff/test.png'
|
|
197
|
+
});
|
|
198
|
+
vi.mocked(rectangles.determineStatusAddressToolBarRectangles).mockReturnValue(null);
|
|
199
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
200
|
+
ignoredBoxes: [],
|
|
201
|
+
hasIgnoreRectangles: false
|
|
202
|
+
});
|
|
203
|
+
vi.mocked(processDiffPixels.processDiffPixels).mockReturnValue([]);
|
|
204
|
+
vi.mocked(processDiffPixels.generateAndSaveDiff).mockResolvedValue({
|
|
205
|
+
diffBoundingBoxes: [],
|
|
206
|
+
storeDiffs: false
|
|
207
|
+
});
|
|
208
|
+
vi.mocked(createCompareReport.createCompareReport).mockReturnValue(undefined);
|
|
209
|
+
vi.mocked(createCompareReport.createJsonReportIfNeeded).mockResolvedValue(undefined);
|
|
210
|
+
vi.mocked(compareImages.default).mockResolvedValue({
|
|
211
|
+
rawMisMatchPercentage: 0.5,
|
|
212
|
+
misMatchPercentage: 0.5,
|
|
213
|
+
getBuffer: vi.fn().mockResolvedValue(Buffer.from('diff-image-data')),
|
|
214
|
+
diffBounds: { left: 0, top: 0, right: 100, bottom: 200 },
|
|
215
|
+
analysisTime: 100,
|
|
216
|
+
diffPixels: []
|
|
217
|
+
});
|
|
218
|
+
vi.mocked(images.checkBaselineImageExists).mockResolvedValue(undefined);
|
|
219
|
+
vi.mocked(images.removeDiffImageIfExists).mockResolvedValue(undefined);
|
|
220
|
+
vi.mocked(images.saveBase64Image).mockResolvedValue(undefined);
|
|
221
|
+
vi.mocked(images.addBlockOuts).mockResolvedValue('mock-blockout-image');
|
|
222
|
+
logWarnSpy = vi.spyOn(log, 'warn');
|
|
223
|
+
});
|
|
224
|
+
afterEach(() => {
|
|
225
|
+
vi.clearAllMocks();
|
|
226
|
+
logWarnSpy.mockRestore();
|
|
227
|
+
});
|
|
228
|
+
it('should execute image comparison successfully with default options', async () => {
|
|
229
|
+
const result = await executeImageCompare({
|
|
230
|
+
isViewPortScreenshot: true,
|
|
231
|
+
isNativeContext: false,
|
|
232
|
+
options: mockOptions,
|
|
233
|
+
testContext: mockTestContext
|
|
234
|
+
});
|
|
235
|
+
expect(result).toMatchSnapshot();
|
|
236
|
+
expect(utils.prepareComparisonFilePaths).toHaveBeenCalledTimes(1);
|
|
237
|
+
expect(utils.prepareComparisonFilePaths).toHaveBeenCalledWith({
|
|
238
|
+
actualFolder: '/actual',
|
|
239
|
+
baselineFolder: '/baseline',
|
|
240
|
+
diffFolder: '/diff',
|
|
241
|
+
browserName: 'chrome',
|
|
242
|
+
deviceName: 'desktop',
|
|
243
|
+
isMobile: false,
|
|
244
|
+
savePerInstance: false,
|
|
245
|
+
fileName: 'test.png'
|
|
246
|
+
});
|
|
247
|
+
expect(compareImages.default).toHaveBeenCalledWith(Buffer.from('mock-image-data'), Buffer.from('mock-image-data'), {
|
|
248
|
+
ignore: [],
|
|
249
|
+
scaleToSameSize: true
|
|
250
|
+
});
|
|
251
|
+
});
|
|
252
|
+
it('should handle mobile context with status/address/toolbar rectangles', async () => {
|
|
253
|
+
const mobileOptions = {
|
|
254
|
+
...mockOptions,
|
|
255
|
+
folderOptions: { ...mockOptions.folderOptions, isMobile: true },
|
|
256
|
+
compareOptions: {
|
|
257
|
+
...mockOptions.compareOptions,
|
|
258
|
+
method: {
|
|
259
|
+
blockOutSideBar: true,
|
|
260
|
+
blockOutStatusBar: true,
|
|
261
|
+
blockOutToolBar: true
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
266
|
+
ignoredBoxes: [{ left: 0, top: 0, right: 100, bottom: 50 }],
|
|
267
|
+
hasIgnoreRectangles: true
|
|
268
|
+
});
|
|
269
|
+
await executeImageCompare({
|
|
270
|
+
isViewPortScreenshot: true,
|
|
271
|
+
isNativeContext: false,
|
|
272
|
+
options: mobileOptions,
|
|
273
|
+
testContext: mockTestContext
|
|
274
|
+
});
|
|
275
|
+
expect(rectangles.prepareIgnoreRectangles).toHaveBeenCalledWith({
|
|
276
|
+
blockOut: [],
|
|
277
|
+
ignoreRegions: [],
|
|
278
|
+
deviceRectangles: mockOptions.deviceRectangles,
|
|
279
|
+
devicePixelRatio: 2,
|
|
280
|
+
isMobile: true,
|
|
281
|
+
isNativeContext: false,
|
|
282
|
+
isAndroid: false,
|
|
283
|
+
isAndroidNativeWebScreenshot: false,
|
|
284
|
+
isViewPortScreenshot: true,
|
|
285
|
+
imageCompareOptions: {
|
|
286
|
+
blockOutSideBar: true,
|
|
287
|
+
blockOutStatusBar: true,
|
|
288
|
+
blockOutToolBar: true
|
|
289
|
+
}
|
|
290
|
+
});
|
|
291
|
+
});
|
|
292
|
+
it('should filter out zero-sized rectangles', async () => {
|
|
293
|
+
const mobileOptions = {
|
|
294
|
+
...mockOptions,
|
|
295
|
+
folderOptions: { ...mockOptions.folderOptions, isMobile: true }
|
|
296
|
+
};
|
|
297
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
298
|
+
ignoredBoxes: [{ left: 10, top: 10, right: 60, bottom: 60 }], // Only non-zero rectangle
|
|
299
|
+
hasIgnoreRectangles: true
|
|
300
|
+
});
|
|
301
|
+
await executeImageCompare({
|
|
302
|
+
isViewPortScreenshot: true,
|
|
303
|
+
isNativeContext: false,
|
|
304
|
+
options: mobileOptions,
|
|
305
|
+
testContext: mockTestContext
|
|
306
|
+
});
|
|
307
|
+
expect(rectangles.prepareIgnoreRectangles).toHaveBeenCalledWith({
|
|
308
|
+
blockOut: [],
|
|
309
|
+
ignoreRegions: [],
|
|
310
|
+
deviceRectangles: mockOptions.deviceRectangles,
|
|
311
|
+
devicePixelRatio: 2,
|
|
312
|
+
isMobile: true,
|
|
313
|
+
isNativeContext: false,
|
|
314
|
+
isAndroid: false,
|
|
315
|
+
isAndroidNativeWebScreenshot: false,
|
|
316
|
+
isViewPortScreenshot: true,
|
|
317
|
+
imageCompareOptions: {
|
|
318
|
+
blockOutSideBar: undefined,
|
|
319
|
+
blockOutStatusBar: undefined,
|
|
320
|
+
blockOutToolBar: undefined
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
it('should handle when determineStatusAddressToolBarRectangles returns null', async () => {
|
|
325
|
+
const mobileOptions = {
|
|
326
|
+
...mockOptions,
|
|
327
|
+
folderOptions: { ...mockOptions.folderOptions, isMobile: true },
|
|
328
|
+
compareOptions: {
|
|
329
|
+
...mockOptions.compareOptions,
|
|
330
|
+
method: {
|
|
331
|
+
blockOutSideBar: true,
|
|
332
|
+
blockOutStatusBar: true,
|
|
333
|
+
blockOutToolBar: true
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
};
|
|
337
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
338
|
+
ignoredBoxes: [],
|
|
339
|
+
hasIgnoreRectangles: false
|
|
340
|
+
});
|
|
341
|
+
await executeImageCompare({
|
|
342
|
+
isViewPortScreenshot: true,
|
|
343
|
+
isNativeContext: false,
|
|
344
|
+
options: mobileOptions,
|
|
345
|
+
testContext: mockTestContext
|
|
346
|
+
});
|
|
347
|
+
expect(rectangles.prepareIgnoreRectangles).toHaveBeenCalledWith({
|
|
348
|
+
blockOut: [],
|
|
349
|
+
ignoreRegions: [],
|
|
350
|
+
deviceRectangles: mockOptions.deviceRectangles,
|
|
351
|
+
devicePixelRatio: 2,
|
|
352
|
+
isMobile: true,
|
|
353
|
+
isNativeContext: false,
|
|
354
|
+
isAndroid: false,
|
|
355
|
+
isAndroidNativeWebScreenshot: false,
|
|
356
|
+
isViewPortScreenshot: true,
|
|
357
|
+
imageCompareOptions: {
|
|
358
|
+
blockOutSideBar: true,
|
|
359
|
+
blockOutStatusBar: true,
|
|
360
|
+
blockOutToolBar: true
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
});
|
|
364
|
+
it('should handle ignore regions and blockOut rectangles', async () => {
|
|
365
|
+
const optionsWithIgnore = {
|
|
366
|
+
...mockOptions,
|
|
367
|
+
ignoreRegions: [{ x: 0, y: 0, width: 100, height: 50 }],
|
|
368
|
+
compareOptions: {
|
|
369
|
+
...mockOptions.compareOptions,
|
|
370
|
+
method: {
|
|
371
|
+
blockOut: [{ x: 200, y: 200, width: 100, height: 100 }]
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
376
|
+
ignoredBoxes: [
|
|
377
|
+
{ left: 0, top: 0, right: 100, bottom: 50 },
|
|
378
|
+
{ left: 200, top: 200, right: 300, bottom: 300 }
|
|
379
|
+
],
|
|
380
|
+
hasIgnoreRectangles: true
|
|
381
|
+
});
|
|
382
|
+
await executeImageCompare({
|
|
383
|
+
isViewPortScreenshot: true,
|
|
384
|
+
isNativeContext: false,
|
|
385
|
+
options: optionsWithIgnore,
|
|
386
|
+
testContext: mockTestContext
|
|
387
|
+
});
|
|
388
|
+
expect(rectangles.prepareIgnoreRectangles).toHaveBeenCalledWith({
|
|
389
|
+
blockOut: [{ x: 200, y: 200, width: 100, height: 100 }],
|
|
390
|
+
ignoreRegions: [{ x: 0, y: 0, width: 100, height: 50 }],
|
|
391
|
+
deviceRectangles: mockOptions.deviceRectangles,
|
|
392
|
+
devicePixelRatio: 2,
|
|
393
|
+
isMobile: false,
|
|
394
|
+
isNativeContext: false,
|
|
395
|
+
isAndroid: false,
|
|
396
|
+
isAndroidNativeWebScreenshot: false,
|
|
397
|
+
isViewPortScreenshot: true,
|
|
398
|
+
imageCompareOptions: {
|
|
399
|
+
blockOutSideBar: undefined,
|
|
400
|
+
blockOutStatusBar: undefined,
|
|
401
|
+
blockOutToolBar: undefined
|
|
402
|
+
}
|
|
403
|
+
});
|
|
404
|
+
});
|
|
405
|
+
it('should create JSON report files when enabled', async () => {
|
|
406
|
+
const optionsWithJsonReport = {
|
|
407
|
+
...mockOptions,
|
|
408
|
+
compareOptions: {
|
|
409
|
+
...mockOptions.compareOptions,
|
|
410
|
+
wic: {
|
|
411
|
+
...mockOptions.compareOptions.wic,
|
|
412
|
+
createJsonReportFiles: true,
|
|
413
|
+
saveAboveTolerance: 0.1
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
vi.mocked(compareImages.default).mockResolvedValue({
|
|
418
|
+
rawMisMatchPercentage: 0.5,
|
|
419
|
+
misMatchPercentage: 0.5,
|
|
420
|
+
getBuffer: vi.fn().mockResolvedValue(Buffer.from('diff-image-data')),
|
|
421
|
+
diffBounds: { left: 0, top: 0, right: 100, bottom: 200 },
|
|
422
|
+
analysisTime: 100,
|
|
423
|
+
diffPixels: [{ x: 10, y: 10 }]
|
|
424
|
+
});
|
|
425
|
+
vi.mocked(processDiffPixels.generateAndSaveDiff).mockResolvedValue({
|
|
426
|
+
diffBoundingBoxes: [{ left: 5, top: 5, right: 15, bottom: 15 }],
|
|
427
|
+
storeDiffs: true
|
|
428
|
+
});
|
|
429
|
+
await executeImageCompare({
|
|
430
|
+
isViewPortScreenshot: true,
|
|
431
|
+
isNativeContext: false,
|
|
432
|
+
options: optionsWithJsonReport,
|
|
433
|
+
testContext: mockTestContext
|
|
434
|
+
});
|
|
435
|
+
expect(processDiffPixels.generateAndSaveDiff).toHaveBeenCalledWith(expect.any(Object), expect.objectContaining({
|
|
436
|
+
createJsonReportFiles: true,
|
|
437
|
+
saveAboveTolerance: 0.1
|
|
438
|
+
}), [], '/mock/diff/test.png', 0.5);
|
|
439
|
+
expect(createCompareReport.createJsonReportIfNeeded).toHaveBeenCalledWith({
|
|
440
|
+
boundingBoxes: {
|
|
441
|
+
diffBoundingBoxes: [{ left: 5, top: 5, right: 15, bottom: 15 }],
|
|
442
|
+
ignoredBoxes: []
|
|
443
|
+
},
|
|
444
|
+
data: expect.any(Object),
|
|
445
|
+
fileName: 'test.png',
|
|
446
|
+
filePaths: {
|
|
447
|
+
actualFolderPath: '/mock/actual',
|
|
448
|
+
baselineFolderPath: '/mock/baseline',
|
|
449
|
+
diffFolderPath: '/mock/diff',
|
|
450
|
+
actualFilePath: '/mock/actual/test.png',
|
|
451
|
+
baselineFilePath: '/mock/baseline/test.png',
|
|
452
|
+
diffFilePath: '/mock/diff/test.png'
|
|
453
|
+
},
|
|
454
|
+
devicePixelRatio: 2,
|
|
455
|
+
imageCompareOptions: expect.objectContaining({
|
|
456
|
+
createJsonReportFiles: true,
|
|
457
|
+
saveAboveTolerance: 0.1
|
|
458
|
+
}),
|
|
459
|
+
testContext: mockTestContext,
|
|
460
|
+
storeDiffs: true
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
it('should return all compare data when returnAllCompareData is true', async () => {
|
|
464
|
+
const optionsWithReturnAll = {
|
|
465
|
+
...mockOptions,
|
|
466
|
+
compareOptions: {
|
|
467
|
+
...mockOptions.compareOptions,
|
|
468
|
+
wic: {
|
|
469
|
+
...mockOptions.compareOptions.wic,
|
|
470
|
+
returnAllCompareData: true
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
const result = await executeImageCompare({
|
|
475
|
+
isViewPortScreenshot: true,
|
|
476
|
+
isNativeContext: false,
|
|
477
|
+
options: optionsWithReturnAll,
|
|
478
|
+
testContext: mockTestContext
|
|
479
|
+
});
|
|
480
|
+
expect(result).toMatchSnapshot();
|
|
481
|
+
vi.mocked(utils.getAndCreatePath).mockReturnValueOnce('/mock/path/actual');
|
|
482
|
+
vi.mocked(utils.getAndCreatePath).mockReturnValueOnce('/mock/path/baseline');
|
|
483
|
+
vi.mocked(utils.getAndCreatePath).mockReturnValueOnce('/mock/path/diff');
|
|
484
|
+
const resultWithoutDiff = await executeImageCompare({
|
|
485
|
+
isViewPortScreenshot: true,
|
|
486
|
+
isNativeContext: false,
|
|
487
|
+
options: optionsWithReturnAll,
|
|
488
|
+
testContext: mockTestContext
|
|
489
|
+
});
|
|
490
|
+
expect(resultWithoutDiff).toMatchSnapshot();
|
|
491
|
+
});
|
|
492
|
+
it('should handle rawMisMatchPercentage option', async () => {
|
|
493
|
+
const optionsWithRaw = {
|
|
494
|
+
...mockOptions,
|
|
495
|
+
compareOptions: {
|
|
496
|
+
...mockOptions.compareOptions,
|
|
497
|
+
wic: {
|
|
498
|
+
...mockOptions.compareOptions.wic,
|
|
499
|
+
rawMisMatchPercentage: true
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
};
|
|
503
|
+
vi.mocked(compareImages.default).mockResolvedValue({
|
|
504
|
+
rawMisMatchPercentage: 0.123456,
|
|
505
|
+
misMatchPercentage: 0.12,
|
|
506
|
+
getBuffer: vi.fn().mockResolvedValue(Buffer.from('diff-image-data')),
|
|
507
|
+
diffBounds: { left: 0, top: 0, right: 100, bottom: 200 },
|
|
508
|
+
analysisTime: 100,
|
|
509
|
+
diffPixels: []
|
|
510
|
+
});
|
|
511
|
+
const result = await executeImageCompare({
|
|
512
|
+
isViewPortScreenshot: true,
|
|
513
|
+
isNativeContext: false,
|
|
514
|
+
options: optionsWithRaw,
|
|
515
|
+
testContext: mockTestContext
|
|
516
|
+
});
|
|
517
|
+
expect(result).toMatchSnapshot();
|
|
518
|
+
});
|
|
519
|
+
it('should handle updateVisualBaseline flag', async () => {
|
|
520
|
+
vi.mocked(utils.updateVisualBaseline).mockReturnValue(true);
|
|
521
|
+
const result = await executeImageCompare({
|
|
522
|
+
isViewPortScreenshot: true,
|
|
523
|
+
isNativeContext: false,
|
|
524
|
+
options: mockOptions,
|
|
525
|
+
testContext: mockTestContext
|
|
526
|
+
});
|
|
527
|
+
expect(result).toMatchSnapshot();
|
|
528
|
+
});
|
|
529
|
+
it('should handle Android device pixel ratio correctly', async () => {
|
|
530
|
+
const androidOptions = {
|
|
531
|
+
...mockOptions,
|
|
532
|
+
isAndroid: true,
|
|
533
|
+
devicePixelRatio: 3,
|
|
534
|
+
ignoreRegions: [{ x: 0, y: 0, width: 100, height: 50 }]
|
|
535
|
+
};
|
|
536
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
537
|
+
ignoredBoxes: [{ left: 0, top: 0, right: 100, bottom: 50 }],
|
|
538
|
+
hasIgnoreRectangles: true
|
|
539
|
+
});
|
|
540
|
+
await executeImageCompare({
|
|
541
|
+
isViewPortScreenshot: true,
|
|
542
|
+
isNativeContext: false,
|
|
543
|
+
options: androidOptions,
|
|
544
|
+
testContext: mockTestContext
|
|
545
|
+
});
|
|
546
|
+
expect(rectangles.prepareIgnoreRectangles).toHaveBeenCalledWith({
|
|
547
|
+
blockOut: [],
|
|
548
|
+
ignoreRegions: [{ x: 0, y: 0, width: 100, height: 50 }],
|
|
549
|
+
deviceRectangles: mockOptions.deviceRectangles,
|
|
550
|
+
devicePixelRatio: 3,
|
|
551
|
+
isMobile: false,
|
|
552
|
+
isNativeContext: false,
|
|
553
|
+
isAndroid: true,
|
|
554
|
+
isAndroidNativeWebScreenshot: false,
|
|
555
|
+
isViewPortScreenshot: true,
|
|
556
|
+
imageCompareOptions: {
|
|
557
|
+
blockOutSideBar: undefined,
|
|
558
|
+
blockOutStatusBar: undefined,
|
|
559
|
+
blockOutToolBar: undefined
|
|
560
|
+
}
|
|
561
|
+
});
|
|
562
|
+
});
|
|
563
|
+
it('should handle ignore options from compareOptions', async () => {
|
|
564
|
+
const optionsWithIgnore = {
|
|
565
|
+
...mockOptions,
|
|
566
|
+
compareOptions: {
|
|
567
|
+
...mockOptions.compareOptions,
|
|
568
|
+
method: {
|
|
569
|
+
ignoreAlpha: true,
|
|
570
|
+
ignoreAntialiasing: true,
|
|
571
|
+
ignoreColors: true,
|
|
572
|
+
ignoreLess: true,
|
|
573
|
+
ignoreNothing: true
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
await executeImageCompare({
|
|
578
|
+
isViewPortScreenshot: true,
|
|
579
|
+
isNativeContext: false,
|
|
580
|
+
options: optionsWithIgnore,
|
|
581
|
+
testContext: mockTestContext
|
|
582
|
+
});
|
|
583
|
+
expect(compareImages.default).toHaveBeenCalledWith(expect.any(Buffer), expect.any(Buffer), {
|
|
584
|
+
ignore: ['alpha', 'antialiasing', 'colors', 'less', 'nothing'],
|
|
585
|
+
scaleToSameSize: true
|
|
586
|
+
});
|
|
587
|
+
});
|
|
588
|
+
it('should handle native context without status/address/toolbar rectangles', async () => {
|
|
589
|
+
const mobileOptions = {
|
|
590
|
+
...mockOptions,
|
|
591
|
+
folderOptions: { ...mockOptions.folderOptions, isMobile: true }
|
|
592
|
+
};
|
|
593
|
+
await executeImageCompare({
|
|
594
|
+
isViewPortScreenshot: true,
|
|
595
|
+
isNativeContext: true,
|
|
596
|
+
options: mobileOptions,
|
|
597
|
+
testContext: mockTestContext
|
|
598
|
+
});
|
|
599
|
+
expect(rectangles.prepareIgnoreRectangles).toHaveBeenCalledWith({
|
|
600
|
+
blockOut: [],
|
|
601
|
+
ignoreRegions: [],
|
|
602
|
+
deviceRectangles: mockOptions.deviceRectangles,
|
|
603
|
+
devicePixelRatio: 2,
|
|
604
|
+
isMobile: true,
|
|
605
|
+
isNativeContext: true,
|
|
606
|
+
isAndroid: false,
|
|
607
|
+
isAndroidNativeWebScreenshot: false,
|
|
608
|
+
isViewPortScreenshot: true,
|
|
609
|
+
imageCompareOptions: {
|
|
610
|
+
blockOutSideBar: undefined,
|
|
611
|
+
blockOutStatusBar: undefined,
|
|
612
|
+
blockOutToolBar: undefined
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
});
|
|
616
|
+
it('should handle case when no ignored boxes are present', async () => {
|
|
617
|
+
await executeImageCompare({
|
|
618
|
+
isViewPortScreenshot: true,
|
|
619
|
+
isNativeContext: false,
|
|
620
|
+
options: mockOptions,
|
|
621
|
+
testContext: mockTestContext
|
|
622
|
+
});
|
|
623
|
+
expect(compareImages.default).toHaveBeenCalledWith(expect.any(Buffer), expect.any(Buffer), {
|
|
624
|
+
ignore: [],
|
|
625
|
+
scaleToSameSize: true
|
|
626
|
+
});
|
|
627
|
+
});
|
|
628
|
+
it('should handle case when ignored boxes are present', async () => {
|
|
629
|
+
const optionsWithBlockOut = {
|
|
630
|
+
...mockOptions,
|
|
631
|
+
compareOptions: {
|
|
632
|
+
...mockOptions.compareOptions,
|
|
633
|
+
method: {
|
|
634
|
+
blockOut: [{ x: 0, y: 0, width: 100, height: 50 }]
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
vi.mocked(rectangles.prepareIgnoreRectangles).mockReturnValue({
|
|
639
|
+
ignoredBoxes: [{ bottom: 50, right: 100, left: 0, top: 0 }],
|
|
640
|
+
hasIgnoreRectangles: true
|
|
641
|
+
});
|
|
642
|
+
await executeImageCompare({
|
|
643
|
+
isViewPortScreenshot: true,
|
|
644
|
+
isNativeContext: false,
|
|
645
|
+
options: optionsWithBlockOut,
|
|
646
|
+
testContext: mockTestContext
|
|
647
|
+
});
|
|
648
|
+
expect(compareImages.default).toHaveBeenCalledWith(expect.any(Buffer), expect.any(Buffer), {
|
|
649
|
+
ignore: [],
|
|
650
|
+
output: { ignoredBoxes: [{ bottom: 50, right: 100, left: 0, top: 0 }] },
|
|
651
|
+
scaleToSameSize: true
|
|
652
|
+
});
|
|
653
|
+
});
|
|
654
|
+
it('should handle undefined saveAboveTolerance (nullish coalescing)', async () => {
|
|
655
|
+
const optionsWithUndefinedTolerance = {
|
|
656
|
+
...mockOptions,
|
|
657
|
+
compareOptions: {
|
|
658
|
+
...mockOptions.compareOptions,
|
|
659
|
+
wic: {
|
|
660
|
+
...mockOptions.compareOptions.wic,
|
|
661
|
+
saveAboveTolerance: undefined
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
};
|
|
665
|
+
await executeImageCompare({
|
|
666
|
+
isViewPortScreenshot: true,
|
|
667
|
+
isNativeContext: false,
|
|
668
|
+
options: optionsWithUndefinedTolerance,
|
|
669
|
+
testContext: mockTestContext
|
|
670
|
+
});
|
|
671
|
+
expect(utils.prepareComparisonFilePaths).toHaveBeenCalledTimes(1);
|
|
672
|
+
});
|
|
673
|
+
it('should store diffs when rawMisMatchPercentage exceeds saveAboveTolerance', async () => {
|
|
674
|
+
const optionsWithHighTolerance = {
|
|
675
|
+
...mockOptions,
|
|
676
|
+
compareOptions: {
|
|
677
|
+
...mockOptions.compareOptions,
|
|
678
|
+
wic: {
|
|
679
|
+
...mockOptions.compareOptions.wic,
|
|
680
|
+
saveAboveTolerance: 0.1
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
};
|
|
684
|
+
vi.mocked(compareImages.default).mockResolvedValue({
|
|
685
|
+
rawMisMatchPercentage: 0.5,
|
|
686
|
+
misMatchPercentage: 0.5,
|
|
687
|
+
getBuffer: vi.fn().mockResolvedValue(Buffer.from('diff-image-data')),
|
|
688
|
+
diffBounds: { left: 0, top: 0, right: 100, bottom: 200 },
|
|
689
|
+
analysisTime: 100,
|
|
690
|
+
diffPixels: []
|
|
691
|
+
});
|
|
692
|
+
vi.mocked(processDiffPixels.generateAndSaveDiff).mockResolvedValue({
|
|
693
|
+
diffBoundingBoxes: [],
|
|
694
|
+
storeDiffs: true
|
|
695
|
+
});
|
|
696
|
+
await executeImageCompare({
|
|
697
|
+
isViewPortScreenshot: true,
|
|
698
|
+
isNativeContext: false,
|
|
699
|
+
options: optionsWithHighTolerance,
|
|
700
|
+
testContext: mockTestContext
|
|
701
|
+
});
|
|
702
|
+
expect(processDiffPixels.generateAndSaveDiff).toHaveBeenCalledWith(expect.any(Object), expect.objectContaining({
|
|
703
|
+
saveAboveTolerance: 0.1
|
|
704
|
+
}), [], '/mock/diff/test.png', 0.5);
|
|
705
|
+
});
|
|
706
|
+
it('should store diffs when process.argv includes --store-diffs flag', async () => {
|
|
707
|
+
const originalArgv = process.argv;
|
|
708
|
+
process.argv = [...originalArgv, '--store-diffs'];
|
|
709
|
+
const optionsWithLowTolerance = {
|
|
710
|
+
...mockOptions,
|
|
711
|
+
compareOptions: {
|
|
712
|
+
...mockOptions.compareOptions,
|
|
713
|
+
wic: {
|
|
714
|
+
...mockOptions.compareOptions.wic,
|
|
715
|
+
saveAboveTolerance: 1.0
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
vi.mocked(compareImages.default).mockResolvedValue({
|
|
720
|
+
rawMisMatchPercentage: 0.5,
|
|
721
|
+
misMatchPercentage: 0.5,
|
|
722
|
+
getBuffer: vi.fn().mockResolvedValue(Buffer.from('diff-image-data')),
|
|
723
|
+
diffBounds: { left: 0, top: 0, right: 100, bottom: 200 },
|
|
724
|
+
analysisTime: 100,
|
|
725
|
+
diffPixels: []
|
|
726
|
+
});
|
|
727
|
+
vi.mocked(processDiffPixels.generateAndSaveDiff).mockResolvedValue({
|
|
728
|
+
diffBoundingBoxes: [],
|
|
729
|
+
storeDiffs: true
|
|
730
|
+
});
|
|
731
|
+
await executeImageCompare({
|
|
732
|
+
isViewPortScreenshot: true,
|
|
733
|
+
isNativeContext: false,
|
|
734
|
+
options: optionsWithLowTolerance,
|
|
735
|
+
testContext: mockTestContext
|
|
736
|
+
});
|
|
737
|
+
expect(processDiffPixels.generateAndSaveDiff).toHaveBeenCalledWith(expect.any(Object), expect.objectContaining({
|
|
738
|
+
saveAboveTolerance: 1.0
|
|
739
|
+
}), [], '/mock/diff/test.png', 0.5);
|
|
740
|
+
process.argv = originalArgv;
|
|
741
|
+
});
|
|
742
|
+
it('should not store diffs when rawMisMatchPercentage is below tolerance and no --store-diffs flag', async () => {
|
|
743
|
+
const optionsWithHighTolerance = {
|
|
744
|
+
...mockOptions,
|
|
745
|
+
compareOptions: {
|
|
746
|
+
...mockOptions.compareOptions,
|
|
747
|
+
wic: {
|
|
748
|
+
...mockOptions.compareOptions.wic,
|
|
749
|
+
saveAboveTolerance: 1.0
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
};
|
|
753
|
+
vi.mocked(compareImages.default).mockResolvedValue({
|
|
754
|
+
rawMisMatchPercentage: 0.5,
|
|
755
|
+
misMatchPercentage: 0.5,
|
|
756
|
+
getBuffer: vi.fn().mockResolvedValue(Buffer.from('diff-image-data')),
|
|
757
|
+
diffBounds: { left: 0, top: 0, right: 100, bottom: 200 },
|
|
758
|
+
analysisTime: 100,
|
|
759
|
+
diffPixels: []
|
|
760
|
+
});
|
|
761
|
+
await executeImageCompare({
|
|
762
|
+
isViewPortScreenshot: true,
|
|
763
|
+
isNativeContext: false,
|
|
764
|
+
options: optionsWithHighTolerance,
|
|
765
|
+
testContext: mockTestContext
|
|
766
|
+
});
|
|
767
|
+
expect(images.saveBase64Image).not.toHaveBeenCalled();
|
|
768
|
+
expect(log.warn).not.toHaveBeenCalled();
|
|
769
|
+
});
|
|
770
|
+
});
|