comparadise-utils 0.0.13 → 0.0.15
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/dist/match-screenshot.js +4 -4
- package/dist/screenshots.js +1 -1
- package/package.json +1 -1
package/dist/match-screenshot.js
CHANGED
|
@@ -43,7 +43,7 @@ function verifyImages() {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
function matchScreenshot(subject, args) {
|
|
46
|
-
const { rawName, options = {} } = args
|
|
46
|
+
const { rawName, options = {} } = args || {};
|
|
47
47
|
// Set up screen
|
|
48
48
|
forceFont();
|
|
49
49
|
// Making sure each image is visible before taking screenshots
|
|
@@ -55,9 +55,9 @@ function matchScreenshot(subject, args) {
|
|
|
55
55
|
// For easy slicing of path ignoring the root screenshot folder
|
|
56
56
|
target.screenshot(`${PREFIX_DIFFERENTIATOR}${screenshotsFolder}/${type}`, options);
|
|
57
57
|
if (!hasBase) {
|
|
58
|
-
cy.task('createNewScreenshot', screenshotsFolder).then(() => {
|
|
59
|
-
|
|
60
|
-
});
|
|
58
|
+
// cy.task('createNewScreenshot', screenshotsFolder).then(() => {
|
|
59
|
+
cy.task('log', `✅ A new base image was created for ${name}. Create this as a new base image via Comparadise!`);
|
|
60
|
+
// });
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
63
|
cy.task('compareScreenshots', screenshotsFolder).then(diffPixels => {
|
package/dist/screenshots.js
CHANGED
|
@@ -87,7 +87,7 @@ exports.compareScreenshots = compareScreenshots;
|
|
|
87
87
|
*/
|
|
88
88
|
function onAfterScreenshot(details) {
|
|
89
89
|
console.log('🧸 Screenshot was saved to:', details.path);
|
|
90
|
-
if (!details.path.match('
|
|
90
|
+
if (!details.path.match('cypress')) {
|
|
91
91
|
return Promise.resolve({});
|
|
92
92
|
}
|
|
93
93
|
const getNewPath = (path) => {
|
package/package.json
CHANGED