summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/settings/common.rb
blob: 1357bf031d54e3cb97fbfa136259a6b46eaddfb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
module QA
  module Page
    module Project
      module Settings
        module Common
          def expand(element_name)
            page.within('#content-body') do
              click_element(element_name)

              yield
            end
          end

          def expand_section(name)
            page.within('#content-body') do
              page.within('section', text: name) do
                click_button 'Expand'

                yield
              end
            end
          end
        end
      end
    end
  end
end