summaryrefslogtreecommitdiff
path: root/qa/qa/page/component/select2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/page/component/select2.rb')
-rw-r--r--qa/qa/page/component/select2.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/qa/qa/page/component/select2.rb b/qa/qa/page/component/select2.rb
index 30829eb0221..6d07d5a10e6 100644
--- a/qa/qa/page/component/select2.rb
+++ b/qa/qa/page/component/select2.rb
@@ -3,7 +3,12 @@ module QA
module Component
module Select2
def select_item(item_text)
- find('ul.select2-result-sub > li', text: item_text).click
+ find('.select2-result-label', text: item_text).click
+ end
+
+ def search_and_select(item_text)
+ find('.select2-input').set(item_text)
+ select_item(item_text)
end
end
end