Replace tomselect_search_and_select by tomselect_select

In these scenarios, searching for the option is not actually required,
we can directly click on the needed option. It prevent issue with
the dropdown option staying open and breaking specs.
This commit is contained in:
Gaetan Craig-Riou
2024-01-24 14:53:44 +11:00
parent 98545741e6
commit 67dc79b074
3 changed files with 4 additions and 4 deletions

View File

@@ -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"

View File

@@ -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

View File

@@ -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