Merge pull request #9927 from mfo/fix-flacky-type-de-champ-template

fix(spec.flacky): ./spec/system/administrateurs/types_de_champ_spec.rb:272 was flacky, try to fix it
This commit is contained in:
mfo 2024-01-22 17:10:37 +00:00 committed by GitHub
commit 15e0ed8480
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -268,7 +268,10 @@ describe 'As an administrateur I can edit types de champ', js: true do
fill_in 'Libellé du champ', with: 'renamed' fill_in 'Libellé du champ', with: 'renamed'
end end
wait_until { initial_first_coordinate.reload.libelle == 'renamed' } wait_until { initial_first_coordinate.reload.libelle == 'renamed' }
# wait until turbo response
expect(page).to have_text('Formulaire enregistré')
page.find(initial_first_coordinate_selector).click page.find(initial_first_coordinate_selector).click
expect(page).to have_css("#{initial_first_coordinate_selector} option", count: 3)
expect(page.find(initial_first_coordinate_selector).all("option").map(&:text)).to match_array(['0 renamed', '1 middle_tdc', '2 last_tdc']) expect(page.find(initial_first_coordinate_selector).all("option").map(&:text)).to match_array(['0 renamed', '1 middle_tdc', '2 last_tdc'])
end end