From 5dbb9f9e3c5a6904385dd232b4440e1590296186 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Tue, 9 Nov 2021 14:01:22 +0000 Subject: [PATCH] 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. --- spec/system/users/brouillon_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/users/brouillon_spec.rb b/spec/system/users/brouillon_spec.rb index 9912d827f..5c0ba1ac7 100644 --- a/spec/system/users/brouillon_spec.rb +++ b/spec/system/users/brouillon_spec.rb @@ -16,7 +16,7 @@ describe 'The user' do fill_in('date', with: '12-12-2012') select_date_and_time(Time.zone.parse('06/01/2030 7h05'), form_id_for_datetime('datetime')) fill_in('number', with: '42') - find_field('checkbox').scroll_to(:center) + scroll_to(find_field('checkbox'), align: :center) check('checkbox') choose('Madame') fill_in('email', with: 'loulou@yopmail.com')