summaryrefslogtreecommitdiff
path: root/qa/qa/page/layout/banner.rb
blob: 2223f2adec8d93aa91da45629c1749de12412c4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module QA
  module Page
    module Layout
      class Banner < Page::Base
        view 'app/views/layouts/header/_read_only_banner.html.haml' do
          element :flash_notice, ".flash-notice" # rubocop:disable QA/ElementWithPattern
        end

        def has_notice?(message)
          page.within('.flash-notice') do
            !!find('span', text: message)
          end
        end
      end
    end
  end
end