Commit 742d3d85 authored by Stan Hu's avatar Stan Hu

Fix flaky test in dashboard/snippets_spec.rb

Similar to https://gitlab.com/gitlab-org/gitlab/-/issues/206937, this
test was flaky due to the image lazy loader. The test is asserting on
the image src, but it fails when the src value is still the lazy
loader's placeholder image.

Closes https://gitlab.com/gitlab-org/gitlab/-/issues/216541
parent 7096acb4
......@@ -35,7 +35,7 @@ describe 'Dashboard snippets' do
element = page.find('.row.empty-state')
expect(element).to have_content("Code snippets")
expect(element.find('.svg-content img')['src']).to have_content('illustrations/snippets_empty')
expect(element.find('.svg-content img.js-lazy-loaded')['src']).to have_content('illustrations/snippets_empty')
end
it 'shows new snippet button in main content area' do
......
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