Commit ab4dbcec authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Merge branch '30484-profile-dropdown-account-name' into 'master'

Added profile name to user dropdown

Closes #30484

See merge request !10469
parents 364050c1 3b2adb5b
...@@ -40,6 +40,10 @@ ...@@ -40,6 +40,10 @@
line-height: 24px; line-height: 24px;
} }
.bold {
font-weight: 600;
}
.tab-content { .tab-content {
overflow: visible; overflow: visible;
} }
......
...@@ -331,6 +331,14 @@ header { ...@@ -331,6 +331,14 @@ header {
.dropdown-menu-nav { .dropdown-menu-nav {
min-width: 140px; min-width: 140px;
margin-top: -5px; margin-top: -5px;
.current-user {
padding: 5px 18px;
.user-name {
display: block;
}
}
} }
} }
......
...@@ -210,10 +210,6 @@ ...@@ -210,10 +210,6 @@
} }
} }
.bold {
font-weight: 600;
}
.light { .light {
font-weight: normal; font-weight: normal;
} }
......
...@@ -67,6 +67,11 @@ ...@@ -67,6 +67,11 @@
= icon('caret-down') = icon('caret-down')
.dropdown-menu-nav.dropdown-menu-align-right .dropdown-menu-nav.dropdown-menu-align-right
%ul %ul
%li.current-user
.user-name.bold
= current_user.name
@#{current_user.username}
%li.divider
%li %li
= link_to "Profile", current_user, class: 'profile-link', aria: { label: "Profile" }, data: { user: current_user.username } = link_to "Profile", current_user, class: 'profile-link', aria: { label: "Profile" }, data: { user: current_user.username }
%li %li
......
---
title: Added profile name to user dropdown
merge_request:
author:
...@@ -87,7 +87,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps ...@@ -87,7 +87,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
end end
step 'I click on the "Remove User From Group" button for "John Doe"' do step 'I click on the "Remove User From Group" button for "John Doe"' do
find(:css, 'li', text: "John Doe").find(:css, 'a.btn-remove').click find(:css, '.project-members-page li', text: "John Doe").find(:css, 'a.btn-remove').click
# poltergeist always confirms popups. # poltergeist always confirms popups.
end end
...@@ -97,7 +97,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps ...@@ -97,7 +97,7 @@ class Spinach::Features::GroupMembers < Spinach::FeatureSteps
end end
step 'I should not see the "Remove User From Group" button for "John Doe"' do step 'I should not see the "Remove User From Group" button for "John Doe"' do
expect(find(:css, 'li', text: "John Doe")).not_to have_selector(:css, 'a.btn-remove') expect(find(:css, '.project-members-page li', text: "John Doe")).not_to have_selector(:css, 'a.btn-remove')
# poltergeist always confirms popups. # poltergeist always confirms popups.
end end
......
...@@ -109,7 +109,7 @@ describe "Admin::Projects", feature: true do ...@@ -109,7 +109,7 @@ describe "Admin::Projects", feature: true do
expect(page).to have_content('Developer') expect(page).to have_content('Developer')
end end
find(:css, 'li', text: current_user.name).find(:css, 'a.btn-remove').click find(:css, '.content-list li', text: current_user.name).find(:css, 'a.btn-remove').click
expect(page).not_to have_selector(:css, '.content-list') expect(page).not_to have_selector(:css, '.content-list')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment