Commit 22883358 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix flaky spec due to image lazy-loading

parent 2fd254c6
...@@ -34,7 +34,7 @@ describe 'User edits snippet', :js do ...@@ -34,7 +34,7 @@ describe 'User edits snippet', :js do
click_button('Save changes') click_button('Save changes')
wait_for_requests wait_for_requests
link = find('a.no-attachment-icon img[alt="banana_sample"]')['src'] link = find('a.no-attachment-icon img:not(.lazy)[alt="banana_sample"]')['src']
expect(link).to match(%r{/uploads/-/system/personal_snippet/#{snippet.id}/\h{32}/banana_sample\.gif\z}) expect(link).to match(%r{/uploads/-/system/personal_snippet/#{snippet.id}/\h{32}/banana_sample\.gif\z})
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment