From 512394862b6ebfa0a3d7ca2cfbc8cb8b8822b992 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 19 Jul 2022 14:53:04 +1000 Subject: [PATCH] Wait for input field before filling it The spec was failing from time to time. I hope that this will fix it. ``` Failures: 1) As an administrator I want to create/update complex order cycles with a specific time creating an order cycle with full interface Failure/Error: fill_in 'order_cycle_outgoing_exchange_0_pickup_time', with: 'pickup time' Capybara::ElementNotFound: Unable to find field "order_cycle_outgoing_exchange_0_pickup_time" that is not disabled # ./spec/system/admin/order_cycles/complex_creating_specific_time_spec.rb:138:in `add_distributor_with_fees' # ./spec/system/admin/order_cycles/complex_creating_specific_time_spec.rb:66:in `block (2 levels) in
' # ./spec/system/support/cuprite_setup.rb:39:in `block (2 levels) in
' # -e:1:in `
' ``` --- .../admin/order_cycles/complex_creating_specific_time_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/system/admin/order_cycles/complex_creating_specific_time_spec.rb b/spec/system/admin/order_cycles/complex_creating_specific_time_spec.rb index e745b9831e..5c41022952 100644 --- a/spec/system/admin/order_cycles/complex_creating_specific_time_spec.rb +++ b/spec/system/admin/order_cycles/complex_creating_specific_time_spec.rb @@ -135,6 +135,7 @@ describe ' select 'My distributor', from: 'new_distributor_id' click_button 'Add distributor' + expect(page).to have_field "order_cycle_outgoing_exchange_0_pickup_time" fill_in 'order_cycle_outgoing_exchange_0_pickup_time', with: 'pickup time' fill_in 'order_cycle_outgoing_exchange_0_pickup_instructions', with: 'pickup instructions'