Commit 253c2a36 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Just don't expand if it's already expanded

parent ae7b176a
......@@ -14,11 +14,9 @@ module QA
def expand_section(name)
page.within('#content-body') do
page.within('section', text: name) do
click_button 'Expand'
click_button 'Expand' unless first('button', text: 'Collapse')
yield.tap do
click_button 'Collapse' if first('button', text: 'Collapse')
end
yield
end
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