summaryrefslogtreecommitdiff
path: root/qa/qa/page/layout/flash.rb
blob: 6bd3d6ab76b29cf68aefc4f30e149c1f8d6b6ac8 (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
# frozen_string_literal: true

module QA
  module Page
    module Layout
      module Flash
        extend QA::Page::PageConcern

        def self.included(base)
          super

          base.view 'app/views/layouts/_flash.html.haml' do
            element :flash_container
          end
        end

        def has_notice?(message)
          within_element(:flash_container) do
            has_text?(message)
          end
        end
      end
    end
  end
end