tech(test.flacky): utilise click_on en lieu et place de wait_for_autosave sur dossier_shared_examples.rb

supprime un parametre inutile de la methode wait_for_autosave
This commit is contained in:
Martin 2023-08-29 15:47:28 +02:00 committed by Colin Darie
parent afed0df262
commit 7779aa648f
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] find(:xpath, ".//label[contains(text()[normalize-space()], '#{libelle}')]")[:for]
end end
def wait_for_autosave(brouillon = true) def wait_for_autosave
blur blur
expect(page).to have_css('.debounced-empty') # no more debounce expect(page).to have_css('.debounced-empty') # no more debounce
expect(page).to have_css('.autosave-state-idle') # no more in flight promise 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' click_on 'Modifier mon dossier'
fill_in litteraire_user.dossiers.first.champs_public.first.libelle, with: 'some value' 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' click_on 'Déposer les modifications'
@ -286,7 +286,7 @@ describe 'The routing with rules', js: true do
click_on "Modifier mon dossier" click_on "Modifier mon dossier"
choose(new_group) choose(new_group)
wait_for_autosave(false) wait_for_autosave
expect(page).to have_text(new_group) 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) expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age du candidat (facultatif)', with: '18') 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 # the champ keeps their previous value so they are all displayed
expect(page).to have_css('label', text: 'permis de conduire', visible: true) 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)) expect(page).to have_current_path(modifier_dossier_path(dossier))
fill_in('Texte obligatoire', with: 'Nouveau texte') fill_in('Texte obligatoire', with: 'Nouveau texte')
wait_for_autosave(false)
click_on 'Déposer les modifications' click_on 'Déposer les modifications'
click_on 'Demande' click_on 'Demande'