summaryrefslogtreecommitdiff
path: root/qa/qa/page/group/sub_menus/common.rb
blob: 2f8a3fdeb4e737d3685ad38252076279df69d6dd (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
30
# frozen_string_literal: true

module QA
  module Page
    module Group
      module SubMenus
        module Common
          extend QA::Page::PageConcern
          include QA::Page::SubMenus::Common

          def self.included(base)
            super

            base.class_eval do
              view 'app/views/shared/nav/_sidebar.html.haml' do
                element :group_sidebar, 'qa_selector: sidebar_qa_selector(sidebar.container)' # rubocop:disable QA/ElementWithPattern
              end
            end
          end

          private

          def sidebar_element
            :group_sidebar
          end
        end
      end
    end
  end
end