summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-01-26 16:15:52 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-01-26 16:15:52 +0800
commit253c2a365fba7e3abbbb01e0d50565cafc696506 (patch)
treeee5d66deaa5ee3b47dd2354d8581ce104c9c2193
parentae7b176ae4fbbb4e433e0ca46a25c0251c6aaa7f (diff)
downloadgitlab-ce-253c2a365fba7e3abbbb01e0d50565cafc696506.tar.gz
Just don't expand if it's already expanded
-rw-r--r--qa/qa/page/project/settings/common.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/qa/qa/page/project/settings/common.rb b/qa/qa/page/project/settings/common.rb
index b61f64d446c..0a2a3488b9a 100644
--- a/qa/qa/page/project/settings/common.rb
+++ b/qa/qa/page/project/settings/common.rb
@@ -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