Commit 9219ac0a authored by Rob Watson's avatar Rob Watson

Add breadcrumbs to User Settings sub-views

Closes #40274
parent ff077cf7
- add_to_breadcrumbs "Applications", oauth_applications_path
- breadcrumb_title @application.name
- page_title @application.name, "Applications" - page_title @application.name, "Applications"
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
......
- add_to_breadcrumbs "SSH Keys", profile_keys_path
- breadcrumb_title @key.title
- page_title @key.title, "SSH Keys" - page_title @key.title, "SSH Keys"
- @content_class = "limit-container-width" unless fluid_layout - @content_class = "limit-container-width" unless fluid_layout
= render 'profiles/head' = render 'profiles/head'
......
---
title: Fix breadcrumbs in User Settings
merge_request: 16172
author: rfwatson
type: fixed
...@@ -27,6 +27,7 @@ feature 'Profile > SSH Keys' do ...@@ -27,6 +27,7 @@ feature 'Profile > SSH Keys' do
expect(page).to have_content("Title: #{attrs[:title]}") expect(page).to have_content("Title: #{attrs[:title]}")
expect(page).to have_content(attrs[:key]) expect(page).to have_content(attrs[:key])
expect(find('.breadcrumbs-sub-title')).to have_link(attrs[:title])
end end
context 'when only DSA and ECDSA keys are allowed' do context 'when only DSA and ECDSA keys are allowed' do
......
...@@ -2,12 +2,20 @@ require 'spec_helper' ...@@ -2,12 +2,20 @@ require 'spec_helper'
describe 'Profile > Applications' do describe 'Profile > Applications' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:application) { create(:oauth_application, owner: user) }
before do before do
sign_in(user) sign_in(user)
end end
describe 'User manages applications', :js do describe 'User manages applications', :js do
it 'views an application' do
visit oauth_application_path(application)
expect(page).to have_content("Application: #{application.name}")
expect(find('.breadcrumbs-sub-title')).to have_link(application.name)
end
it 'deletes an application' do it 'deletes an application' do
create(:oauth_application, owner: user) create(:oauth_application, owner: user)
visit oauth_applications_path visit oauth_applications_path
......
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