Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-01-26 11:15:52 +0300
committerLin Jen-Shin <godfat@godfat.org>2018-01-26 11:15:52 +0300
commit253c2a365fba7e3abbbb01e0d50565cafc696506 (patch)
treeee5d66deaa5ee3b47dd2354d8581ce104c9c2193 /qa/qa/page/project/settings
parentae7b176ae4fbbb4e433e0ca46a25c0251c6aaa7f (diff)
Just don't expand if it's already expanded
Diffstat (limited to 'qa/qa/page/project/settings')
-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