summaryrefslogtreecommitdiff
path: root/qa/qa/page/component/dropdown_filter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/component/dropdown_filter.rb')
-rw-r--r--qa/qa/page/component/dropdown_filter.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/qa/qa/page/component/dropdown_filter.rb b/qa/qa/page/component/dropdown_filter.rb
new file mode 100644
index 00000000000..e896c382779
--- /dev/null
+++ b/qa/qa/page/component/dropdown_filter.rb
@@ -0,0 +1,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