-
Notifications
You must be signed in to change notification settings - Fork 41
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
percy doesn't wait until canvas is rendered #266
Comments
Hey @tillias, thanks for the issue! This is expected -- Percy doesn't do anything to wait, that would be between you and your test runner (once Depending on how your app is built, you could probably replace the timeout with a selector that signals the canvas element has rendered (like if a class or attribute has been added to the DOM). |
@Robdel12 many thanks for clarification. I have made some research today and it seems canvas has no additional events, it is just rendered and that was it. If some external library uses canvas to draw something, then callback is needed when draw is finished. I will ask developers of library I'm using for some event and will have to stick to timeout I guess. Here is example when canvas is rendered, but library hasn't finished drawing yet: https://percy.io/bb9225f6/microservice-catalog/builds/7651518 -> on the second 'release-path' snapshot there should be two canvas elements available, but in reality only first has time to draw its content
Here is how it looks like if I add timeout between cy.get()s
|
Hello folks,
Many thanks for a nice product. I have a canvas where some graph should be rendered. Unfortunately without explicit wait I have nothing captured in my screenshot: https://percy.io/bb9225f6/microservice-catalog/builds/7643835
After adding explicit timeout content is rendered in canvas https://percy.io/bb9225f6/microservice-catalog/builds/7643924:
Is it possible somehow to get rid of this nasty wait?
Many thanks in advance
The text was updated successfully, but these errors were encountered: