Skip to content

Commit

Permalink
fix(rubyforgood#4248): remove wait_for_ajax helper, using wait sele…
Browse files Browse the repository at this point in the history
…ct option
  • Loading branch information
callmarx committed Apr 17, 2024
1 parent c83e91b commit 4fbd3b1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
9 changes: 0 additions & 9 deletions spec/support/wait_for_ajax.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/system/adjustment_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
end

it "allows you to choose items that do not yet exist" do
wait_for_ajax
expect(page).to have_select("adjustment_line_items_attributes_0_item_id", with_options: [item.name], wait: 10)
select Item.active.last.name, from: "adjustment_line_items_attributes_0_item_id"
fill_in "adjustment_line_items_attributes_0_quantity", with: add_quantity.to_s

Expand Down
2 changes: 1 addition & 1 deletion spec/system/distribution_system_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
visit @url_prefix + "/distributions/new"
select @partner.name, from: "Partner"
select @storage_location.name, from: "From storage location"
wait_for_ajax
expect(page).to have_select("distribution_line_items_attributes_0_item_id", with_options: [item.name], wait: 10)
select item.name, from: "distribution_line_items_attributes_0_item_id"
fill_in "distribution_line_items_attributes_0_quantity", with: 18

Expand Down

0 comments on commit 4fbd3b1

Please sign in to comment.