summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/project/settings/common.rb')
-rw-r--r--qa/qa/page/project/settings/common.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/qa/qa/page/project/settings/common.rb b/qa/qa/page/project/settings/common.rb
index 1357bf031d5..1d5c919ba4a 100644
--- a/qa/qa/page/project/settings/common.rb
+++ b/qa/qa/page/project/settings/common.rb
@@ -11,12 +11,15 @@ module QA
end
end
+ # Click the Expand button present in the specified section
+ #
+ # @param [String] name present in the container in the DOM
def expand_section(name)
page.within('#content-body') do
page.within('section', text: name) do
- click_button 'Expand'
+ click_button('Expand')
- yield
+ yield if block_given?
end
end
end