Skip to content

Commit 74c77b7

Browse files
committed
Add await_select2 for select tests
1 parent d77e25d commit 74c77b7

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

spec/system/adjustment_system_spec.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@
3939
before do
4040
visit subject
4141
click_on "New Adjustment"
42-
select storage_location.name, from: "From storage location"
42+
await_select2("#adjustment_line_items_attributes_0_item_id") do
43+
select storage_location.name, from: "From storage location"
44+
end
4345
fill_in "Comment", with: "something"
4446
select Item.last.name, from: "adjustment_line_items_attributes_0_item_id"
4547
end
@@ -67,7 +69,9 @@
6769
storage_location = create(:storage_location, :with_items, name: "PICK THIS ONE", item_quantity: 10, organization: organization)
6870
visit adjustments_path
6971
click_on "New Adjustment"
70-
select storage_location.name, from: "From storage location"
72+
await_select2("#adjustment_line_items_attributes_0_item_id") do
73+
select storage_location.name, from: "From storage location"
74+
end
7175
fill_in "Comment", with: "something"
7276
select Item.last.name, from: "adjustment_line_items_attributes_0_item_id"
7377
fill_in "adjustment_line_items_attributes_0_quantity", with: sub_quantity.to_s
@@ -84,7 +88,9 @@
8488
storage_location = create(:storage_location, :with_items, name: "PICK THIS ONE", item_quantity: 10, organization: organization)
8589
visit adjustments_path
8690
click_on "New Adjustment"
87-
select storage_location.name, from: "From storage location"
91+
await_select2("#adjustment_line_items_attributes_0_item_id") do
92+
select storage_location.name, from: "From storage location"
93+
end
8894
fill_in "Comment", with: "something"
8995
select Item.last.name, from: "adjustment_line_items_attributes_0_item_id"
9096
fill_in "adjustment_line_items_attributes_0_quantity", with: sub_quantity.to_s

0 commit comments

Comments
 (0)