diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-06 00:12:24 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-06 00:12:24 +0000 |
commit | f48ded4221ac830ff354693740cf919052359e00 (patch) | |
tree | 9da7807e75043104cab4892e405fd990f25a1542 /spec | |
parent | ccfa4b271b5a24d350b3389dc1f43b25177d03ed (diff) | |
download | gitlab-ce-f48ded4221ac830ff354693740cf919052359e00.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
28 files changed, 151 insertions, 137 deletions
diff --git a/spec/features/groups/navbar_spec.rb b/spec/features/groups/navbar_spec.rb index 5cc8d1a9712..b140e680012 100644 --- a/spec/features/groups/navbar_spec.rb +++ b/spec/features/groups/navbar_spec.rb @@ -49,7 +49,7 @@ RSpec.describe 'Group navbar' do if Gitlab.ee? insert_customer_relations_nav(_('Analytics')) else - insert_customer_relations_nav(_('Packages & Registries')) + insert_customer_relations_nav(_('Packages and registries')) end visit group_path(group) diff --git a/spec/features/groups/settings/packages_and_registries_spec.rb b/spec/features/groups/settings/packages_and_registries_spec.rb index 81305c777aa..7f3f5775559 100644 --- a/spec/features/groups/settings/packages_and_registries_spec.rb +++ b/spec/features/groups/settings/packages_and_registries_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Group Packages & Registries settings' do +RSpec.describe 'Group Package and registry settings' do include WaitForRequests let(:user) { create(:user) } @@ -25,7 +25,7 @@ RSpec.describe 'Group Packages & Registries settings' do settings_menu = find_settings_menu - expect(settings_menu).not_to have_content 'Packages & Registries' + expect(settings_menu).not_to have_content 'Packages and registries' end it 'renders 404 when navigating to page' do @@ -40,20 +40,20 @@ RSpec.describe 'Group Packages & Registries settings' do visit group_path(group) settings_menu = find_settings_menu - expect(settings_menu).to have_content 'Packages & Registries' + expect(settings_menu).to have_content 'Packages and registries' end it 'has a page title set' do visit_settings_page - expect(page).to have_title _('Package & registry settings') + expect(page).to have_title _('Package and registry settings') end it 'sidebar menu is open' do visit_settings_page sidebar = find('.nav-sidebar') - expect(sidebar).to have_link _('Packages & Registries') + expect(sidebar).to have_link _('Packages and registries') end it 'has a Duplicate packages section', :js do diff --git a/spec/features/groups/settings/user_searches_in_settings_spec.rb b/spec/features/groups/settings/user_searches_in_settings_spec.rb index 998c3d2ca3f..fe0dd7cec9a 100644 --- a/spec/features/groups/settings/user_searches_in_settings_spec.rb +++ b/spec/features/groups/settings/user_searches_in_settings_spec.rb @@ -43,7 +43,7 @@ RSpec.describe 'User searches group settings', :js do it_behaves_like 'can search settings', 'Variables', 'Auto DevOps' end - context 'in Packages & Registries page' do + context 'in Packages and registries page' do before do visit group_settings_packages_and_registries_path(group) end diff --git a/spec/features/projects/navbar_spec.rb b/spec/features/projects/navbar_spec.rb index ec1980193f6..5b5f7860e43 100644 --- a/spec/features/projects/navbar_spec.rb +++ b/spec/features/projects/navbar_spec.rb @@ -49,7 +49,7 @@ RSpec.describe 'Project navbar' do stub_config(pages: { enabled: true }) insert_after_sub_nav_item( - _('Packages & Registries'), + _('Packages and registries'), within: _('Settings'), new_sub_nav_item_name: _('Pages') ) diff --git a/spec/features/projects/settings/registry_settings_cleanup_tags_spec.rb b/spec/features/projects/settings/registry_settings_cleanup_tags_spec.rb index 0fea0c1f37f..85f9a109ed5 100644 --- a/spec/features/projects/settings/registry_settings_cleanup_tags_spec.rb +++ b/spec/features/projects/settings/registry_settings_cleanup_tags_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Project > Settings > Packages & Registries > Container registry tag expiration policy' do +RSpec.describe 'Project > Settings > Packages and registries > Container registry tag expiration policy' do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, namespace: user.namespace) } diff --git a/spec/features/projects/settings/registry_settings_spec.rb b/spec/features/projects/settings/registry_settings_spec.rb index 1fb46c669e7..5d252a86de7 100644 --- a/spec/features/projects/settings/registry_settings_spec.rb +++ b/spec/features/projects/settings/registry_settings_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -RSpec.describe 'Project > Settings > Packages & Registries > Container registry tag expiration policy', :js do +RSpec.describe 'Project > Settings > Packages and registries > Container registry tag expiration policy', :js do let_it_be(:user) { create(:user) } let_it_be(:project, reload: true) { create(:project, namespace: user.namespace) } diff --git a/spec/helpers/page_layout_helper_spec.rb b/spec/helpers/page_layout_helper_spec.rb index d0d399ad10f..1e16d969744 100644 --- a/spec/helpers/page_layout_helper_spec.rb +++ b/spec/helpers/page_layout_helper_spec.rb @@ -222,6 +222,22 @@ RSpec.describe PageLayoutHelper do end end + describe '#full_content_class' do + before do + allow(helper).to receive(:current_user).and_return(build(:user)) + end + + it 'has a content_class set' do + assign(:content_class, '_content_class_') + + expect(helper.full_content_class).to eq 'container-fluid container-limited _content_class_' + end + + it 'has no content_class set' do + expect(helper.full_content_class).to eq 'container-fluid container-limited ' + end + end + describe '#user_status_properties' do let(:user) { build(:user) } diff --git a/spec/lib/gitlab/import_export/group/object_builder_spec.rb b/spec/lib/gitlab/import_export/group/object_builder_spec.rb index 09f40199b31..25d9858dd4c 100644 --- a/spec/lib/gitlab/import_export/group/object_builder_spec.rb +++ b/spec/lib/gitlab/import_export/group/object_builder_spec.rb @@ -6,9 +6,9 @@ RSpec.describe Gitlab::ImportExport::Group::ObjectBuilder do let(:group) { create(:group) } let(:base_attributes) do { - 'title' => 'title', + 'title' => 'title', 'description' => 'description', - 'group' => group + 'group' => group } end diff --git a/spec/lib/gitlab/import_export/group/relation_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/group/relation_tree_restorer_spec.rb index 2f1e2dd2db4..5e84284a060 100644 --- a/spec/lib/gitlab/import_export/group/relation_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/group/relation_tree_restorer_spec.rb @@ -33,15 +33,15 @@ RSpec.describe Gitlab::ImportExport::Group::RelationTreeRestorer do let(:relation_tree_restorer) do described_class.new( - user: user, - shared: shared, - relation_reader: relation_reader, - object_builder: Gitlab::ImportExport::Group::ObjectBuilder, - members_mapper: members_mapper, - relation_factory: Gitlab::ImportExport::Group::RelationFactory, - reader: reader, - importable: importable, - importable_path: nil, + user: user, + shared: shared, + relation_reader: relation_reader, + object_builder: Gitlab::ImportExport::Group::ObjectBuilder, + members_mapper: members_mapper, + relation_factory: Gitlab::ImportExport::Group::RelationFactory, + reader: reader, + importable: importable, + importable_path: nil, importable_attributes: attributes ) end diff --git a/spec/lib/gitlab/import_export/project/relation_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project/relation_tree_restorer_spec.rb index b7b652005e9..ac646087a95 100644 --- a/spec/lib/gitlab/import_export/project/relation_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project/relation_tree_restorer_spec.rb @@ -21,15 +21,15 @@ RSpec.describe Gitlab::ImportExport::Project::RelationTreeRestorer do let(:reader) { Gitlab::ImportExport::Reader.new(shared: shared) } let(:relation_tree_restorer) do described_class.new( - user: user, - shared: shared, - relation_reader: relation_reader, - object_builder: Gitlab::ImportExport::Project::ObjectBuilder, - members_mapper: members_mapper, - relation_factory: Gitlab::ImportExport::Project::RelationFactory, - reader: reader, - importable: importable, - importable_path: 'project', + user: user, + shared: shared, + relation_reader: relation_reader, + object_builder: Gitlab::ImportExport::Project::ObjectBuilder, + members_mapper: members_mapper, + relation_factory: Gitlab::ImportExport::Project::RelationFactory, + reader: reader, + importable: importable, + importable_path: 'project', importable_attributes: attributes ) end diff --git a/spec/lib/gitlab/import_export/project/sample/relation_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project/sample/relation_tree_restorer_spec.rb index 3dab84af744..d1fe9b80062 100644 --- a/spec/lib/gitlab/import_export/project/sample/relation_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project/sample/relation_tree_restorer_spec.rb @@ -21,15 +21,15 @@ RSpec.describe Gitlab::ImportExport::Project::Sample::RelationTreeRestorer do let(:relation_reader) { Gitlab::ImportExport::Json::NdjsonReader.new(path) } let(:sample_data_relation_tree_restorer) do described_class.new( - user: user, - shared: shared, - relation_reader: relation_reader, - object_builder: Gitlab::ImportExport::Project::ObjectBuilder, - members_mapper: members_mapper, - relation_factory: Gitlab::ImportExport::Project::Sample::RelationFactory, - reader: reader, - importable: importable, - importable_path: 'project', + user: user, + shared: shared, + relation_reader: relation_reader, + object_builder: Gitlab::ImportExport::Project::ObjectBuilder, + members_mapper: members_mapper, + relation_factory: Gitlab::ImportExport::Project::Sample::RelationFactory, + reader: reader, + importable: importable, + importable_path: 'project', importable_attributes: attributes ) end diff --git a/spec/lib/gitlab/import_sources_spec.rb b/spec/lib/gitlab/import_sources_spec.rb index f42a109aa3a..41ffcece221 100644 --- a/spec/lib/gitlab/import_sources_spec.rb +++ b/spec/lib/gitlab/import_sources_spec.rb @@ -7,17 +7,17 @@ RSpec.describe Gitlab::ImportSources do it 'returns a hash' do expected = { - 'GitHub' => 'github', - 'Bitbucket Cloud' => 'bitbucket', - 'Bitbucket Server' => 'bitbucket_server', - 'GitLab.com' => 'gitlab', - 'Google Code' => 'google_code', - 'FogBugz' => 'fogbugz', + 'GitHub' => 'github', + 'Bitbucket Cloud' => 'bitbucket', + 'Bitbucket Server' => 'bitbucket_server', + 'GitLab.com' => 'gitlab', + 'Google Code' => 'google_code', + 'FogBugz' => 'fogbugz', 'Repository by URL' => 'git', - 'GitLab export' => 'gitlab_project', - 'Gitea' => 'gitea', - 'Manifest file' => 'manifest', - 'Phabricator' => 'phabricator' + 'GitLab export' => 'gitlab_project', + 'Gitea' => 'gitea', + 'Manifest file' => 'manifest', + 'Phabricator' => 'phabricator' } expect(described_class.options).to eq(expected) diff --git a/spec/lib/gitlab/instrumentation_helper_spec.rb b/spec/lib/gitlab/instrumentation_helper_spec.rb index 4fa9079144d..d5ff39767c4 100644 --- a/spec/lib/gitlab/instrumentation_helper_spec.rb +++ b/spec/lib/gitlab/instrumentation_helper_spec.rb @@ -140,13 +140,13 @@ RSpec.describe Gitlab::InstrumentationHelper do subject expect(payload).to include(db_replica_count: 0, - db_replica_cached_count: 0, - db_primary_count: 0, - db_primary_cached_count: 0, - db_primary_wal_count: 0, - db_replica_wal_count: 0, - db_primary_wal_cached_count: 0, - db_replica_wal_cached_count: 0) + db_replica_cached_count: 0, + db_primary_count: 0, + db_primary_cached_count: 0, + db_primary_wal_count: 0, + db_replica_wal_count: 0, + db_primary_wal_cached_count: 0, + db_replica_wal_cached_count: 0) end context 'when replica caught up search was made' do diff --git a/spec/lib/gitlab/jira/middleware_spec.rb b/spec/lib/gitlab/jira/middleware_spec.rb index 1d1f7368534..09cf67d0657 100644 --- a/spec/lib/gitlab/jira/middleware_spec.rb +++ b/spec/lib/gitlab/jira/middleware_spec.rb @@ -24,7 +24,7 @@ RSpec.describe Gitlab::Jira::Middleware do describe '#call' do it 'adjusts HTTP_AUTHORIZATION env when request from Jira DVCS user agent' do expect(app).to receive(:call).with({ 'HTTP_USER_AGENT' => jira_user_agent, - 'HTTP_AUTHORIZATION' => 'Bearer hash-123' }) + 'HTTP_AUTHORIZATION' => 'Bearer hash-123' }) middleware.call('HTTP_USER_AGENT' => jira_user_agent, 'HTTP_AUTHORIZATION' => 'token hash-123') end diff --git a/spec/lib/gitlab/markdown_cache/active_record/extension_spec.rb b/spec/lib/gitlab/markdown_cache/active_record/extension_spec.rb index 81910773dfa..57f2b1cfd96 100644 --- a/spec/lib/gitlab/markdown_cache/active_record/extension_spec.rb +++ b/spec/lib/gitlab/markdown_cache/active_record/extension_spec.rb @@ -174,8 +174,8 @@ RSpec.describe Gitlab::MarkdownCache::ActiveRecord::Extension do expect(thing).to receive(:update_columns) .with({ "title_html" => updated_html, - "description_html" => "", - "cached_markdown_version" => cache_version }) + "description_html" => "", + "cached_markdown_version" => cache_version }) thing.refresh_markdown_cache! end diff --git a/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb b/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb index c15e717b126..bc6cd383758 100644 --- a/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/importers/prometheus_metrics_spec.rb @@ -24,13 +24,13 @@ RSpec.describe Gitlab::Metrics::Dashboard::Importers::PrometheusMetrics do context 'with existing metrics' do let(:existing_metric_attributes) do { - project: project, - identifier: 'metric_b', - title: 'overwrite', - y_label: 'overwrite', - query: 'overwrite', - unit: 'overwrite', - legend: 'overwrite', + project: project, + identifier: 'metric_b', + title: 'overwrite', + y_label: 'overwrite', + query: 'overwrite', + unit: 'overwrite', + legend: 'overwrite', dashboard_path: dashboard_path } end @@ -43,11 +43,11 @@ RSpec.describe Gitlab::Metrics::Dashboard::Importers::PrometheusMetrics do subject.execute expect(existing_metric.reload.attributes.with_indifferent_access).to include({ - title: 'Super Chart B', + title: 'Super Chart B', y_label: 'y_label', - query: 'query', - unit: 'unit', - legend: 'Legend Label' + query: 'query', + unit: 'unit', + legend: 'Legend Label' }) end @@ -69,11 +69,11 @@ RSpec.describe Gitlab::Metrics::Dashboard::Importers::PrometheusMetrics do subject.execute expect(existing_metric.reload.attributes.with_indifferent_access).to include({ - title: 'Super Chart B', + title: 'Super Chart B', y_label: 'y_label', - query: 'query', - unit: 'unit', - legend: 'Legend Label' + query: 'query', + unit: 'unit', + legend: 'Legend Label' }) end diff --git a/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb b/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb index fdbba6c31b5..a50c2a506cb 100644 --- a/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/validator/errors_spec.rb @@ -17,11 +17,11 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => 'schema', - 'details' => details + 'type' => type, + 'schema' => 'schema', + 'details' => details } end @@ -72,10 +72,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'pattern' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'pattern' => 'aa.*' } + 'type' => type, + 'schema' => { 'pattern' => 'aa.*' } } end @@ -86,10 +86,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'format' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'format' => 'date-time' } + 'type' => type, + 'schema' => { 'format' => 'date-time' } } end @@ -100,10 +100,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'const' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'const' => 'one' } + 'type' => type, + 'schema' => { 'const' => 'one' } } end @@ -114,10 +114,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'enum' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => { 'enum' => %w(one two) } + 'type' => type, + 'schema' => { 'enum' => %w(one two) } } end @@ -128,10 +128,10 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator::Errors do let(:type) { 'unknown' } let(:error_hash) do { - 'data' => 'property_name', + 'data' => 'property_name', 'data_pointer' => pointer, - 'type' => type, - 'schema' => 'schema' + 'type' => type, + 'schema' => 'schema' } end diff --git a/spec/lib/gitlab/metrics/dashboard/validator_spec.rb b/spec/lib/gitlab/metrics/dashboard/validator_spec.rb index eb67ea2b7da..aaa9daf8fee 100644 --- a/spec/lib/gitlab/metrics/dashboard/validator_spec.rb +++ b/spec/lib/gitlab/metrics/dashboard/validator_spec.rb @@ -33,9 +33,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in current dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'test/path.yml', - project: project + project: project ) end @@ -45,9 +45,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in another dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'some/other/dashboard/path.yml', - project: project + project: project ) end @@ -94,9 +94,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in current dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'test/path.yml', - project: project + project: project ) end @@ -106,9 +106,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in another dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'some/other/dashboard/path.yml', - project: project + project: project ) end @@ -166,9 +166,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in current dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'test/path.yml', - project: project + project: project ) end @@ -178,9 +178,9 @@ RSpec.describe Gitlab::Metrics::Dashboard::Validator do context 'with metric identifier present in another dashboard' do before do create(:prometheus_metric, - identifier: 'metric_a1', + identifier: 'metric_a1', dashboard_path: 'some/other/dashboard/path.yml', - project: project + project: project ) end diff --git a/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb b/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb index 3396de9b12c..ed78548ef62 100644 --- a/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb +++ b/spec/lib/gitlab/metrics/requests_rack_middleware_spec.rb @@ -194,9 +194,8 @@ RSpec.describe Gitlab::Metrics::RequestsRackMiddleware, :aggregate_failures do let(:endpoint) do route = double(:route, request_method: 'GET', path: '/:version/projects/:id/archive(.:format)') - double(:endpoint, route: route, - options: { for: api_handler, path: [":id/archive"] }, - namespace: "/projects") + double(:endpoint, + route: route, options: { for: api_handler, path: [":id/archive"] }, namespace: "/projects") end let(:env) { { 'api.endpoint' => endpoint, 'REQUEST_METHOD' => 'GET' } } @@ -256,9 +255,8 @@ RSpec.describe Gitlab::Metrics::RequestsRackMiddleware, :aggregate_failures do context 'Grape API without expected duration' do let(:endpoint) do route = double(:route, request_method: 'GET', path: '/:version/projects/:id/archive(.:format)') - double(:endpoint, route: route, - options: { for: api_handler, path: [":id/archive"] }, - namespace: "/projects") + double(:endpoint, + route: route, options: { for: api_handler, path: [":id/archive"] }, namespace: "/projects") end let(:env) { { 'api.endpoint' => endpoint, 'REQUEST_METHOD' => 'GET' } } diff --git a/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb b/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb index adbc474343f..67cd8630758 100644 --- a/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb +++ b/spec/lib/gitlab/metrics/subscribers/action_view_spec.rb @@ -12,7 +12,7 @@ RSpec.describe Gitlab::Metrics::Subscribers::ActionView do root = Rails.root.to_s double(:event, duration: 2.1, - payload: { identifier: "#{root}/app/views/x.html.haml" }) + payload: { identifier: "#{root}/app/views/x.html.haml" }) end before do diff --git a/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb b/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb index 28c3ef229ab..005c1ae2d0a 100644 --- a/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb +++ b/spec/lib/gitlab/metrics/subscribers/active_record_spec.rb @@ -137,7 +137,7 @@ RSpec.describe Gitlab::Metrics::Subscribers::ActiveRecord do :event, name: 'transaction.active_record', duration: 230, - payload: { connection: connection } + payload: { connection: connection } ) end @@ -213,7 +213,7 @@ RSpec.describe Gitlab::Metrics::Subscribers::ActiveRecord do :event, name: 'sql.active_record', duration: 2, - payload: payload + payload: payload ) end @@ -278,7 +278,7 @@ RSpec.describe Gitlab::Metrics::Subscribers::ActiveRecord do :event, name: 'sql.active_record', duration: 2, - payload: payload + payload: payload ) end diff --git a/spec/lib/gitlab/metrics/subscribers/load_balancing_spec.rb b/spec/lib/gitlab/metrics/subscribers/load_balancing_spec.rb index bc6effd0438..7f7efaffd9e 100644 --- a/spec/lib/gitlab/metrics/subscribers/load_balancing_spec.rb +++ b/spec/lib/gitlab/metrics/subscribers/load_balancing_spec.rb @@ -15,7 +15,7 @@ RSpec.describe Gitlab::Metrics::Subscribers::LoadBalancing, :request_store do double( :event, name: 'load_balancing.caught_up_replica_pick', - payload: payload + payload: payload ) end @@ -37,7 +37,7 @@ RSpec.describe Gitlab::Metrics::Subscribers::LoadBalancing, :request_store do double( :event, name: 'load_balancing.web_transaction_completed', - payload: {} + payload: {} ) end diff --git a/spec/lib/sidebars/groups/menus/settings_menu_spec.rb b/spec/lib/sidebars/groups/menus/settings_menu_spec.rb index 252da8ea699..4e3c639672b 100644 --- a/spec/lib/sidebars/groups/menus/settings_menu_spec.rb +++ b/spec/lib/sidebars/groups/menus/settings_menu_spec.rb @@ -80,7 +80,7 @@ RSpec.describe Sidebars::Groups::Menus::SettingsMenu do it_behaves_like 'access rights checks' end - describe 'Packages & Registries' do + describe 'Packages and registries' do let(:item_id) { :packages_and_registries } before do diff --git a/spec/lib/sidebars/projects/menus/settings_menu_spec.rb b/spec/lib/sidebars/projects/menus/settings_menu_spec.rb index f41f7a01d88..904b9f041b1 100644 --- a/spec/lib/sidebars/projects/menus/settings_menu_spec.rb +++ b/spec/lib/sidebars/projects/menus/settings_menu_spec.rb @@ -133,7 +133,7 @@ RSpec.describe Sidebars::Projects::Menus::SettingsMenu do end end - describe 'Packages & Registries' do + describe 'Packages and registries' do let(:item_id) { :packages_and_registries } let(:packages_enabled) { false } diff --git a/spec/support/helpers/navbar_structure_helper.rb b/spec/support/helpers/navbar_structure_helper.rb index e11548d0b75..3d51c022b39 100644 --- a/spec/support/helpers/navbar_structure_helper.rb +++ b/spec/support/helpers/navbar_structure_helper.rb @@ -34,7 +34,7 @@ module NavbarStructureHelper insert_after_nav_item( within, new_nav_item: { - nav_item: _('Packages & Registries'), + nav_item: _('Packages and registries'), nav_sub_items: [_('Package Registry')] } ) @@ -56,7 +56,7 @@ module NavbarStructureHelper def insert_container_nav insert_after_sub_nav_item( _('Package Registry'), - within: _('Packages & Registries'), + within: _('Packages and registries'), new_sub_nav_item_name: _('Container Registry') ) end @@ -64,7 +64,7 @@ module NavbarStructureHelper def insert_dependency_proxy_nav insert_after_sub_nav_item( _('Package Registry'), - within: _('Packages & Registries'), + within: _('Packages and registries'), new_sub_nav_item_name: _('Dependency Proxy') ) end @@ -72,7 +72,7 @@ module NavbarStructureHelper def insert_infrastructure_registry_nav insert_after_sub_nav_item( _('Package Registry'), - within: _('Packages & Registries'), + within: _('Packages and registries'), new_sub_nav_item_name: _('Infrastructure Registry') ) end @@ -80,7 +80,7 @@ module NavbarStructureHelper def insert_harbor_registry_nav(within) insert_after_sub_nav_item( within, - within: _('Packages & Registries'), + within: _('Packages and registries'), new_sub_nav_item_name: _('Harbor Registry') ) end diff --git a/spec/support/shared_contexts/navbar_structure_context.rb b/spec/support/shared_contexts/navbar_structure_context.rb index 0b36a2e615a..6543fc327d2 100644 --- a/spec/support/shared_contexts/navbar_structure_context.rb +++ b/spec/support/shared_contexts/navbar_structure_context.rb @@ -110,7 +110,7 @@ RSpec.shared_context 'project navbar structure' do _('Access Tokens'), _('Repository'), _('CI/CD'), - _('Packages & Registries'), + _('Packages and registries'), _('Monitor'), s_('UsageQuota|Usage Quotas') ] @@ -139,7 +139,7 @@ RSpec.shared_context 'group navbar structure' do _('Repository'), _('CI/CD'), _('Applications'), - _('Packages & Registries') + _('Packages and registries') ] } end diff --git a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb index 428e9cc8490..472a2f3cb34 100644 --- a/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_group.html.haml_spec.rb @@ -109,7 +109,7 @@ RSpec.describe 'layouts/nav/sidebar/_group' do end end - describe 'Packages & Registries' do + describe 'Packages and registries' do it 'has a link to the package registry page' do stub_config(packages: { enabled: true }) @@ -178,10 +178,10 @@ RSpec.describe 'layouts/nav/sidebar/_group' do expect(rendered).to have_link('Applications', href: group_settings_applications_path(group)) end - it 'has a link to the Package & Registries settings page' do + it 'has a link to the Package and registry settings page' do render - expect(rendered).to have_link('Packages & Registries', href: group_settings_packages_and_registries_path(group)) + expect(rendered).to have_link('Packages and registries', href: group_settings_packages_and_registries_path(group)) end end end diff --git a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb index 9ae3f814679..f5cd5679270 100644 --- a/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb +++ b/spec/views/layouts/nav/sidebar/_project.html.haml_spec.rb @@ -559,7 +559,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do it 'top level navigation link is visible and points to package registry page' do render - expect(rendered).to have_link('Packages & Registries', href: project_packages_path(project)) + expect(rendered).to have_link('Packages and registries', href: project_packages_path(project)) end describe 'Packages Registry' do @@ -908,7 +908,7 @@ RSpec.describe 'layouts/nav/sidebar/_project' do end end - describe 'Packages & Registries' do + describe 'Packages and registries' do let(:packages_enabled) { false } before do @@ -919,20 +919,20 @@ RSpec.describe 'layouts/nav/sidebar/_project' do context 'when registry is enabled' do let(:registry_enabled) { true } - it 'has a link to the Packages & Registries settings' do + it 'has a link to the Package and registry settings' do render - expect(rendered).to have_link('Packages & Registries', href: project_settings_packages_and_registries_path(project)) + expect(rendered).to have_link('Packages and registries', href: project_settings_packages_and_registries_path(project)) end end context 'when registry is not enabled' do let(:registry_enabled) { false } - it 'does not have a link to the Packages & Registries settings' do + it 'does not have a link to the Package and registry settings' do render - expect(rendered).not_to have_link('Packages & Registries', href: project_settings_packages_and_registries_path(project)) + expect(rendered).not_to have_link('Packages and registries', href: project_settings_packages_and_registries_path(project)) end end @@ -940,10 +940,10 @@ RSpec.describe 'layouts/nav/sidebar/_project' do let(:registry_enabled) { false } let(:packages_enabled) { true } - it 'has a link to the Packages & Registries settings' do + it 'has a link to the Package and registry settings' do render - expect(rendered).to have_link('Packages & Registries', href: project_settings_packages_and_registries_path(project)) + expect(rendered).to have_link('Packages and registries', href: project_settings_packages_and_registries_path(project)) end end end |