Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-28 15:14:07 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-28 15:14:07 +0300
commit22ecb1e3fc02bb923c3e9941b1baa849348a036f (patch)
treec01d9e91564f50e790a63c71675dd0f6e7735153 /spec/features/groups
parent5eab6dcdd923ca375b86d6993f20a3e37dbd7a51 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/groups')
-rw-r--r--spec/features/groups/new_group_page_spec.rb42
1 files changed, 34 insertions, 8 deletions
diff --git a/spec/features/groups/new_group_page_spec.rb b/spec/features/groups/new_group_page_spec.rb
index 4670df3fb5e..6d9513ce84f 100644
--- a/spec/features/groups/new_group_page_spec.rb
+++ b/spec/features/groups/new_group_page_spec.rb
@@ -30,16 +30,42 @@ RSpec.describe 'New group page', :js, feature_category: :subgroups do
end
describe 'sidebar' do
- context 'for a new top-level group' do
- it_behaves_like 'a dashboard page with sidebar', :new_group_path, :groups
+ context 'in the current navigation' do
+ before do
+ user.update!(use_new_navigation: false)
+ end
+
+ context 'for a new top-level group' do
+ it_behaves_like 'a dashboard page with sidebar', :new_group_path, :groups
+ end
+
+ context 'for a new subgroup' do
+ it 'shows the group sidebar of the parent group' do
+ visit new_group_path(parent_id: parent_group.id, anchor: 'create-group-pane')
+ expect(page).to have_selector(
+ ".nav-sidebar[aria-label=\"Group navigation\"] .context-header[title=\"#{parent_group.name}\"]"
+ )
+ end
+ end
end
- context 'for a new subgroup' do
- it 'shows the group sidebar of the parent group' do
- visit new_group_path(parent_id: parent_group.id, anchor: 'create-group-pane')
- expect(page).to have_selector(
- ".nav-sidebar[aria-label=\"Group navigation\"] .context-header[title=\"#{parent_group.name}\"]"
- )
+ context 'in the new navigation' do
+ before do
+ user.update!(use_new_navigation: true)
+ end
+
+ context 'for a new top-level group' do
+ it 'shows the "Your work" navigation' do
+ visit new_group_path
+ expect(page).to have_selector(".super-sidebar .context-switcher-toggle", text: "Your work")
+ end
+ end
+
+ context 'for a new subgroup' do
+ it 'shows the group navigation of the parent group' do
+ visit new_group_path(parent_id: parent_group.id, anchor: 'create-group-pane')
+ expect(page).to have_selector(".super-sidebar .context-switcher-toggle", text: parent_group.name)
+ end
end
end
end