Closed CaiqueCoelho closed 9 months ago
@CaiqueCoelho We have just released version 2.1.0, please upgrade your package and see if the error still persists.
Side note: I've noticed you have initialized our plugin twice, can you confirm if it's just a copy and paste problem?
Hi @kien-ht I recently updated the plugin and also read the previous issue. I followed the steps but still got an error. Configuration // cypress.config.js const { defineConfig } = require("cypress"); const getCompareSnapshotsPlugin = require('cypress-image-diff-js/plugin'); module.exports = defineConfig({ e2e: { video: false, setupNodeEvents(on, config) {
return getCompareSnapshotsPlugin(on, config);
},
}, }); // cypress-image-diff.config.cjs const config = { ROOT_DIR: 'cypress/Visua_Test', REPORT_DIR: 'cypress/Report/html-report', SCREENSHOTS_DIR: 'screenshots', FAILURE_THRESHOLD: 0.1, RETRY_OPTIONS: { log: true, limit: 2, // max number of iterations timeout: 30000, // time limit in ms delay: 300, // delay before next iteration, ms }, FAIL_ON_MISSING_BASELINE: true, COMPARISON_OPTIONS: { threshold: 0.2 }, JSON_REPORT: { FILENAME: 'cypress_visual_report', OVERWRITE: false, }, CYPRESS_SCREENSHOT_OPTIONS:{ capture: 'fullPage', disableTimersAndAnimations: true, } }; module.exports = config;
e2e.js const compareSnapshotCommand = require('cypress-image-diff-js/command'); compareSnapshotCommand(); import './commands'
package-lock
@camhost01, I've just created a working integration example here. Please take a look and see if you have any misconfig parts.
Hi @kien-ht I checked the Java configuration and they are the same. I notice that in your example, the cypress.config.js is the same compared with TypeScript. Is that correct? the issue that I facing is related in the const definition
Look what I have cypress-image-diff.config.cjs
cypress.config.js
e2e.js
dependencies
I think I do not need an extra configuration to run the plugin, right?
Yes correct. Configuration file is optional, used in case you want to change the default behaviour of this plugin.
May I suggest you two things:
Hi @kien-ht I checked the Java configuration and they are the same. I notice that in your example, the cypress.config.js is the same compared with TypeScript. Is that correct? the issue that I facing is related in the const definition
Look what I have cypress-image-diff.config.cjs
cypress.config.js
e2e.js
dependencies
I think I do not need an extra configuration to run the plugin, right?
I updated to V2.1.1 and did follow this step but still found error same as you I tried to clean node_modules many times but still found this error
Same error, using it in a NextJS Typescript project.
@Strezzo06
@dominikzogg, can you provide more details about your project setup please?
@camhost01, I've just created a working integration example here. Please take a look and see if you have any misconfig parts.
I am seeing the same issue as others within this thread.
I have downloaded the example project linked, and ran the following: npm install
and npm run test
. I am presented with the following error:
Edit: I see you have already started working on a fix while I was fumbling around with a comment — thanks for your swift response.
:tada: This issue has been resolved in version 2.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
🎉 This issue has been resolved in version 2.1.2 🎉
The release is available on:
Your semantic-release bot 📦🚀
Thank you for the excellent support. I was able to run through that point. However, I encountered another error. #198
Thank you so much @kien-ht @PippoRaimondiDIT now it works :D
I'm trying to run the plugin for the first time and I encounter the following problem, could you help me, please?
Error:
cypress.config.ts
System: Mac Os 14.1 (23B74)
Cypress: 13.6.0