projectblacklight / spotlight

Spotlight enables librarians, curators, and others who are responsible for digital collections to create attractive, feature-rich websites that highlight these collections.
Other
160 stars 64 forks source link

Wait for data to load in flappy test #3040

Closed taylor-steve closed 3 months ago

taylor-steve commented 3 months ago

Playing around with solutions for #3039.

Trying to see if we can get Capybara to wait for the thumbnail.

Definitely seems to be load dependent. The tests get less flaky locally the further I get into Friday afternoon...

corylown commented 3 months ago

FWIW these checks helped the tests pass for me locally. I had to add checks in a couple other places to get all the specs in that file to pass.

corylown commented 3 months ago

Here's a draft PR with a similar set of changes that got the tests passing for me locally: https://github.com/projectblacklight/spotlight/pull/3041

taylor-steve commented 3 months ago

@corylown I added the additional changes from your PR plus one in uploaded_items_block_spec.rb that was sometimes an issue. Things seem to be passing reliably for me on CI and local.