summaryrefslogtreecommitdiff
path: root/qa/qa/page/component/breadcrumbs.rb
blob: 2576e376e4edf2c802ae65f450ee386809bddaf0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module QA
  module Page
    module Component
      module Breadcrumbs
        extend QA::Page::PageConcern

        def self.included(base)
          super

          base.view 'app/views/layouts/nav/_breadcrumbs.html.haml' do
            element :breadcrumb_links_content
          end
        end

        def has_breadcrumb?(text)
          has_element?(:breadcrumb_links_content, text: text)
        end
      end
    end
  end
end