Merge pull request #13618 from deivid-rodriguez/remove-unnecessary-sleeps

Remove unnecessary explicit sleeps
This commit is contained in:
David Cook
2025-10-20 16:06:44 +11:00
committed by GitHub
3 changed files with 4 additions and 10 deletions

View File

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

View File

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

View File

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