diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-04 06:10:20 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-04 06:10:20 +0000 |
commit | 04a893be75405b262c0899bd09eb79438210e632 (patch) | |
tree | 8f2a484a11f1e356f785d69cdb5d5ca1ec3c7f18 | |
parent | f43a2dcce99f18a1580062407b7028a382433241 (diff) | |
download | gitlab-ce-04a893be75405b262c0899bd09eb79438210e632.tar.gz |
Add latest changes from gitlab-org/gitlab@master
16 files changed, 265 insertions, 179 deletions
diff --git a/app/assets/javascripts/issuable_list/components/issuable_list_root.vue b/app/assets/javascripts/issuable_list/components/issuable_list_root.vue index 6b95c3a578e..45584205be0 100644 --- a/app/assets/javascripts/issuable_list/components/issuable_list_root.vue +++ b/app/assets/javascripts/issuable_list/components/issuable_list_root.vue @@ -274,44 +274,47 @@ export default { <gl-skeleton-loading /> </li> </ul> - <component - :is="issuablesWrapper" - v-if="!issuablesLoading && issuables.length" - class="content-list issuable-list issues-list" - :class="{ 'manual-ordering': isManualOrdering }" - v-bind="$options.vueDraggableAttributes" - @update="handleVueDraggableUpdate" - > - <issuable-item - v-for="issuable in issuables" - :key="issuableId(issuable)" - :class="{ 'gl-cursor-grab': isManualOrdering }" - :issuable-symbol="issuableSymbol" - :issuable="issuable" - :enable-label-permalinks="enableLabelPermalinks" - :label-filter-param="labelFilterParam" - :show-checkbox="showBulkEditSidebar" - :checked="issuableChecked(issuable)" - @checked-input="handleIssuableCheckedInput(issuable, $event)" + <template v-else> + <component + :is="issuablesWrapper" + v-if="issuables.length > 0" + class="content-list issuable-list issues-list" + :class="{ 'manual-ordering': isManualOrdering }" + v-bind="$options.vueDraggableAttributes" + @update="handleVueDraggableUpdate" > - <template #reference> - <slot name="reference" :issuable="issuable"></slot> - </template> - <template #author> - <slot name="author" :author="issuable.author"></slot> - </template> - <template #timeframe> - <slot name="timeframe" :issuable="issuable"></slot> - </template> - <template #status> - <slot name="status" :issuable="issuable"></slot> - </template> - <template #statistics> - <slot name="statistics" :issuable="issuable"></slot> - </template> - </issuable-item> - </component> - <slot v-if="!issuablesLoading && !issuables.length" name="empty-state"></slot> + <issuable-item + v-for="issuable in issuables" + :key="issuableId(issuable)" + :class="{ 'gl-cursor-grab': isManualOrdering }" + :issuable-symbol="issuableSymbol" + :issuable="issuable" + :enable-label-permalinks="enableLabelPermalinks" + :label-filter-param="labelFilterParam" + :show-checkbox="showBulkEditSidebar" + :checked="issuableChecked(issuable)" + @checked-input="handleIssuableCheckedInput(issuable, $event)" + > + <template #reference> + <slot name="reference" :issuable="issuable"></slot> + </template> + <template #author> + <slot name="author" :author="issuable.author"></slot> + </template> + <template #timeframe> + <slot name="timeframe" :issuable="issuable"></slot> + </template> + <template #status> + <slot name="status" :issuable="issuable"></slot> + </template> + <template #statistics> + <slot name="statistics" :issuable="issuable"></slot> + </template> + </issuable-item> + </component> + <slot v-else name="empty-state"></slot> + </template> + <gl-pagination v-if="showPaginationControls" :per-page="defaultPageSize" diff --git a/app/assets/javascripts/issuable_list/components/issuable_tabs.vue b/app/assets/javascripts/issuable_list/components/issuable_tabs.vue index 6bc621b52e6..dfe158ae2b0 100644 --- a/app/assets/javascripts/issuable_list/components/issuable_tabs.vue +++ b/app/assets/javascripts/issuable_list/components/issuable_tabs.vue @@ -48,12 +48,13 @@ export default { <template #title> <span :title="tab.titleTooltip">{{ tab.title }}</span> <gl-badge - v-if="isTabCountNumeric(tab)" + v-if="tabCounts && isTabCountNumeric(tab)" variant="neutral" size="sm" class="gl-tab-counter-badge" - >{{ tabCounts[tab.name] }}</gl-badge > + {{ tabCounts[tab.name] }} + </gl-badge> </template> </gl-tab> </gl-tabs> diff --git a/app/assets/javascripts/projects/commit/components/commit_options_dropdown.vue b/app/assets/javascripts/projects/commit/components/commit_options_dropdown.vue index d96d1035ed0..0fd31381ba6 100644 --- a/app/assets/javascripts/projects/commit/components/commit_options_dropdown.vue +++ b/app/assets/javascripts/projects/commit/components/commit_options_dropdown.vue @@ -65,6 +65,7 @@ export default { <gl-dropdown-item v-if="canRevert" data-testid="revert-link" + data-qa-selector="revert_button" @click="showModal($options.openRevertModal)" > {{ s__('ChangeTypeAction|Revert') }} diff --git a/app/controllers/admin/services_controller.rb b/app/controllers/admin/services_controller.rb index 9f951e838c8..90420a24240 100644 --- a/app/controllers/admin/services_controller.rb +++ b/app/controllers/admin/services_controller.rb @@ -1,9 +1,9 @@ # frozen_string_literal: true class Admin::ServicesController < Admin::ApplicationController - include ServiceParams + include Integrations::Params - before_action :service, only: [:edit, :update] + before_action :integration, only: [:edit, :update] before_action :disable_query_limiting, only: [:index] feature_category :integrations @@ -14,15 +14,15 @@ class Admin::ServicesController < Admin::ApplicationController end def edit - if service.nil? || Service.instance_exists_for?(service.type) + if integration.nil? || Service.instance_exists_for?(integration.type) redirect_to admin_application_settings_services_path, alert: "Service is unknown or it doesn't exist" end end def update - if service.update(service_params[:service]) - PropagateServiceTemplateWorker.perform_async(service.id) if service.active? # rubocop:disable CodeReuse/Worker + if integration.update(integration_params[:integration]) + PropagateServiceTemplateWorker.perform_async(integration.id) if integration.active? # rubocop:disable CodeReuse/Worker redirect_to admin_application_settings_services_path, notice: 'Application settings saved successfully' @@ -34,9 +34,11 @@ class Admin::ServicesController < Admin::ApplicationController private # rubocop: disable CodeReuse/ActiveRecord - def service - @service ||= Service.find_by(id: params[:id], template: true) + def integration + @integration ||= Service.find_by(id: params[:id], template: true) + @service ||= @integration # TODO: https://gitlab.com/gitlab-org/gitlab/-/issues/329759 end + alias_method :service, :integration # rubocop: enable CodeReuse/ActiveRecord def disable_query_limiting diff --git a/app/controllers/concerns/integrations/params.rb b/app/controllers/concerns/integrations/params.rb new file mode 100644 index 00000000000..533b1db4f77 --- /dev/null +++ b/app/controllers/concerns/integrations/params.rb @@ -0,0 +1,105 @@ +# frozen_string_literal: true + +module Integrations + module Params + extend ActiveSupport::Concern + + ALLOWED_PARAMS_CE = [ + :active, + :add_pusher, + :alert_events, + :api_key, + :api_url, + :bamboo_url, + :branches_to_be_notified, + :labels_to_be_notified, + :labels_to_be_notified_behavior, + :build_key, + :build_type, + :ca_pem, + :channel, + :channels, + :color, + :colorize_messages, + :comment_on_event_enabled, + :comment_detail, + :confidential_issues_events, + :confluence_url, + :datadog_site, + :datadog_env, + :datadog_service, + :default_irc_uri, + :device, + :disable_diffs, + :drone_url, + :enable_ssl_verification, + :external_wiki_url, + :google_iap_service_account_json, + :google_iap_audience_client_id, + :inherit_from_id, + # We're using `issues_events` and `merge_requests_events` + # in the view so we still need to explicitly state them + # here. `Service#event_names` would only give + # `issue_events` and `merge_request_events` (singular!) + # See app/helpers/services_helper.rb for how we + # make those event names plural as special case. + :issues_events, + :issues_url, + :jenkins_url, + :jira_issue_transition_automatic, + :jira_issue_transition_id, + :manual_configuration, + :merge_requests_events, + :mock_service_url, + :namespace, + :new_issue_url, + :notify_only_broken_pipelines, + :password, + :priority, + :project_key, + :project_name, + :project_url, + :recipients, + :restrict_to_branch, + :room, + :send_from_committer_email, + :server, + :server_host, + :server_port, + :sound, + :subdomain, + :teamcity_url, + :token, + :type, + :url, + :user_key, + :username, + :webhook + ].freeze + + # Parameters to ignore if no value is specified + FILTER_BLANK_PARAMS = [:password].freeze + + def integration_params + dynamic_params = @integration.event_channel_names + @integration.event_names # rubocop:disable Gitlab/ModuleWithInstanceVariables + allowed = allowed_integration_params + dynamic_params + return_value = params.permit(:id, integration: allowed, service: allowed) + return_value[:integration] ||= return_value.delete(:service) + param_values = return_value[:integration] + + if param_values.is_a?(ActionController::Parameters) + FILTER_BLANK_PARAMS.each do |param| + param_values.delete(param) if param_values[param].blank? + end + end + + return_value + end + + def allowed_integration_params + ALLOWED_PARAMS_CE + end + end +end + +Integrations::Params.prepend_if_ee('EE::Integrations::Params') diff --git a/app/controllers/concerns/integrations_actions.rb b/app/controllers/concerns/integrations_actions.rb index a3ea39d9c3d..f5a3ec913c2 100644 --- a/app/controllers/concerns/integrations_actions.rb +++ b/app/controllers/concerns/integrations_actions.rb @@ -4,7 +4,7 @@ module IntegrationsActions extend ActiveSupport::Concern included do - include ServiceParams + include Integrations::Params before_action :integration, only: [:edit, :update, :test] end @@ -14,7 +14,7 @@ module IntegrationsActions end def update - saved = integration.update(service_params[:service]) + saved = integration.update(integration_params[:integration]) respond_to do |format| format.html do @@ -49,9 +49,7 @@ module IntegrationsActions private def integration - # Using instance variable `@service` still required as it's used in ServiceParams. - # Should be removed once that is refactored to use `@integration`. - @integration = @service ||= find_or_initialize_non_project_specific_integration(params[:id]) # rubocop:disable Gitlab/ModuleWithInstanceVariables + @integration ||= find_or_initialize_non_project_specific_integration(params[:id]) end def success_message diff --git a/app/controllers/concerns/service_params.rb b/app/controllers/concerns/service_params.rb deleted file mode 100644 index 27bbdb5ea75..00000000000 --- a/app/controllers/concerns/service_params.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true - -module ServiceParams - extend ActiveSupport::Concern - - ALLOWED_PARAMS_CE = [ - :active, - :add_pusher, - :alert_events, - :api_key, - :api_url, - :bamboo_url, - :branches_to_be_notified, - :labels_to_be_notified, - :labels_to_be_notified_behavior, - :build_key, - :build_type, - :ca_pem, - :channel, - :channels, - :color, - :colorize_messages, - :comment_on_event_enabled, - :comment_detail, - :confidential_issues_events, - :confluence_url, - :datadog_site, - :datadog_env, - :datadog_service, - :default_irc_uri, - :device, - :disable_diffs, - :drone_url, - :enable_ssl_verification, - :external_wiki_url, - :google_iap_service_account_json, - :google_iap_audience_client_id, - :inherit_from_id, - # We're using `issues_events` and `merge_requests_events` - # in the view so we still need to explicitly state them - # here. `Service#event_names` would only give - # `issue_events` and `merge_request_events` (singular!) - # See app/helpers/services_helper.rb for how we - # make those event names plural as special case. - :issues_events, - :issues_url, - :jenkins_url, - :jira_issue_transition_automatic, - :jira_issue_transition_id, - :manual_configuration, - :merge_requests_events, - :mock_service_url, - :namespace, - :new_issue_url, - :notify_only_broken_pipelines, - :password, - :priority, - :project_key, - :project_name, - :project_url, - :recipients, - :restrict_to_branch, - :room, - :send_from_committer_email, - :server, - :server_host, - :server_port, - :sound, - :subdomain, - :teamcity_url, - :token, - :type, - :url, - :user_key, - :username, - :webhook - ].freeze - - # Parameters to ignore if no value is specified - FILTER_BLANK_PARAMS = [:password].freeze - - def service_params - dynamic_params = @service.event_channel_names + @service.event_names # rubocop:disable Gitlab/ModuleWithInstanceVariables - service_params = params.permit(:id, service: allowed_service_params + dynamic_params) - - if service_params[:service].is_a?(ActionController::Parameters) - FILTER_BLANK_PARAMS.each do |param| - service_params[:service].delete(param) if service_params[:service][param].blank? - end - end - - service_params - end - - def allowed_service_params - ALLOWED_PARAMS_CE - end -end - -ServiceParams.prepend_if_ee('EE::ServiceParams') diff --git a/app/controllers/projects/services_controller.rb b/app/controllers/projects/services_controller.rb index ccb8b393bfe..a30dd735cc3 100644 --- a/app/controllers/projects/services_controller.rb +++ b/app/controllers/projects/services_controller.rb @@ -1,13 +1,13 @@ # frozen_string_literal: true class Projects::ServicesController < Projects::ApplicationController - include ServiceParams + include Integrations::Params include InternalRedirect # Authorize before_action :authorize_admin_project! before_action :ensure_service_enabled - before_action :service + before_action :integration before_action :web_hook_logs, only: [:edit, :update] before_action :set_deprecation_notice_for_prometheus_service, only: [:edit, :update] before_action :redirect_deprecated_prometheus_service, only: [:update] @@ -26,16 +26,15 @@ class Projects::ServicesController < Projects::ApplicationController end def update - @service.attributes = service_params[:service] - @service.inherit_from_id = nil if service_params[:service][:inherit_from_id].blank? + @integration.attributes = integration_params[:integration] + @integration.inherit_from_id = nil if integration_params[:integration][:inherit_from_id].blank? - saved = @service.save(context: :manual_change) + saved = @integration.save(context: :manual_change) respond_to do |format| format.html do if saved - target_url = safe_redirect_path(params[:redirect_to]).presence || edit_project_service_path(@project, @service) - redirect_to target_url, notice: success_message + redirect_to redirect_path, notice: success_message else render 'edit' end @@ -50,7 +49,7 @@ class Projects::ServicesController < Projects::ApplicationController end def test - if @service.can_test? + if integration.can_test? render json: service_test_response, status: :ok else render json: {}, status: :not_found @@ -59,12 +58,16 @@ class Projects::ServicesController < Projects::ApplicationController private + def redirect_path + safe_redirect_path(params[:redirect_to]).presence || edit_project_service_path(@project, @integration) + end + def service_test_response - unless @service.update(service_params[:service]) - return { error: true, message: _('Validations failed.'), service_response: @service.errors.full_messages.join(','), test_failed: false } + unless @integration.update(integration_params[:integration]) + return { error: true, message: _('Validations failed.'), service_response: @integration.errors.full_messages.join(','), test_failed: false } end - result = ::Integrations::Test::ProjectService.new(@service, current_user, params[:event]).execute + result = ::Integrations::Test::ProjectService.new(@integration, current_user, params[:event]).execute unless result[:success] return { error: true, message: s_('Integrations|Connection failed. Please check your settings.'), service_response: result[:message].to_s, test_failed: true } @@ -76,16 +79,18 @@ class Projects::ServicesController < Projects::ApplicationController end def success_message - if @service.active? - s_('Integrations|%{integration} settings saved and active.') % { integration: @service.title } + if integration.active? + s_('Integrations|%{integration} settings saved and active.') % { integration: integration.title } else - s_('Integrations|%{integration} settings saved, but not active.') % { integration: @service.title } + s_('Integrations|%{integration} settings saved, but not active.') % { integration: integration.title } end end - def service - @service ||= @project.find_or_initialize_service(params[:id]) + def integration + @integration ||= @project.find_or_initialize_service(params[:id]) + @service ||= @integration # TODO: remove references to @service end + alias_method :service, :integration def web_hook_logs return unless @service.service_hook.present? @@ -98,17 +103,17 @@ class Projects::ServicesController < Projects::ApplicationController end def serialize_as_json - @service + integration .as_json(only: @service.json_fields) .merge(errors: @service.errors.as_json) end def redirect_deprecated_prometheus_service - redirect_to edit_project_service_path(project, @service) if @service.is_a?(::PrometheusService) && Feature.enabled?(:settings_operations_prometheus_service, project) + redirect_to edit_project_service_path(project, integration) if integration.is_a?(::PrometheusService) && Feature.enabled?(:settings_operations_prometheus_service, project) end def set_deprecation_notice_for_prometheus_service - return if !@service.is_a?(::PrometheusService) || !Feature.enabled?(:settings_operations_prometheus_service, project) + return if !integration.is_a?(::PrometheusService) || !Feature.enabled?(:settings_operations_prometheus_service, project) operations_link_start = "<a href=\"#{project_settings_operations_path(project)}\">" message = s_('PrometheusService|You can now manage your Prometheus settings on the %{operations_link_start}Operations%{operations_link_end} page. Fields on this page has been deprecated.') % { operations_link_start: operations_link_start, operations_link_end: "</a>" } diff --git a/qa/qa/page/main/login.rb b/qa/qa/page/main/login.rb index facd4aaa015..3b3057a9acb 100644 --- a/qa/qa/page/main/login.rb +++ b/qa/qa/page/main/login.rb @@ -50,6 +50,8 @@ module QA return if Page::Main::Menu.perform(&:signed_in?) using_wait_time 0 do + set_initial_password_if_present + if Runtime::User.ldap_user? && user && user.username != Runtime::User.ldap_username raise 'If an LDAP user is provided, it must be used for sign-in', QA::Resource::User::InvalidUserError end @@ -60,7 +62,7 @@ module QA sign_in_using_gitlab_credentials(user: user || Runtime::User, skip_page_validation: skip_page_validation) end - set_initial_password_if_present + set_up_new_password_if_required(user: user, skip_page_validation: skip_page_validation) end end @@ -71,6 +73,7 @@ module QA end using_wait_time 0 do + set_initial_password_if_present sign_in_using_gitlab_credentials(user: admin) end @@ -81,6 +84,8 @@ module QA Page::Main::Menu.perform(&:sign_out_if_signed_in) using_wait_time 0 do + set_initial_password_if_present + switch_to_ldap_tab fill_element :username_field, user.ldap_username @@ -166,12 +171,26 @@ module QA Page::Main::Menu.validate_elements_present! unless skip_page_validation end - def set_initial_password_if_present + # Handle request for password change + # Happens on clean GDK installations when seeded root admin password is expired + # + def set_up_new_password_if_required(user:, skip_page_validation:) return unless has_content?('Set up new password') Profile::Password.perform do |new_password_page| - new_password_page.set_new_password(Runtime::User.password, Runtime::User.password) + password = user&.password || Runtime::User.password + new_password_page.set_new_password(password, password) end + + sign_in_using_credentials(user: user, skip_page_validation: skip_page_validation) + end + + def set_initial_password_if_present + return unless has_content?('Change your password') + + fill_element :password_field, Runtime::User.password + fill_element :password_confirmation_field, Runtime::User.password + click_element :change_password_button end end end diff --git a/qa/qa/page/project/commit/show.rb b/qa/qa/page/project/commit/show.rb index f732eb6565e..bc44a4e5e72 100644 --- a/qa/qa/page/project/commit/show.rb +++ b/qa/qa/page/project/commit/show.rb @@ -11,11 +11,18 @@ module QA view 'app/assets/javascripts/projects/commit/components/commit_options_dropdown.vue' do element :options_button + element :revert_button element :cherry_pick_button element :email_patches element :plain_diff end + def revert_commit + click_element(:options_button) + click_element(:revert_button, Page::Component::CommitModal) + click_element(:submit_commit_button) + end + def cherry_pick_commit click_element(:options_button) click_element(:cherry_pick_button, Page::Component::CommitModal) diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/revert/revert_commit_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/revert/revert_commit_spec.rb new file mode 100644 index 00000000000..089b87be423 --- /dev/null +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/revert/revert_commit_spec.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true + +module QA + RSpec.describe 'Create' do + describe 'Reverting a commit' do + let(:file_name) { "secret_file.md" } + + let(:project) do + Resource::Project.fabricate_via_api! do |project| + project.name = 'project' + project.initialize_with_readme = true + end + end + + let(:commit) do + Resource::Repository::Commit.fabricate_via_api! do |commit| + commit.project = project + commit.commit_message = 'Add new file' + commit.add_files([ + { file_path: file_name, content: 'pssst!' } + ]) + end + end + + before do + Flow::Login.sign_in + commit.visit! + end + + it 'creates a merge request', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1784' do + Page::Project::Commit::Show.perform(&:revert_commit) + Page::MergeRequest::New.perform(&:create_merge_request) + + Page::MergeRequest::Show.perform do |merge_request| + merge_request.click_diffs_tab + expect(merge_request).to have_file(file_name) + end + end + + after do + project.remove_via_api! + end + end + end +end diff --git a/qa/qa/specs/features/browser_ui/3_create/merge_request/revert_spec.rb b/qa/qa/specs/features/browser_ui/3_create/merge_request/revert/reverting_merge_request_spec.rb index 3574cdbe4ac..3574cdbe4ac 100644 --- a/qa/qa/specs/features/browser_ui/3_create/merge_request/revert_spec.rb +++ b/qa/qa/specs/features/browser_ui/3_create/merge_request/revert/reverting_merge_request_spec.rb diff --git a/spec/frontend/create_merge_request_dropdown_spec.js b/spec/frontend/create_merge_request_dropdown_spec.js index 6f15f313325..8878891701f 100644 --- a/spec/frontend/create_merge_request_dropdown_spec.js +++ b/spec/frontend/create_merge_request_dropdown_spec.js @@ -56,7 +56,7 @@ describe('CreateMergeRequestDropdown', () => { describe('updateCreatePaths', () => { it('escapes branch names correctly', () => { dropdown.createBranchPath = `${TEST_HOST}/branches?branch_name=some-branch&issue=42`; - dropdown.createMrPath = `${TEST_HOST}/create_merge_request?branch_name=some-branch&ref=master`; + dropdown.createMrPath = `${TEST_HOST}/create_merge_request?branch_name=some-branch&ref=main`; dropdown.updateCreatePaths('branch', 'contains#hash'); @@ -65,7 +65,7 @@ describe('CreateMergeRequestDropdown', () => { ); expect(dropdown.createMrPath).toBe( - `${TEST_HOST}/create_merge_request?branch_name=contains%23hash&ref=master`, + `${TEST_HOST}/create_merge_request?branch_name=contains%23hash&ref=main`, ); }); }); diff --git a/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js b/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js index eaa3b1c5d53..d175b541edb 100644 --- a/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js +++ b/spec/frontend/merge_conflicts/components/merge_conflict_resolver_app_spec.js @@ -57,7 +57,7 @@ describe('Merge Conflict Resolver App', () => { const title = findConflictsCount(); expect(title.exists()).toBe(true); - expect(title.text().trim()).toBe('Showing 3 conflicts between test-conflicts and master'); + expect(title.text().trim()).toBe('Showing 3 conflicts between test-conflicts and main'); }); describe('files', () => { diff --git a/spec/frontend/merge_conflicts/mock_data.js b/spec/frontend/merge_conflicts/mock_data.js index 8948f2a3c1e..69ba46dbe60 100644 --- a/spec/frontend/merge_conflicts/mock_data.js +++ b/spec/frontend/merge_conflicts/mock_data.js @@ -1,9 +1,9 @@ export const conflictsMock = { - target_branch: 'master', + target_branch: 'main', source_branch: 'test-conflicts', commit_sha: '6dbf385a3c7bf01e09b5d2d9e5d72f8fb8c590a3', commit_message: - "Merge branch 'master' into 'test-conflicts'\n\n# Conflicts:\n# .gitlab-ci.yml\n# README.md", + "Merge branch 'main' into 'test-conflicts'\n\n# Conflicts:\n# .gitlab-ci.yml\n# README.md", files: [ { old_path: '.gitlab-ci.yml', diff --git a/spec/views/shared/nav/_sidebar.html.haml_spec.rb b/spec/views/shared/nav/_sidebar.html.haml_spec.rb index 7c7c7176e0f..cf9452ba68c 100644 --- a/spec/views/shared/nav/_sidebar.html.haml_spec.rb +++ b/spec/views/shared/nav/_sidebar.html.haml_spec.rb @@ -32,7 +32,7 @@ RSpec.describe 'shared/nav/_sidebar.html.haml' do context 'when sidebar has a custom scope menu partial defined' do it 'renders the custom partial' do allow(sidebar).to receive(:render_raw_scope_menu_partial).and_return(scope_menu_view) - allow(sidebar).to receive(:scope_menu).and_return(nil) + allow(view).to receive(:scope_menu).and_return(nil) stub_template(scope_menu_partial => content) render |