diff --git a/spec/system/administrateurs/procedure_attestation_template_spec.rb b/spec/system/administrateurs/procedure_attestation_template_spec.rb index 35cb43be9..aa6bb6d98 100644 --- a/spec/system/administrateurs/procedure_attestation_template_spec.rb +++ b/spec/system/administrateurs/procedure_attestation_template_spec.rb @@ -44,7 +44,7 @@ describe 'As an administrateur, I want to manage the procedure’s attestation', # click CTA for publication screen click_on("Publier") # validate publication - click_on("Publier") + within('form') { click_on 'Publier' } # now process to disable attestation find_attestation_card.click diff --git a/spec/system/administrateurs/procedure_publish_spec.rb b/spec/system/administrateurs/procedure_publish_spec.rb index c8d45b2be..b9a100c7f 100644 --- a/spec/system/administrateurs/procedure_publish_spec.rb +++ b/spec/system/administrateurs/procedure_publish_spec.rb @@ -41,7 +41,7 @@ describe 'Publishing a procedure', js: true, retry: 3 do scenario 'an admin can publish it' do expect(find_field('procedure_path').value).to eq procedure.path fill_in 'lien_site_web', with: 'http://some.website' - click_on 'Publier' + within('form') { click_on 'Publier' } expect(page).to have_text('Démarche publiée') end diff --git a/spec/system/api_particulier/api_particulier_spec.rb b/spec/system/api_particulier/api_particulier_spec.rb index ef6195e47..4fe12f340 100644 --- a/spec/system/api_particulier/api_particulier_spec.rb +++ b/spec/system/api_particulier/api_particulier_spec.rb @@ -228,7 +228,7 @@ describe 'fetch API Particulier Data', js: true, retry: 3 do find('#publish-procedure-link').click expect(find_field('procedure_path').value).to eq procedure.path fill_in 'lien_site_web', with: 'http://some.website' - click_on 'Publier' + within('form') { click_on 'Publier' } expect(page).to have_text('Démarche publiée') end diff --git a/spec/system/routing/rules_full_scenario_spec.rb b/spec/system/routing/rules_full_scenario_spec.rb index 3e0d43654..f8f5414ec 100644 --- a/spec/system/routing/rules_full_scenario_spec.rb +++ b/spec/system/routing/rules_full_scenario_spec.rb @@ -252,7 +252,7 @@ describe 'The routing with rules', js: true, retry: 3 do click_on procedure.libelle find('#publish-procedure-link').click fill_in 'lien_site_web', with: 'http://some.website' - click_on 'Publier' + within('form') { click_on 'Publier' } expect(page).to have_text('Démarche publiée') end