Cypress · Senior · Question 66 of 76
When is testing a canvas-based UI in Cypress practical?
- 1Through app state, test hooks or visual comparisons
- 2Never; canvas apps can't be tested
- 3Through
cy.geton the shapes drawn on the canvas
Show the answer
Correct answer: Through app state, test hooks or visual comparisons
Explanation
Canvas content isn't in the DOM. Expose state for assertions or use screenshot diffs for visual checks.