Commit 2d5c8a59 authored by Robin Naundorf's avatar Robin Naundorf

Fix broken breadcrumb in admin/user

  * Fix broken breadcrumb when switching tabs in admin/user

Closes #47419
parent 923172c9
- 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")
%h3.page-title
= _('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")
= 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")
%h3.page-title= _('New identity')
%hr
......
- add_to_breadcrumbs "Users", admin_users_path
- breadcrumb_title @user.name
- page_title "Impersonation Tokens", @user.name, "Users"
= render 'admin/users/head'
......
- add_to_breadcrumbs "Users", admin_users_path
- breadcrumb_title @user.name
- page_title "SSH Keys", @user.name, "Users"
= render 'admin/users/head'
= 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"
= 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
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
it do
visit admin_users_path
......@@ -409,4 +443,8 @@ describe "Admin::Users" do
expect(page).not_to have_content('twitter')
end
end
def check_breadcrumb(content)
expect(find('.breadcrumbs-sub-title')).to have_content(content)
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