diff --git a/spec/system/accessibilite/wcag_usager_spec.rb b/spec/system/accessibilite/wcag_usager_spec.rb index 16e6b23c2..3f1c1b0bf 100644 --- a/spec/system/accessibilite/wcag_usager_spec.rb +++ b/spec/system/accessibilite/wcag_usager_spec.rb @@ -101,7 +101,7 @@ describe 'wcag rules for usager', js: true do scenario 'commencer page, help dropdown' do visit commencer_path(path: procedure.reload.path) - page.find("#help-menu_button").click + page.find(".fr-header__body .help-btn").click test_expect_axe_clean_without_main_navigation end end diff --git a/spec/system/help_spec.rb b/spec/system/help_spec.rb index 26e58e02e..8c845da6f 100644 --- a/spec/system/help_spec.rb +++ b/spec/system/help_spec.rb @@ -16,7 +16,7 @@ describe 'Getting help:' do expect(page).to have_help_menu end - within('.help-dropdown') do + within('.help__content') do expect(page).to have_content(procedure.service.email) expect(page).to have_content(procedure.service.telephone) expect(page).to have_link(nil, href: I18n.t("links.common.faq.url")) @@ -49,7 +49,7 @@ describe 'Getting help:' do expect(page).to have_help_menu end - within('.help-dropdown') do + within('.help__content') do expect(page).to have_content(dossier.procedure.service.email) expect(page).to have_content(dossier.procedure.service.telephone) expect(page).to have_link(nil, href: I18n.t("links.common.faq.url")) @@ -67,7 +67,7 @@ describe 'Getting help:' do expect(page).to have_help_menu end - within('.help-dropdown') do + within('.help__content') do expect(page).to have_link(nil, href: messagerie_dossier_path(dossier)) expect(page).to have_link(nil, href: I18n.t("links.common.faq.url")) end @@ -95,6 +95,6 @@ describe 'Getting help:' do end def have_help_menu - have_selector('.help-dropdown') + have_selector("#help-menu") end end diff --git a/spec/views/layouts/_header_spec.rb b/spec/views/layouts/_header_spec.rb index afe770f67..48bb0c4b1 100644 --- a/spec/views/layouts/_header_spec.rb +++ b/spec/views/layouts/_header_spec.rb @@ -36,7 +36,7 @@ describe 'layouts/_header', type: :view do end it 'displays the Help dropdown menu' do - expect(subject).to have_css(".help-dropdown") + expect(subject).to have_selector("#help-menu") end end end @@ -65,7 +65,7 @@ describe 'layouts/_header', type: :view do it { is_expected.to have_selector(:button, user.email, class: "account-btn") } it 'displays the Help dropdown menu' do - expect(subject).to have_css(".help-dropdown") + expect(subject).to have_selector("#help-menu") end end end