specs: fix flaky "dossier brouillon" spec

The previous fix (scrolling to the viewport) didn't actually worked,
because the code tried to scroll the checkbox itself.
This commit is contained in:
Pierre de La Morinerie 2021-11-09 14:01:22 +00:00
parent 23f56577ee
commit 5dbb9f9e3c

View file

@ -16,7 +16,7 @@ describe 'The user' do
fill_in('date', with: '12-12-2012') fill_in('date', with: '12-12-2012')
select_date_and_time(Time.zone.parse('06/01/2030 7h05'), form_id_for_datetime('datetime')) select_date_and_time(Time.zone.parse('06/01/2030 7h05'), form_id_for_datetime('datetime'))
fill_in('number', with: '42') fill_in('number', with: '42')
find_field('checkbox').scroll_to(:center) scroll_to(find_field('checkbox'), align: :center)
check('checkbox') check('checkbox')
choose('Madame') choose('Madame')
fill_in('email', with: 'loulou@yopmail.com') fill_in('email', with: 'loulou@yopmail.com')