Commit 37c59e12 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Fix assertion on mermaid SVG attributes

Fixes a flaky spec by moving the assertions to the CSS selector so that
Capybara waits for the attributes to be set.
parent 08ca0a27
......@@ -118,10 +118,7 @@ describe 'Mermaid rendering', :js do
visit project_issue_path(project, issue)
svg = page.find('svg.mermaid')
expect(svg[:style]).to match(/max-width/)
expect(svg[:width].to_i).to eq(100)
expect(svg[:height].to_i).to eq(0)
expect(page).to have_css('svg.mermaid[style*="max-width"][width="100%"]')
end
it 'display button when diagram exceeds length', :js 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