diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-10-17 13:03:03 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-10-17 13:03:03 +0300 |
commit | 79e889122b9f1cb41eb75ee33e94e625a8c679e2 (patch) | |
tree | eb8bba9933b3241b3ca80574bc47fc40d4f3950f /spec/features/groups | |
parent | 3fa410c831dac1dd1a74a14260ed99a5920218f8 (diff) | |
parent | 893402d477436d36b48c2fd0244576a0d16e9425 (diff) |
Merge branch 'bvl-group-trees' into 'master'
Show collapsible tree on the project show page
Closes #30343
See merge request gitlab-org/gitlab-ce!14055
Diffstat (limited to 'spec/features/groups')
-rw-r--r-- | spec/features/groups/show_spec.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/features/groups/show_spec.rb b/spec/features/groups/show_spec.rb index 303013e59d5..7fc2b383749 100644 --- a/spec/features/groups/show_spec.rb +++ b/spec/features/groups/show_spec.rb @@ -24,4 +24,35 @@ feature 'Group show page' do it_behaves_like "an autodiscoverable RSS feed without an RSS token" end + + context 'subgroup support' do + let(:user) { create(:user) } + + before do + group.add_owner(user) + sign_in(user) + end + + context 'when subgroups are supported', :js, :nested_groups do + before do + allow(Group).to receive(:supports_nested_groups?) { true } + visit path + end + + it 'allows creating subgroups' do + expect(page).to have_css("li[data-text='New subgroup']", visible: false) + end + end + + context 'when subgroups are not supported' do + before do + allow(Group).to receive(:supports_nested_groups?) { false } + visit path + end + + it 'allows creating subgroups' do + expect(page).not_to have_selector("li[data-text='New subgroup']", visible: false) + end + end + end end |