mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-04 07:09:14 +00:00
Merge pull request #11759 from openfoodfoundation/dependabot/npm_and_yarn/tom-select-2.3.1
chore(deps): bump tom-select from 2.2.3 to 2.3.1
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
"stimulus": "^3.2.2",
|
||||
"stimulus-flatpickr": "^1.4.0",
|
||||
"stimulus_reflex": "3.5.0-rc3",
|
||||
"tom-select": "^2.2.3",
|
||||
"tom-select": "^2.3.1",
|
||||
"trix": "^2.0.8",
|
||||
"webpack": "~4"
|
||||
},
|
||||
|
||||
@@ -100,8 +100,15 @@ module WebHelper
|
||||
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)
|
||||
# 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
|
||||
|
||||
def tomselect_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 .ts-dropdown-content .option', text: value).click
|
||||
end
|
||||
|
||||
|
||||
@@ -1074,19 +1074,18 @@ describe '
|
||||
end
|
||||
|
||||
describe "searching customers" do
|
||||
def serching_for_customers
|
||||
def searching_for_customers
|
||||
# opens the customer dropdown
|
||||
find(".items-placeholder").click
|
||||
|
||||
# sets the query name
|
||||
find(".dropdown-input").set("John")
|
||||
find(".dropdown-input").send_keys("John")
|
||||
within(".customer-details") do
|
||||
expect(page).to have_content("John Doe")
|
||||
expect(page).to have_content(customer.email.to_s)
|
||||
end
|
||||
|
||||
# sets the query email
|
||||
find(".dropdown-input").set("maura@smith.biz")
|
||||
find(".dropdown-input").send_keys("maura@smith.biz")
|
||||
within(".customer-details") do
|
||||
expect(page).to have_content("John Doe")
|
||||
expect(page).to have_content(customer.email.to_s)
|
||||
@@ -1103,7 +1102,7 @@ describe '
|
||||
end
|
||||
|
||||
it "finds a customer by name" do
|
||||
serching_for_customers
|
||||
searching_for_customers
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1117,7 +1116,7 @@ describe '
|
||||
end
|
||||
|
||||
it "finds a customer by name" do
|
||||
serching_for_customers
|
||||
searching_for_customers
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -934,8 +934,8 @@ describe '
|
||||
fill_in "Order number", with: "R123456"
|
||||
tomselect_multiselect order_cycle.name, from: 'q[order_cycle_id_in][]'
|
||||
tomselect_multiselect distributor.name, from: 'q[distributor_id_in][]'
|
||||
tomselect_search_and_select shipping_method.name, from: 'shipping_method_id'
|
||||
tomselect_search_and_select "complete", from: 'q[state_eq]'
|
||||
tomselect_select shipping_method.name, from: 'shipping_method_id'
|
||||
tomselect_select "complete", from: 'q[state_eq]'
|
||||
fill_in "Email", with: user.email
|
||||
fill_in "First name begins with", with: "J"
|
||||
fill_in "Last name begins with", with: "D"
|
||||
|
||||
@@ -233,7 +233,7 @@ describe 'Subscriptions' do
|
||||
before do
|
||||
visit admin_subscriptions_path
|
||||
page.find("#new-subscription").click
|
||||
tomselect_search_and_select shop.name, from: "subscription[shop_id]"
|
||||
tomselect_select shop.name, from: "subscription[shop_id]"
|
||||
click_button "Continue"
|
||||
end
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ describe 'Subscriptions' do
|
||||
before do
|
||||
visit admin_subscriptions_path
|
||||
page.find("#new-subscription").click
|
||||
tomselect_search_and_select shop.name, from: "subscription[shop_id]"
|
||||
tomselect_select shop.name, from: "subscription[shop_id]"
|
||||
click_button "Continue"
|
||||
end
|
||||
|
||||
|
||||
@@ -8768,10 +8768,10 @@ toidentifier@1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35"
|
||||
integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==
|
||||
|
||||
tom-select@^2.2.3:
|
||||
version "2.2.3"
|
||||
resolved "https://registry.yarnpkg.com/tom-select/-/tom-select-2.2.3.tgz#858acca2dcec1dbe1a94a3f4c944384e166a4f40"
|
||||
integrity sha512-VMhRdFlugLGdnNZsP5r8sHKtyvWekIbtr53uoKONMzM+JSBWgy5pV9F+iZ2LTEbzIQI0efIwZ7I6h+wzZoM/zQ==
|
||||
tom-select@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/tom-select/-/tom-select-2.3.1.tgz#df338d9082874cd0bceb3bee87ed0184447c47f1"
|
||||
integrity sha512-QS4vnOcB6StNGqX4sGboGXL2fkhBF2gIBB+8Hwv30FZXYPn0CyYO8kkdATRvwfCTThxiR4WcXwKJZ3cOmtI9eg==
|
||||
dependencies:
|
||||
"@orchidjs/sifter" "^1.0.3"
|
||||
"@orchidjs/unicode-variants" "^1.0.4"
|
||||
|
||||
Reference in New Issue
Block a user