mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Updates tom_select_helper.rb with the recent changes from master
This commit is contained in:
committed by
David Cook
parent
0fa272a125
commit
0a4c2a1903
@@ -15,8 +15,8 @@ module TomSelectHelper
|
||||
def tomselect_search_and_select(value, options)
|
||||
tomselect_wrapper = page.find("[name='#{options[:from]}']").sibling(".ts-wrapper")
|
||||
tomselect_wrapper.find(".ts-control").click
|
||||
tomselect_wrapper.find(:css, '.ts-dropdown input.dropdown-input').set(value)
|
||||
tomselect_wrapper.find(".ts-control").click
|
||||
# Use send_keys as setting the value directly doesn't trigger the search
|
||||
tomselect_wrapper.find(:css, '.ts-dropdown input.dropdown-input').send_keys(value)
|
||||
tomselect_wrapper.find(:css, '.ts-dropdown .ts-dropdown-content .option', text: value).click
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user