This repository has been archived by the owner on May 21, 2024. It is now read-only.
forked from gitlabhq/gitlabhq
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bvl-subgroup-in-dropdowns' into 'master'
Include child projects a user can manage in namespace dropdowns Closes #39987 See merge request gitlab-org/gitlab-ce!15294
- Loading branch information
Showing
8 changed files
with
161 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Make sure a user can add projects to subgroups they have access to | ||
merge_request: 15294 | ||
author: | ||
type: fixed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
require 'spec_helper' | ||
|
||
feature 'User transfers a project', :js do | ||
let(:user) { create(:user) } | ||
let(:project) { create(:project, :repository, namespace: user.namespace) } | ||
|
||
before do | ||
sign_in user | ||
end | ||
|
||
def transfer_project(project, group) | ||
visit edit_project_path(project) | ||
|
||
page.within('.js-project-transfer-form') do | ||
page.find('.select2-container').click | ||
end | ||
|
||
page.find("div[role='option']", text: group.full_name).click | ||
|
||
click_button('Transfer project') | ||
|
||
fill_in 'confirm_name_input', with: project.name | ||
|
||
click_button 'Confirm' | ||
|
||
wait_for_requests | ||
end | ||
|
||
it 'allows transferring a project to a subgroup of a namespace' do | ||
group = create(:group) | ||
group.add_owner(user) | ||
|
||
transfer_project(project, group) | ||
|
||
expect(project.reload.namespace).to eq(group) | ||
end | ||
|
||
context 'when nested groups are available', :nested_groups do | ||
it 'allows transferring a project to a subgroup' do | ||
parent = create(:group) | ||
parent.add_owner(user) | ||
subgroup = create(:group, parent: parent) | ||
|
||
transfer_project(project, subgroup) | ||
|
||
expect(project.reload.namespace).to eq(subgroup) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters