shiny.gosling icon indicating copy to clipboard operation
shiny.gosling copied to clipboard

Remove explicit `wait` statements in Cypress's e2e tests

Open federiva opened this issue 11 months ago • 0 comments

Context: Snapshot tests using screenshots in e2e tests

Issue: SVG elements are drawn after its parent element exists in the DOM, this causes that when we are running for example

cy.get(".some-class")
  .should("have-something")
  .etc...

The browser is finding this element in the DOM and taking the screenshot. This is causing that the screenshot is empty and therefore saving a screenshot in which no element was yet drawn making the snapshot test useless.

Proposed solution Look for events being fired after drawing the SVG. It is possible that goslingjs is not firing any event. In that case we should try to find a way to create our own events if possible.

federiva avatar Aug 01 '23 16:08 federiva