comparadise-utils 0.0.2 → 0.0.4

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.
@@ -37,12 +37,12 @@ function matchScreenshot(subject, args) {
37
37
  const testPath = Cypress.spec.relative;
38
38
  const lastSlashIndex = testPath.lastIndexOf('/');
39
39
  const testPathWithoutFileName = testPath.substring(0, lastSlashIndex);
40
- const screenshotPath = `${testPathWithoutFileName}/${rawName}`;
40
+ const screenshotPath = `${screenshotsFolder}/${testPathWithoutFileName}/${rawName}`;
41
41
  cy.task('baseExists', screenshotPath).then(hasBase => {
42
42
  if (typeof hasBase !== 'boolean')
43
43
  throw new Error('Result of baseExists task was not a boolean.');
44
44
  const target = subject ? cy.wrap(subject) : cy;
45
- target.screenshot(`${screenshotPath}/new`, { ...options, overwrite: true });
45
+ target.screenshot(`${testPathWithoutFileName}/${rawName}/new`, { ...options, overwrite: true });
46
46
  if (!hasBase) {
47
47
  cy.task('log', `❌ A new base image was created at ${screenshotPath}. Add this as a new base image via Comparadise!`);
48
48
  return;
package/package.json CHANGED
@@ -29,5 +29,5 @@
29
29
  "build": "tsc",
30
30
  "postbuild": "echo \"require('./dist/match-screenshot');\" > commands.js"
31
31
  },
32
- "version": "0.0.2"
32
+ "version": "0.0.4"
33
33
  }