diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index 664f656b125..239960ecb9b 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -43,12 +43,12 @@ scroll_to(find_field('communes'), align: :center) fill_in('communes', with: '60400') - find('.fr-menu__item', text: 'Brétigny (60400)').click + find('.fr-menu__item', text: 'Brétigny (60400)', wait: 5).click wait_until { champ_value_for('communes') == "Brétigny" } scroll_to(find_field('address'), align: :center) fill_in('address', with: '78 Rue du Grés 30310 Vergè') - find('.fr-menu__item', text: '78 Rue du Grés 30310 Vergèze').click + find('.fr-menu__item', text: '78 Rue du Grés 30310 Vergèze', wait: 5).click wait_until { champ_value_for('address') == '78 Rue du Grés 30310 Vergèze' } wait_until { champ_for('address').full_address? } expect(champ_for('address').departement_code_and_name).to eq('30 – Gard')