switch from id to class

This commit is contained in:
DanteZ5 2022-09-21 11:06:19 +02:00 committed by LeSim
parent a22851cc35
commit 3826121751
3 changed files with 6 additions and 7 deletions

View file

@ -317,7 +317,6 @@
color: $blue-france-500;
}
#account-btn::before,
#account-btn_copy::before {
content: none;
.account-btn::before {
content: none !important;
}

View file

@ -1,6 +1,6 @@
%nav.fr-translate.fr-nav{ role: "navigation", "aria-label"=> t('menu_aria_label', scope: [:layouts]) }
.fr-nav__item
%button#account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts]) }
%button.account-btn.fr-translate__btn.fr-btn{ "aria-controls" => "account", "aria-expanded" => "false", :title => t('my_account', scope: [:layouts]) }
= image_tag "icons/account-circle.svg", alt: t('my_account', scope: [:layouts]), width: 20, height: 20, loading: 'lazy'
 
= " #{current_email}"

View file

@ -20,7 +20,7 @@ describe 'layouts/_header.html.haml', type: :view do
let(:profile) { nil }
it { is_expected.to have_css(".fr-header__logo") }
it { is_expected.to_not have_css("button#account-btn") }
it { is_expected.to_not have_css(".account-btn") }
it 'displays the Help link' do
expect(subject).to have_link('Aide', href: FAQ_URL)
@ -45,7 +45,7 @@ describe 'layouts/_header.html.haml', type: :view do
it { is_expected.to have_css(".fr-header__logo") }
it { is_expected.to have_link("Dossiers", href: dossiers_path) }
it { is_expected.to have_selector(:button, user.email, id: "account-btn") }
it { is_expected.to have_selector(:button, user.email, class: "account-btn") }
it 'displays the Help button' do
expect(subject).to have_link("Aide", href: FAQ_URL)
@ -59,7 +59,7 @@ describe 'layouts/_header.html.haml', type: :view do
let(:current_instructeur) { instructeur }
it { is_expected.to have_css(".fr-header__logo") }
it { is_expected.to have_selector(:button, user.email, id: "account-btn") }
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")