Merge pull request #9422 from mfo/US/fix-flacky-dossier_shared_example-l13

tech(test): retire un params inutile dans wait for autosave
This commit is contained in:
Colin Darie 2023-08-30 09:34:56 +00:00 committed by GitHub
commit 3c410e48f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 5 deletions

View file

@ -172,7 +172,7 @@ module SystemHelpers
find(:xpath, ".//label[contains(text()[normalize-space()], '#{libelle}')]")[:for]
end
def wait_for_autosave(brouillon = true)
def wait_for_autosave
blur
expect(page).to have_css('.debounced-empty') # no more debounce
expect(page).to have_css('.autosave-state-idle') # no more in flight promise

View file

@ -187,7 +187,7 @@ describe 'The routing with rules', js: true do
click_on 'Modifier mon dossier'
fill_in litteraire_user.dossiers.first.champs_public.first.libelle, with: 'some value'
wait_for_autosave(false)
wait_for_autosave
click_on 'Déposer les modifications'
@ -286,7 +286,7 @@ describe 'The routing with rules', js: true do
click_on "Modifier mon dossier"
choose(new_group)
wait_for_autosave(false)
wait_for_autosave
expect(page).to have_text(new_group)

View file

@ -466,7 +466,7 @@ describe 'The user' do
expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age du candidat (facultatif)', with: '18')
wait_for_autosave(false)
wait_for_autosave
# the champ keeps their previous value so they are all displayed
expect(page).to have_css('label', text: 'permis de conduire', visible: true)

View file

@ -10,7 +10,6 @@ RSpec.shared_examples 'the user can edit the submitted demande' do
expect(page).to have_current_path(modifier_dossier_path(dossier))
fill_in('Texte obligatoire', with: 'Nouveau texte')
wait_for_autosave(false)
click_on 'Déposer les modifications'
click_on 'Demande'