提交 75b2c9bf 编写于 作者: D Dmitriy Zaporozhets 提交者: Douglas Barbosa Alexandre

Fix invalid parent path on group settings page

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册