openverse-frontend icon indicating copy to clipboard operation
openverse-frontend copied to clipboard

Make Playwright scroll wait times more reliable

Open obulat opened this issue 3 years ago • 0 comments

Problem

Playwright utilities being added in #1530 at the time of opening of this issue have arbitrary sleep durations to make sure that the images are loaded when the page get scrolled. We need to make them less flaky.

Description

@sarayourfriend's comment has the code suggestion to implement an approach that waits for visibility/load state before continuing. I did not add the code in #1530 because it's not possible to test how well it works without the actual tests to run it. And adding more tests would bloat that PR. Once we have the sample Playwright tests that use scrolling to load all of the page images (such as #1542), we should add the code suggestions to make scroll waits more reliable.

Implementation

  • [ ] 🙋 I would be interested in implementing this feature.

obulat avatar Jun 23 '22 07:06 obulat