summaryrefslogtreecommitdiff
path: root/spec/features/projects/new_project_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/new_project_spec.rb')
-rw-r--r--spec/features/projects/new_project_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/projects/new_project_spec.rb b/spec/features/projects/new_project_spec.rb
index c6a6ee68185..3cbfa14208f 100644
--- a/spec/features/projects/new_project_spec.rb
+++ b/spec/features/projects/new_project_spec.rb
@@ -578,4 +578,25 @@ RSpec.describe 'New project', :js, feature_category: :projects do
it_behaves_like 'has instructions to enable OAuth'
end
end
+
+ describe 'sidebar' do
+ let_it_be(:user) { create(:user) }
+ let_it_be(:parent_group) { create(:group) }
+
+ before do
+ parent_group.add_owner(user)
+ sign_in(user)
+ end
+
+ context 'for a new top-level project' do
+ it_behaves_like 'a dashboard page with sidebar', :new_project_path, :projects
+ end
+
+ context 'for a new group project' do
+ it 'shows the group sidebar of the parent group' do
+ visit new_project_path(namespace_id: parent_group.id)
+ expect(page).to have_selector(".nav-sidebar[aria-label=\"Group navigation\"] .context-header[title=\"#{parent_group.name}\"]")
+ end
+ end
+ end
end