Commit f97c4425 authored by Phil Hughes's avatar Phil Hughes

Merge branch '47419-Fix-breadcrumbs' into 'master'

Resolve "broken breadcrumb in admin/user when switching tabs"

Closes #47419

See merge request gitlab-org/gitlab-ce!19608
parents fb735d0a 2d5c8a59
- add_to_breadcrumbs "Users", admin_users_path
- add_to_breadcrumbs @user.name, admin_user_identities_path(@user)
- breadcrumb_title "Edit Identity"
- page_title _("Edit"), @identity.provider, _("Identities"), @user.name, _("Users") - page_title _("Edit"), @identity.provider, _("Identities"), @user.name, _("Users")
%h3.page-title %h3.page-title
= _('Edit identity for %{user_name}') % { user_name: @user.name } = _('Edit identity for %{user_name}') % { user_name: @user.name }
......
- add_to_breadcrumbs "Users", admin_users_path
- breadcrumb_title @user.name
- page_title _("Identities"), @user.name, _("Users") - page_title _("Identities"), @user.name, _("Users")
= render 'admin/users/head' = render 'admin/users/head'
......
- add_to_breadcrumbs "Users", admin_users_path
- add_to_breadcrumbs @user.name, admin_user_identities_path(@user)
- breadcrumb_title "New Identity"
- page_title _("New Identity") - page_title _("New Identity")
%h3.page-title= _('New identity') %h3.page-title= _('New identity')
%hr %hr
......
- add_to_breadcrumbs "Users", admin_users_path
- breadcrumb_title @user.name
- page_title "Impersonation Tokens", @user.name, "Users" - page_title "Impersonation Tokens", @user.name, "Users"
= render 'admin/users/head' = render 'admin/users/head'
......
- add_to_breadcrumbs "Users", admin_users_path
- breadcrumb_title @user.name
- page_title "SSH Keys", @user.name, "Users" - page_title "SSH Keys", @user.name, "Users"
= render 'admin/users/head' = render 'admin/users/head'
= render 'profiles/keys/key_table', admin: true = render 'profiles/keys/key_table', admin: true
- add_to_breadcrumbs "Users", admin_users_path
- breadcrumb_title @user.name
- page_title "Groups and projects", @user.name, "Users" - page_title "Groups and projects", @user.name, "Users"
= render 'admin/users/head' = render 'admin/users/head'
......
---
title: Fix breadcrumbs in Admin/User interface.
merge_request: 19608
author: Robin Naundorf
type: fixed
...@@ -315,6 +315,40 @@ describe "Admin::Users" do ...@@ -315,6 +315,40 @@ describe "Admin::Users" do
end end
end end
describe 'show breadcrumbs' do
it do
visit admin_user_path(user)
check_breadcrumb(user.name)
visit projects_admin_user_path(user)
check_breadcrumb(user.name)
visit keys_admin_user_path(user)
check_breadcrumb(user.name)
visit admin_user_impersonation_tokens_path(user)
check_breadcrumb(user.name)
visit admin_user_identities_path(user)
check_breadcrumb(user.name)
visit new_admin_user_identity_path(user)
check_breadcrumb("New Identity")
visit admin_user_identities_path(user)
find('.table').find(:link, 'Edit').click
check_breadcrumb("Edit Identity")
end
end
describe 'show user attributes' do describe 'show user attributes' do
it do it do
visit admin_users_path visit admin_users_path
...@@ -409,4 +443,8 @@ describe "Admin::Users" do ...@@ -409,4 +443,8 @@ describe "Admin::Users" do
expect(page).not_to have_content('twitter') expect(page).not_to have_content('twitter')
end end
end end
def check_breadcrumb(content)
expect(find('.breadcrumbs-sub-title')).to have_content(content)
end
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