question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cypress eventRegistration test fails (canvas width)

See original GitHub issue

Where to find the issue

Cypress test suite eventRegistration.js.

Describe the issue

The Cypress test eventRegistration.js fails with the error:

expected <canvas#eventqrcode.d-none.eventqr-preview> to have attribute width with the value '827', but the value was '1654'

A related issue https://github.com/corona-warn-app/cwa-website/issues/2139 was already reported and resolved.

Steps to reproduce

npm run test:open

In Cypress console select and run:

eventRegistration.js

Suggested change

The Cypress test eventRegistration.js should be reviewed and updated to work with the current Event Registration form.

It looks like the changes from PR #2105 “Reintroducing multiQR functionality” broke the Cypress test.

Consider also making sure that the test covers the single and the multi QR code tabs of the Event Registration form.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
MikeMcC399commented, Jan 7, 2022

PR #2277 resolved this issue.

1reaction
MikeMcC399commented, Jan 3, 2022

@brifemu Thank you very much for picking this up! I wish you and @dsarkar a good start in the New Year!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Image diffing a Canvas using Cypress to detect visual ...
Configuring Cypress; Writing Cypress tests; Generating base snapshots; Building, serving and image diffing in CI; Analysing artifacts. Installing dependencies.
Read more >
Test loading of image in Cypress - Stack Overflow
To check if an image has finished loading, the simplest way is to check the image's naturalWidth or naturalHeight property.
Read more >
cy.click() failed because element is effective width and height ...
I'm encountering some flaky tests due to an element not being considered visible by Cypress, I don't understand what makes an element ...
Read more >
Visual Testing - Cypress Documentation
Your visual styles may also rely on more than CSS, perhaps you want to ensure an SVG or image has rendered correctly or...
Read more >
Canvas Visual Testing with Retries - Gleb Bahmutov
The test calls the first function that performs the Cypress commands. This function downloads the canvas PNG and calls the cy.task('compare') .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found