From e0b78d03edc809d159aa58a82dc40a2594276616 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Wed, 30 Oct 2024 11:33:24 +0100 Subject: [PATCH] Test: Give "Receive" button more time to render This is a flaky test, so give Capybara it bit more time to find the button. --- backend/spec/features/admin/orders/customer_returns_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/spec/features/admin/orders/customer_returns_spec.rb b/backend/spec/features/admin/orders/customer_returns_spec.rb index 927fbdcdc91..a3d8d98a3b5 100644 --- a/backend/spec/features/admin/orders/customer_returns_spec.rb +++ b/backend/spec/features/admin/orders/customer_returns_spec.rb @@ -50,7 +50,7 @@ def expect_order_state_label_to_eq(text) within('[data-hook="rejected_return_items"] tbody tr:nth-child(1)') do click_button('Receive') - expect(page).to have_button("Receive", disabled: true) + expect(page).to have_button("Receive", disabled: true, wait: 5) end end