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
https://github.com/GoogleChromeLabs/puppeteer-examples/blob/master/lazyimages_without_scroll_events.js#L110
i have doubts
screenshotPageWithoutScroll:DEFAULT_VIEWPORTwhich is may be vary for each page, with long content page, some part of the page will not exists on the viewport, this causingIntersectionObservernot triggered, and make the test FAILEDprocessScroll();, so given correct VIEWPORT the images will be shown even its not usingIntersectionObserver. And causing test toPASSEDAny idea to make the improve accuracy