Skip to content

Commit 3689e4b

Browse files
authored
Merge pull request #5394 from jonny5/jk-flaky-date-tests
Flaky date range specs
2 parents d489bdd + 2048910 commit 3689e4b

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

spec/support/date_range_picker_shared_example.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def date_range_picker_select_range(range_name)
141141

142142
valid_date_range = "#{Time.zone.local(2019, 7, 22).to_fs(:date_picker)} - #{Time.zone.local(2019, 7, 28).to_fs(:date_picker)}"
143143
fill_in "filters_date_range", with: valid_date_range
144-
find(:id, 'filters_date_range').native.send_keys(:enter)
144+
click_button "Filter"
145145
expect(page).to have_css("table tbody tr", count: 1)
146146
end
147147
end

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

spec/system/item_system_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,3 @@
205205
end
206206
end
207207
end
208-

0 commit comments

Comments
 (0)