diff --git a/spec/system/admin/order_cycles/simple_spec.rb b/spec/system/admin/order_cycles/simple_spec.rb index 36bb02a9a9..d3dbb1b34e 100644 --- a/spec/system/admin/order_cycles/simple_spec.rb +++ b/spec/system/admin/order_cycles/simple_spec.rb @@ -271,9 +271,8 @@ RSpec.describe ' select 'Managed distributor fee', from: 'order_cycle_coordinator_fee_0_id' click_button 'Create' - - # Wait for API requests to finish: - sleep 2 + expect(page).to have_content 'Your order cycle has been created.' + click_button "Dismiss" expect(page).to have_select 'new_supplier_id', with_options: [ "Managed supplier", diff --git a/spec/system/admin/reports_spec.rb b/spec/system/admin/reports_spec.rb index 3cf45c5678..0600075ab7 100644 --- a/spec/system/admin/reports_spec.rb +++ b/spec/system/admin/reports_spec.rb @@ -142,12 +142,8 @@ RSpec.describe ' # Now the controller response will show the loading spinner again and # the fallback mechanism will render the report later. expect(page).to have_selector ".loading" - - # Wait for the fallback mechanism: - sleep 3 - - expect(page).not_to have_selector ".loading" expect(page).to have_content "First Name Last Name Billing Address Email" + expect(page).not_to have_selector ".loading" end end diff --git a/spec/system/consumer/shops_spec.rb b/spec/system/consumer/shops_spec.rb index 2fc8ddec4c..6cca0b7591 100644 --- a/spec/system/consumer/shops_spec.rb +++ b/spec/system/consumer/shops_spec.rb @@ -42,9 +42,8 @@ RSpec.describe 'Shops' do it "by URL" do pending("#9649") visit shops_path(anchor: "/?query=xyzzy") - sleep 1 - expect(page).not_to have_content distributor.name expect(page).to have_content "Sorry, no results found for xyzzy. Try another search?" + expect(page).not_to have_content distributor.name end it "by typing in the search field" do