Created
April 23, 2021 14:59
-
-
Save wilcoschoneveld/49b23b7825997fa1b41c668be77eb6a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/cypress-image-snapshot/plugin.js b/node_modules/cypress-image-snapshot/plugin.js | |
index 106d726..4ca37b5 100644 | |
--- a/node_modules/cypress-image-snapshot/plugin.js | |
+++ b/node_modules/cypress-image-snapshot/plugin.js | |
@@ -96,7 +96,9 @@ function matchImageSnapshotPlugin({ path: screenshotPath }) { | |
// remove the cypress v5+ native retries suffix from the file name | |
const snapshotIdentifier = name.replace(/ \(attempt [0-9]+\)/, ''); | |
- const relativePath = _path2.default.relative(screenshotsFolder, screenshotDir); | |
+ // always write snapshot images to root snapshots directory | |
+ // this is a workaround for https://github.com/jaredpalmer/cypress-image-snapshot/issues/61 | |
+ const relativePath = ""; | |
const snapshotsDir = customSnapshotsDir ? _path2.default.join(process.cwd(), customSnapshotsDir, relativePath) : _path2.default.join(screenshotsFolder, '..', 'snapshots', relativePath); | |
const snapshotKebabPath = _path2.default.join(snapshotsDir, `${snapshotIdentifier}${kebabSnap}`); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment