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 <main>'
     # ./spec/system/support/cuprite_setup.rb:39:in `block (2 levels) in <main>'
     # -e:1:in `<main>'
```
This commit is contained in:
Maikel Linke
2022-07-19 14:53:04 +10:00
committed by Filipe
parent 195f1e1237
commit 512394862b

View File

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