mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-09-26 16:05:03 -04:00
* Stop avatars shifting the page during feature specs spec/features/places/searching_a_place_spec.rb intermittently failed on "goes to members' index page": the click on "View all members >>" landed on nothing and the browser stayed put. Member avatars come from gravatar.com over the network and were rendered with img-fluid and no dimensions, so they reserved no space until they arrived. The link sits directly under that grid. Capybara found the link, an avatar landed, the link moved, and the click missed. rails_helper meant to prevent this, but its guard tested for Poltergeist's url_blacklist. Poltergeist is long gone and Selenium's browser has no such method, so the condition was always false and the block never ran. - Give the two avatar image tags explicit width and height, so the box is reserved before the image loads. This fixes real layout shift for members too, not only the specs. - Replace the dead guard with config.x.blank_avatars, which browser specs set, making avatar_uri return a blank inline GIF. Helper specs still assert the real Gravatar URLs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * Fix avatar URI logic to prevent layout shift in all environments --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>