Giter Club home page Giter Club logo

Comments (12)

CaiqueCoelho avatar CaiqueCoelho commented on July 19, 2024 2

Thank you so much @kien-ht @PippoRaimondiDIT now it works :D

from cypress-image-diff.

camhost01 avatar camhost01 commented on July 19, 2024 1

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

image

Look what I have
cypress-image-diff.config.cjs
image

cypress.config.js
image

e2e.js
image

dependencies
image

I think I do not need an extra configuration to run the plugin, right?

from cypress-image-diff.

PippoRaimondiDIT avatar PippoRaimondiDIT commented on July 19, 2024 1

🎉 This issue has been resolved in version 2.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

from cypress-image-diff.

kien-ht avatar kien-ht commented on July 19, 2024

@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?

from cypress-image-diff.

camhost01 avatar camhost01 commented on July 19, 2024

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
image

image image

from cypress-image-diff.

kien-ht avatar kien-ht commented on July 19, 2024

@camhost01, I've just created a working integration example here. Please take a look and see if you have any misconfig parts.

from cypress-image-diff.

kien-ht avatar kien-ht commented on July 19, 2024

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:

  1. Clean cache the node_modules and reinstall again.
  2. Pull the actual code of the example I provided above, and run it locally to see if you see any problems. I believe I wrote a README.md in the respective example folder, in case you struggle to make it run.

from cypress-image-diff.

Strezzo06 avatar Strezzo06 commented on July 19, 2024

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

image Look what I have cypress-image-diff.config.cjs image

cypress.config.js image

e2e.js image

dependencies image

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
Screen Shot 2023-12-18 at 2 35 35 PM

from cypress-image-diff.

dominikzogg avatar dominikzogg commented on July 19, 2024

Same error, using it in a NextJS Typescript project.

from cypress-image-diff.

kien-ht avatar kien-ht commented on July 19, 2024

@Strezzo06

  1. Can you try to run the example locally, see if there's any problems?
  2. I'm assuming that your project type is CommonJs. Can you confirm that?

@dominikzogg, can you provide more details about your project setup please?

from cypress-image-diff.

Edwardmunn avatar Edwardmunn commented on July 19, 2024

@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:

Screenshot 2023-12-18 at 11 28 36

Edit: I see you have already started working on a fix while I was fumbling around with a comment — thanks for your swift response.

from cypress-image-diff.

Strezzo06 avatar Strezzo06 commented on July 19, 2024

🎉 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

from cypress-image-diff.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.