Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce cypress-image-diff for visual testing #517

Merged
merged 18 commits into from
Feb 18, 2025

Conversation

dariober
Copy link
Contributor

No description provided.

Copy link
Contributor

@shashankbrgowda shashankbrgowda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Create new annotation is working as expected after SO changes. I tried to run the new cypress tests in my local but its failing for me (may be I'm doing something wrong)

Cypress test Error: Image difference greater than threshold: 0

@dariober
Copy link
Contributor Author

@shashankbrgowda Thanks!

Cypress test Error: Image difference greater than threshold: 0

It maybe because of this:

// NB: The size of the image differs between headless and interactive execution of cypress.
// In headless mode (including github workflow) use this:
cy.get('canvas[data-testid="overlayCanvas"]').compareSnapshot('gene-model')
// For local testing use this (comment out when pushing to github):
// cy.get('canvas[data-testid="overlayCanvas"]').compareSnapshot('gene-model-local')

Unless you have already done so, could you try to comment out line 26 and enable line 29? (It's unfortunate one has to do this, I hope to find a better solution)

If it fails you can have look at the content of packages/jbrowse-plugin-apollo/cypress/cypress-image-diff-screenshots to get an idea of where the difference is.

@garrettjstevens garrettjstevens merged commit e1fea5a into main Feb 18, 2025
7 checks passed
@garrettjstevens garrettjstevens deleted the cypress-image-diff branch February 18, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants