summaryrefslogtreecommitdiff
path: root/qa/qa/page/component/dropdown_filter.rb
blob: e896c3827793d9d8f7e8c91e0d8a8a99feafdcb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# frozen_string_literal: true

module QA
  module Page
    module Component
      module DropdownFilter
        def filter_and_select(item)
          wait(reload: false) do
            page.has_css?('.dropdown-input-field')
          end

          find('.dropdown-input-field').set(item)
          click_link item
        end
      end
    end
  end
end