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.
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
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
goslingjsis not firing any event. In that case we should try to find a way to create our own events if possible.