summaryrefslogtreecommitdiff
path: root/qa/qa/page/project/sub_menus/project.rb
blob: 6f1bc131f843fe19b35cdd00dcf6f9c9ef49355c (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
28
29
# frozen_string_literal: true

module QA
  module Page
    module Project
      module SubMenus
        module Project
          include Common

          def self.included(base)
            base.class_eval do
              view 'app/views/layouts/nav/sidebar/_project.html.haml' do
                element :project_link
              end
            end
          end

          def click_project
            retry_on_exception do
              within_sidebar do
                click_element(:project_link)
              end
            end
          end
        end
      end
    end
  end
end