Newer
Older
dmpopidor / spec / support / helpers / combobox_helper.rb
@Bodacious Bodacious on 3 Sep 2018 262 bytes Fix broken test in org swaps
module ComboboxHelper

  def choose_suggestion(suggestion_text)
    matching_element = all(:css, '.js-suggestion').detect do |element|
      element.text == suggestion_text
    end
    matching_element.click
    # Wait for the JS to run
    sleep(0.2)
  end

end