Merge branch 'dm-group-page-name' into 'master'

Show group name instead of path on group page

See merge request !12391
This commit is contained in:
Sean McGivern 2017-06-26 09:10:53 +00:00
commit 5c8e8662c6
4 changed files with 10 additions and 6 deletions

View File

@ -3,7 +3,7 @@
.avatar-container.s70.group-avatar
= image_tag group_icon(@group), class: "avatar s70 avatar-tile"
%h1.group-title
@#{@group.path}
= @group.name
%span.visibility-icon.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) }
= visibility_level_icon(@group.visibility_level, fw: false)

View File

@ -0,0 +1,4 @@
---
title: Show group name instead of path on group page
merge_request:
author:

View File

@ -5,7 +5,7 @@ class Spinach::Features::Groups < Spinach::FeatureSteps
include SharedUser
step 'I should see group "Owned"' do
expect(page).to have_content '@owned'
expect(page).to have_content 'Owned'
end
step 'I am a signed out user' do

View File

@ -18,14 +18,14 @@ feature 'Edit group settings', feature: true do
update_path(new_group_path)
visit new_group_full_path
expect(current_path).to eq(new_group_full_path)
expect(find('h1.group-title')).to have_content(new_group_path)
expect(find('h1.group-title')).to have_content(group.name)
end
scenario 'the old group path redirects to the new path' do
update_path(new_group_path)
visit old_group_full_path
expect(current_path).to eq(new_group_full_path)
expect(find('h1.group-title')).to have_content(new_group_path)
expect(find('h1.group-title')).to have_content(group.name)
end
context 'with a subgroup' do
@ -37,14 +37,14 @@ feature 'Edit group settings', feature: true do
update_path(new_group_path)
visit new_subgroup_full_path
expect(current_path).to eq(new_subgroup_full_path)
expect(find('h1.group-title')).to have_content(subgroup.path)
expect(find('h1.group-title')).to have_content(subgroup.name)
end
scenario 'the old subgroup path redirects to the new path' do
update_path(new_group_path)
visit old_subgroup_full_path
expect(current_path).to eq(new_subgroup_full_path)
expect(find('h1.group-title')).to have_content(subgroup.path)
expect(find('h1.group-title')).to have_content(subgroup.name)
end
end