Commit f5efeeb8 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Try to restore page's state

parent 73e3215b
......@@ -12,18 +12,13 @@ module QA
end
def expand_section(name)
within_section(name) do
# Don't expand if it's already expanded
click_button 'Expand' unless first('button', text: 'Collapse')
yield
end
end
def within_section(name)
page.within('#content-body') do
page.within('section', text: name) do
yield
click_button 'Expand'
yield.tap do
click_button 'Collapse' if first('button', text: 'Collapse')
end
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