Merge pull request #7785 from betagouv/fixux-nav-mail-dropdown
fix-ux(issue#7774) : indicateur menu email navbar
This commit is contained in:
commit
bd60ac4dfc
3 changed files with 9 additions and 2 deletions
|
@ -316,3 +316,7 @@
|
||||||
.link {
|
.link {
|
||||||
color: $blue-france-500;
|
color: $blue-france-500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.account-btn::before {
|
||||||
|
content: none !important;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%nav.fr-nav{ role: "navigation", "aria-label"=> t('menu_aria_label', scope: [:layouts]) }
|
%nav.fr-translate.fr-nav{ role: "navigation", "aria-label"=> t('menu_aria_label', scope: [:layouts]) }
|
||||||
.fr-nav__item
|
.fr-nav__item
|
||||||
%button.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'
|
= image_tag "icons/account-circle.svg", alt: t('my_account', scope: [:layouts]), width: 20, height: 20, loading: 'lazy'
|
||||||
|
|
||||||
= " #{current_email}"
|
= " #{current_email}"
|
||||||
|
|
|
@ -20,6 +20,7 @@ describe 'layouts/_header.html.haml', type: :view do
|
||||||
let(:profile) { nil }
|
let(:profile) { nil }
|
||||||
|
|
||||||
it { is_expected.to have_css(".fr-header__logo") }
|
it { is_expected.to have_css(".fr-header__logo") }
|
||||||
|
it { is_expected.to_not have_css(".account-btn") }
|
||||||
|
|
||||||
it 'displays the Help link' do
|
it 'displays the Help link' do
|
||||||
expect(subject).to have_link('Aide', href: FAQ_URL)
|
expect(subject).to have_link('Aide', href: FAQ_URL)
|
||||||
|
@ -44,6 +45,7 @@ describe 'layouts/_header.html.haml', type: :view do
|
||||||
|
|
||||||
it { is_expected.to have_css(".fr-header__logo") }
|
it { is_expected.to have_css(".fr-header__logo") }
|
||||||
it { is_expected.to have_link("Dossiers", href: dossiers_path) }
|
it { is_expected.to have_link("Dossiers", href: dossiers_path) }
|
||||||
|
it { is_expected.to have_selector(:button, user.email, class: "account-btn") }
|
||||||
|
|
||||||
it 'displays the Help button' do
|
it 'displays the Help button' do
|
||||||
expect(subject).to have_link("Aide", href: FAQ_URL)
|
expect(subject).to have_link("Aide", href: FAQ_URL)
|
||||||
|
@ -57,6 +59,7 @@ describe 'layouts/_header.html.haml', type: :view do
|
||||||
let(:current_instructeur) { instructeur }
|
let(:current_instructeur) { instructeur }
|
||||||
|
|
||||||
it { is_expected.to have_css(".fr-header__logo") }
|
it { is_expected.to have_css(".fr-header__logo") }
|
||||||
|
it { is_expected.to have_selector(:button, user.email, class: "account-btn") }
|
||||||
|
|
||||||
it 'displays the Help dropdown menu' do
|
it 'displays the Help dropdown menu' do
|
||||||
expect(subject).to have_css(".help-dropdown")
|
expect(subject).to have_css(".help-dropdown")
|
||||||
|
|
Loading…
Add table
Reference in a new issue