diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-09 15:59:11 +0100 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-11-14 16:57:41 +0100 |
commit | 022d8420ec0713909ff379e1e8d36c4e46bde3a3 (patch) | |
tree | b2cdf284c023430410239a2d41806e010615c0fa /spec/features/projects/user_creates_project_spec.rb | |
parent | fb7abd87daa8930682b05870361fe9dd112f050f (diff) | |
download | gitlab-ce-022d8420ec0713909ff379e1e8d36c4e46bde3a3.tar.gz |
Include child projects a user can manage in namespace dropdowns
These dropdown options are used for creating and transfering projects.
Diffstat (limited to 'spec/features/projects/user_creates_project_spec.rb')
-rw-r--r-- | spec/features/projects/user_creates_project_spec.rb | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/spec/features/projects/user_creates_project_spec.rb b/spec/features/projects/user_creates_project_spec.rb index 4a152572502..f95469ad070 100644 --- a/spec/features/projects/user_creates_project_spec.rb +++ b/spec/features/projects/user_creates_project_spec.rb @@ -6,10 +6,11 @@ feature 'User creates a project', :js do before do sign_in(user) create(:personal_key, user: user) - visit(new_project_path) end it 'creates a new project' do + visit(new_project_path) + fill_in(:project_path, with: 'Empty') page.within('#content-body') do @@ -24,4 +25,32 @@ feature 'User creates a project', :js do expect(page).to have_content('git remote') expect(page).to have_content(project.url_to_repo) end + + context 'in a subgroup they do not own', :nested_groups do + let(:parent) { create(:group) } + let!(:subgroup) { create(:group, parent: parent) } + + before do + parent.add_owner(user) + end + + it 'creates a new project' do + visit(new_project_path) + + fill_in :project_path, with: 'a-subgroup-project' + + page.find('.js-select-namespace').click + page.find("div[role='option']", text: subgroup.full_path).click + + page.within('#content-body') do + click_button('Create project') + end + + expect(page).to have_content("Project 'a-subgroup-project' was successfully created") + + project = Project.last + + expect(project.namespace).to eq(subgroup) + end + end end |