Commit 75b2c9bf authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Douglas Barbosa Alexandre

Fix invalid parent path on group settings page

parent 4c351e17
......@@ -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,
......
---
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)
......
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