Fix invalid parent path on group settings page
This commit is contained in:
parent
4c351e17ee
commit
75b2c9bf6f
3 changed files with 23 additions and 2 deletions
|
@ -12,8 +12,8 @@
|
|||
.group-root-path.input-group-prepend.has-tooltip{ title: group_path(@group), :'data-placement' => 'bottom' }
|
||||
.input-group-text
|
||||
%span>= root_url
|
||||
- if parent
|
||||
%strong= parent.full_path + '/'
|
||||
- if @group.parent
|
||||
%strong= @group.parent.full_path + '/'
|
||||
= f.hidden_field :parent_id
|
||||
= f.text_field :path, placeholder: 'open-source', class: 'form-control',
|
||||
autofocus: local_assigns[:autofocus] || false, required: true,
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix incorrect parent path on group settings page
|
||||
merge_request: 22142
|
||||
author:
|
||||
type: fixed
|
|
@ -98,6 +98,22 @@ describe 'Edit group settings' do
|
|||
end
|
||||
end
|
||||
|
||||
describe 'edit group path' do
|
||||
it 'has a root URL label for top-level group' do
|
||||
visit edit_group_path(group)
|
||||
|
||||
expect(find(:css, '.group-root-path').text).to eq(root_url)
|
||||
end
|
||||
|
||||
it 'has a parent group URL label for a subgroup group', :postgresql do
|
||||
subgroup = create(:group, parent: group)
|
||||
|
||||
visit edit_group_path(subgroup)
|
||||
|
||||
expect(find(:css, '.group-root-path').text).to eq(group_url(subgroup.parent) + '/')
|
||||
end
|
||||
end
|
||||
|
||||
def update_path(new_group_path)
|
||||
visit edit_group_path(group)
|
||||
|
||||
|
|
Loading…
Reference in a new issue