diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-20 13:43:29 +0300 |
commit | 3b1af5cc7ed2666ff18b718ce5d30fa5a2756674 (patch) | |
tree | 3bc4a40e0ee51ec27eabf917c537033c0c5b14d4 /spec/lib/sidebars/groups | |
parent | 9bba14be3f2c211bf79e15769cd9b77bc73a13bc (diff) |
Add latest changes from gitlab-org/gitlab@16-1-stable-eev16.1.0-rc42
Diffstat (limited to 'spec/lib/sidebars/groups')
7 files changed, 29 insertions, 7 deletions
diff --git a/spec/lib/sidebars/groups/menus/ci_cd_menu_spec.rb b/spec/lib/sidebars/groups/menus/ci_cd_menu_spec.rb index 246df2e409b..2b9a4133f3f 100644 --- a/spec/lib/sidebars/groups/menus/ci_cd_menu_spec.rb +++ b/spec/lib/sidebars/groups/menus/ci_cd_menu_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Sidebars::Groups::Menus::CiCdMenu do +RSpec.describe Sidebars::Groups::Menus::CiCdMenu, feature_category: :navigation do let_it_be(:owner) { create(:user) } let_it_be(:root_group) do build(:group, :private).tap do |g| diff --git a/spec/lib/sidebars/groups/menus/observability_menu_spec.rb b/spec/lib/sidebars/groups/menus/observability_menu_spec.rb index 20af8ea00be..573760cddb6 100644 --- a/spec/lib/sidebars/groups/menus/observability_menu_spec.rb +++ b/spec/lib/sidebars/groups/menus/observability_menu_spec.rb @@ -2,9 +2,9 @@ require 'spec_helper' -RSpec.describe Sidebars::Groups::Menus::ObservabilityMenu do - let_it_be(:owner) { create(:user) } - let_it_be(:root_group) do +RSpec.describe Sidebars::Groups::Menus::ObservabilityMenu, feature_category: :navigation do + let(:owner) { build_stubbed(:user) } + let(:root_group) do build(:group, :private).tap do |g| g.add_owner(owner) end diff --git a/spec/lib/sidebars/groups/menus/settings_menu_spec.rb b/spec/lib/sidebars/groups/menus/settings_menu_spec.rb index bc30d7628af..8628696ebd8 100644 --- a/spec/lib/sidebars/groups/menus/settings_menu_spec.rb +++ b/spec/lib/sidebars/groups/menus/settings_menu_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe Sidebars::Groups::Menus::SettingsMenu, :with_license do +RSpec.describe Sidebars::Groups::Menus::SettingsMenu, :with_license, feature_category: :navigation do let_it_be(:owner) { create(:user) } let_it_be_with_refind(:group) do diff --git a/spec/lib/sidebars/groups/super_sidebar_menus/deploy_menu_spec.rb b/spec/lib/sidebars/groups/super_sidebar_menus/deploy_menu_spec.rb new file mode 100644 index 00000000000..ec3f911d8dc --- /dev/null +++ b/spec/lib/sidebars/groups/super_sidebar_menus/deploy_menu_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +require 'spec_helper' + +RSpec.describe Sidebars::Groups::SuperSidebarMenus::DeployMenu, feature_category: :navigation do + subject { described_class.new({}) } + + let(:items) { subject.instance_variable_get(:@items) } + + it 'has title and sprite_icon' do + expect(subject.title).to eq(s_("Navigation|Deploy")) + expect(subject.sprite_icon).to eq("deployments") + end + + it 'defines list of NilMenuItem placeholders' do + expect(items.map(&:class).uniq).to eq([Sidebars::NilMenuItem]) + expect(items.map(&:item_id)).to eq([ + :packages_registry + ]) + end +end diff --git a/spec/lib/sidebars/groups/super_sidebar_menus/operations_menu_spec.rb b/spec/lib/sidebars/groups/super_sidebar_menus/operations_menu_spec.rb index e9c2701021c..df37d5f1b0d 100644 --- a/spec/lib/sidebars/groups/super_sidebar_menus/operations_menu_spec.rb +++ b/spec/lib/sidebars/groups/super_sidebar_menus/operations_menu_spec.rb @@ -9,14 +9,13 @@ RSpec.describe Sidebars::Groups::SuperSidebarMenus::OperationsMenu, feature_cate it 'has title and sprite_icon' do expect(subject.title).to eq(s_("Navigation|Operate")) - expect(subject.sprite_icon).to eq("deployments") + expect(subject.sprite_icon).to eq("cloud-pod") end it 'defines list of NilMenuItem placeholders' do expect(items.map(&:class).uniq).to eq([Sidebars::NilMenuItem]) expect(items.map(&:item_id)).to eq([ :dependency_proxy, - :packages_registry, :container_registry, :group_kubernetes_clusters ]) diff --git a/spec/lib/sidebars/groups/super_sidebar_menus/secure_menu_spec.rb b/spec/lib/sidebars/groups/super_sidebar_menus/secure_menu_spec.rb index 9eb81dda462..cdb853876f1 100644 --- a/spec/lib/sidebars/groups/super_sidebar_menus/secure_menu_spec.rb +++ b/spec/lib/sidebars/groups/super_sidebar_menus/secure_menu_spec.rb @@ -17,6 +17,7 @@ RSpec.describe Sidebars::Groups::SuperSidebarMenus::SecureMenu, feature_category expect(items.map(&:item_id)).to eq([ :security_dashboard, :vulnerability_report, + :dependency_list, :audit_events, :compliance, :scan_policies diff --git a/spec/lib/sidebars/groups/super_sidebar_panel_spec.rb b/spec/lib/sidebars/groups/super_sidebar_panel_spec.rb index 5035da9c488..52c3a35a9d7 100644 --- a/spec/lib/sidebars/groups/super_sidebar_panel_spec.rb +++ b/spec/lib/sidebars/groups/super_sidebar_panel_spec.rb @@ -37,6 +37,7 @@ RSpec.describe Sidebars::Groups::SuperSidebarPanel, feature_category: :navigatio Sidebars::Groups::SuperSidebarMenus::CodeMenu, Sidebars::Groups::SuperSidebarMenus::BuildMenu, Sidebars::Groups::SuperSidebarMenus::SecureMenu, + Sidebars::Groups::SuperSidebarMenus::DeployMenu, Sidebars::Groups::SuperSidebarMenus::OperationsMenu, Sidebars::Groups::SuperSidebarMenus::MonitorMenu, Sidebars::Groups::SuperSidebarMenus::AnalyzeMenu, |