Skip to content
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

Lazy load example accuracy #31

Open
pentatonicfunk opened this issue Aug 8, 2019 · 0 comments
Open

Lazy load example accuracy #31

pentatonicfunk opened this issue Aug 8, 2019 · 0 comments

Comments

@pentatonicfunk
Copy link

https://github.com/GoogleChromeLabs/puppeteer-examples/blob/master/lazyimages_without_scroll_events.js#L110

i have doubts screenshotPageWithoutScroll :

  • it is using DEFAULT_VIEWPORT which is may be vary for each page, with long content page, some part of the page will not exists on the viewport, this causing IntersectionObserver not triggered, and make the test FAILED
  • For example in https://css-tricks.com/examples/LazyLoading/ . this sample calling processScroll();, so given correct VIEWPORT the images will be shown even its not using IntersectionObserver. And causing test to PASSED
  • For this own sample https://rawgit.com/GoogleChromeLabs/puppeteer-examples/master/html/lazyload.html : this html is have height about 2000, so the page does not even need scrolling, if you set the height on script to 1000 it will show test FAILED

Any idea to make the improve accuracy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant