Skip to content

Wait for page load before Percy snapshot#10078

Merged
rsimha merged 1 commit intoampproject:masterfrom
rsimha:2017-06-21-WaitForLoad
Jun 21, 2017
Merged

Wait for page load before Percy snapshot#10078
rsimha merged 1 commit intoampproject:masterfrom
rsimha:2017-06-21-WaitForLoad

Conversation

@rsimha
Copy link
Copy Markdown
Contributor

@rsimha rsimha commented Jun 21, 2017

Speculative fix that I believe should work as an implicit wait for the page to fully load.

Tested this by searching for .i-amphtml-layout, which is a CSS element that does exist on the page, and the call to has_no_css waited for a couple of seconds before returning false.

Fixes #10022

@rsimha rsimha requested a review from cramforce June 21, 2017 19:54
@rsimha rsimha self-assigned this Jun 21, 2017
Copy link
Copy Markdown
Member

@cramforce cramforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might not catch every last case, but it is quite elegant :)

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Jun 21, 2017

@cramforce, agreed that this may not catch every case. See my note above re: testing this with an element that does exist on the page, and seeing that has_no_css waited for a couple of seconds before returning false.

@rsimha rsimha merged commit c3edf47 into ampproject:master Jun 21, 2017
@rsimha rsimha deleted the 2017-06-21-WaitForLoad branch June 21, 2017 22:25
@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Jun 23, 2017

100+ green runs in a row. Consider this issue fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Percy test appears flaky with three dots on visual diff

3 participants