cypress-match-screenshot
Advanced tools
Comparing version 0.0.3-rc.1 to 0.0.3-rc.2
{ | ||
"name": "cypress-match-screenshot", | ||
"version": "0.0.3-rc.1", | ||
"version": "0.0.3-rc.2", | ||
"description": "Utility to take screenshots during a cypress test and match them against previous runs", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -1,2 +0,2 @@ | ||
const CYPRESS_SCREENSHOT_FOLDER = 'cypress/screenshots' | ||
const CYPRESS_SCREENSHOT_FOLDER = 'cypress/screenshots'; | ||
@@ -71,7 +71,11 @@ /** | ||
// in it or not | ||
cy.exec(`touch "${CYPRESS_SCREENSHOT_FOLDER}/${fileName}.png"`, { log: false }); | ||
cy.exec(`touch "${CYPRESS_SCREENSHOT_FOLDER}/${fileName}.png"`, { | ||
log: false | ||
}); | ||
takeScreenshot(`new/${fileName}`); | ||
cy | ||
.readFile(`${CYPRESS_SCREENSHOT_FOLDER}/${fileName}.png`, 'utf-8', { log: false }) | ||
.readFile(`${CYPRESS_SCREENSHOT_FOLDER}/${fileName}.png`, 'utf-8', { | ||
log: false | ||
}) | ||
.then((value) => { | ||
@@ -117,4 +121,4 @@ if (value) { | ||
module.exports { | ||
module.exports = { | ||
register | ||
} | ||
}; |
39808
151