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.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/qa/qa/page/component/select2.rb b/qa/qa/page/component/select2.rb
index d05c44d22b2..8fe6a4a75b3 100644
--- a/qa/qa/page/component/select2.rb
+++ b/qa/qa/page/component/select2.rb
@@ -20,12 +20,20 @@ module QA
def search_and_select(item_text)
find('.select2-input').set(item_text)
+
+ wait_for_search_to_complete
+
select_item(item_text)
end
def expand_select_list
find('span.select2-arrow').click
end
+
+ def wait_for_search_to_complete
+ has_css?('.select2-active')
+ has_no_css?('.select2-active', wait: 30)
+ end
end
end
end