diff options
18 files changed, 57 insertions, 36 deletions
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml index 3c315edfff8..40e9b55aa27 100644 --- a/.gitlab/ci/global.gitlab-ci.yml +++ b/.gitlab/ci/global.gitlab-ci.yml @@ -82,19 +82,6 @@ <<: *node-modules-cache policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up. -.assets-cache: &assets-cache - key: "assets-debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-${NODE_ENV}-v5" - # This list should match GITLAB_ASSETS_PATHS_LIST from scripts/gitlab_component_helpers.sh - paths: - - cached-assets-hash.txt - - app/assets/javascripts/locale/**/app.js - - public/assets/ - policy: pull - -.assets-cache-push: &assets-cache-push - <<: *assets-cache - policy: push # We want to rebuild the cache from scratch to ensure stale dependencies are cleaned up. - .assets-tmp-cache: &assets-tmp-cache key: "assets-tmp-debian-${DEBIAN_VERSION}-ruby-${RUBY_VERSION}-node-${NODE_ENV}-v1" paths: diff --git a/app/assets/javascripts/branches/components/delete_branch_modal.vue b/app/assets/javascripts/branches/components/delete_branch_modal.vue index 383fa5f7512..d5631337cec 100644 --- a/app/assets/javascripts/branches/components/delete_branch_modal.vue +++ b/app/assets/javascripts/branches/components/delete_branch_modal.vue @@ -76,7 +76,9 @@ export default { this.$refs.modal.show(); }, submitForm() { - this.$refs.form.submit(); + if (!this.deleteButtonDisabled) { + this.$refs.form.submit(); + } }, closeModal() { this.$refs.modal.hide(); @@ -127,7 +129,7 @@ export default { </div> </gl-alert> - <form ref="form" :action="deletePath" method="post"> + <form ref="form" :action="deletePath" method="post" @submit.prevent> <div v-if="isProtectedBranch" class="gl-mt-4"> <p> <gl-sprintf :message="undoneWarning"> @@ -150,6 +152,7 @@ export default { class="gl-mt-4" aria-labelledby="input-label" autocomplete="off" + @keyup.enter="submitForm" /> </p> </div> diff --git a/app/assets/javascripts/invite_members/components/invite_groups_modal.vue b/app/assets/javascripts/invite_members/components/invite_groups_modal.vue index 2ad4bb1a11a..81f2b34d303 100644 --- a/app/assets/javascripts/invite_members/components/invite_groups_modal.vue +++ b/app/assets/javascripts/invite_members/components/invite_groups_modal.vue @@ -31,6 +31,10 @@ export default { type: String, required: true, }, + fullPath: { + type: String, + required: true, + }, accessLevels: { type: Object, required: true, @@ -155,6 +159,7 @@ export default { :root-group-id="rootId" :invalid-feedback-message="invalidFeedbackMessage" :is-loading="isLoading" + :full-path="fullPath" @reset="resetFields" @submit="sendInvite" > diff --git a/app/assets/javascripts/invite_members/components/invite_members_modal.vue b/app/assets/javascripts/invite_members/components/invite_members_modal.vue index f61e822bf7e..887dad7465b 100644 --- a/app/assets/javascripts/invite_members/components/invite_members_modal.vue +++ b/app/assets/javascripts/invite_members/components/invite_members_modal.vue @@ -98,6 +98,10 @@ export default { type: Array, required: true, }, + fullPath: { + type: String, + required: true, + }, usersLimitDataset: { type: Object, required: false, @@ -376,6 +380,7 @@ export default { :new-users-to-invite="newUsersToInvite" :root-group-id="rootId" :users-limit-dataset="usersLimitDataset" + :full-path="fullPath" @reset="resetFields" @submit="sendInvite" @access-level="onAccessLevelUpdate" diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue index 1ae5045b34f..c5c8442344c 100644 --- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue +++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue @@ -205,7 +205,7 @@ export default { <tr v-for="line in lines" v-once :key="line.line_code" class="line_holder"> <td :class="line.type" - class="diff-line-num old_line gl-border-bottom-0! gl-border-top-0!" + class="diff-line-num old_line gl-border-bottom-0! gl-border-top-0! gl-border-0! gl-rounded-0!" > {{ line.old_line }} </td> @@ -217,7 +217,7 @@ export default { </td> <td :class="line.type" - class="line_content gl-display-table-cell!" + class="line_content gl-display-table-cell! gl-border-0! gl-rounded-0!" v-html="line.rich_text /* eslint-disable-line vue/no-v-html */" ></td> </tr> diff --git a/app/helpers/invite_members_helper.rb b/app/helpers/invite_members_helper.rb index 5d537767eaf..2b99b7ee8cd 100644 --- a/app/helpers/invite_members_helper.rb +++ b/app/helpers/invite_members_helper.rb @@ -29,7 +29,8 @@ module InviteMembersHelper invalid_groups: source.related_group_ids, help_link: help_page_url('user/permissions'), is_project: is_project, - access_levels: member_class.permissible_access_level_roles(current_user, source).to_json + access_levels: member_class.permissible_access_level_roles(current_user, source).to_json, + full_path: source.full_path }.merge(group_select_data(source)) end @@ -39,7 +40,8 @@ module InviteMembersHelper id: source.id, root_id: source.root_ancestor&.id, name: source.name, - default_access_level: Gitlab::Access::GUEST + default_access_level: Gitlab::Access::GUEST, + full_path: source.full_path } if show_invite_members_for_task?(source) diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 47ad8cc826d..cb7cd631859 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -21,8 +21,7 @@ %ul.content-list = render partial: "table" - else - = render Pajamas::CardComponent.new(card_options: { class: 'bg-light gl-mt-3 gl-text-center' }) do |c| - - c.body do - = _("No schedules") + .nothing-here-block + = _("No schedules") #pipeline-take-ownership-modal diff --git a/doc/development/pipelines/performance.md b/doc/development/pipelines/performance.md index 1c6f9d78879..5f2df91edf3 100644 --- a/doc/development/pipelines/performance.md +++ b/doc/development/pipelines/performance.md @@ -54,7 +54,6 @@ This works well for the following reasons: - `update-qa-cache`, defined in [`.gitlab/ci/qa.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/qa.gitlab-ci.yml). - `update-assets-compile-production-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml). - `update-assets-compile-test-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml). - - `update-yarn-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml). - `update-storybook-yarn-cache`, defined in [`.gitlab/ci/frontend.gitlab-ci.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/ci/frontend.gitlab-ci.yml). 1. These jobs can also be forced to run in merge requests with the `pipeline:update-cache` label (this can be useful to warm the caches in a MR that updates the cache keys). diff --git a/doc/operations/incident_management/linked_resources.md b/doc/operations/incident_management/linked_resources.md index a7be867608b..40b2bbdc757 100644 --- a/doc/operations/incident_management/linked_resources.md +++ b/doc/operations/incident_management/linked_resources.md @@ -63,7 +63,7 @@ You can also submit a short description with the link. The description shows instead of the URL in the **Linked resources** section of the incident: ```plaintext -/link https://example.link.us/j/123456789, multiple alerts firing +/link https://example.link.us/j/123456789 multiple alerts firing ``` ### Link Zoom meetings from an incident **(PREMIUM)** diff --git a/doc/user/project/merge_requests/approvals/index.md b/doc/user/project/merge_requests/approvals/index.md index eb460225858..92ff78082e3 100644 --- a/doc/user/project/merge_requests/approvals/index.md +++ b/doc/user/project/merge_requests/approvals/index.md @@ -22,8 +22,10 @@ flexibility: - Specify a list of users who act as [code owners](../../code_owners.md) for specific files, and require their approval before work can merge. -You can configure merge request approvals on a per-project basis, and -[on the group level](../../../group/manage.md#group-merge-request-approval-settings). Administrators of +You can configure merge request approvals on a per-project basis, and some approvals can be configured +[on the group level](../../../group/manage.md#group-merge-request-approval-settings). Support for +group-level settings for merge request approval rules is tracked in this +[epic](https://gitlab.com/groups/gitlab-org/-/epics/4367). Administrators of [GitLab Premium](https://about.gitlab.com/pricing/) and [GitLab Ultimate](https://about.gitlab.com/pricing/) self-managed GitLab instances can also configure approvals diff --git a/qa/Gemfile b/qa/Gemfile index b84a22883d1..543d8cf82b7 100644 --- a/qa/Gemfile +++ b/qa/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' -gem 'gitlab-qa', '~> 8', '>= 8.11.0', require: 'gitlab/qa' +gem 'gitlab-qa', '~> 8', '>= 8.12.0', require: 'gitlab/qa' gem 'activesupport', '~> 6.1.4.7' # This should stay in sync with the root's Gemfile gem 'allure-rspec', '~> 2.19.0' gem 'capybara', '~> 3.38.0' diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index 3ccc5fe9be3..018cd63cb6e 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -100,7 +100,7 @@ GEM gitlab (4.18.0) httparty (~> 0.18) terminal-table (>= 1.5.1) - gitlab-qa (8.11.0) + gitlab-qa (8.12.0) activesupport (~> 6.1) gitlab (~> 4.18.0) http (~> 5.0) @@ -311,7 +311,7 @@ DEPENDENCIES faraday-retry (~> 2.0) fog-core (= 2.1.0) fog-google (~> 1.19) - gitlab-qa (~> 8, >= 8.11.0) + gitlab-qa (~> 8, >= 8.12.0) influxdb-client (~> 2.8) knapsack (~> 4.0) nokogiri (~> 1.13, >= 1.13.9) diff --git a/spec/frontend/branches/components/delete_branch_modal_spec.js b/spec/frontend/branches/components/delete_branch_modal_spec.js index 2b8c8d408c4..c977868ca93 100644 --- a/spec/frontend/branches/components/delete_branch_modal_spec.js +++ b/spec/frontend/branches/components/delete_branch_modal_spec.js @@ -46,6 +46,7 @@ const findDeleteButton = () => wrapper.findByTestId('delete-branch-confirmation- const findCancelButton = () => wrapper.findByTestId('delete-branch-cancel-button'); const findFormInput = () => wrapper.findComponent(GlFormInput); const findForm = () => wrapper.find('form'); +const submitFormSpy = () => jest.spyOn(wrapper.vm.$refs.form, 'submit'); describe('Delete branch modal', () => { const expectedUnmergedWarning = @@ -73,12 +74,10 @@ describe('Delete branch modal', () => { }); it('submits the form when the delete button is clicked', () => { - const submitFormSpy = jest.spyOn(wrapper.vm.$refs.form, 'submit'); - findDeleteButton().trigger('click'); expect(findForm().attributes('action')).toBe(deletePath); - expect(submitFormSpy).toHaveBeenCalled(); + expect(submitFormSpy()).toHaveBeenCalled(); }); it('calls show on the modal when a `openModal` event is received through the event hub', async () => { @@ -136,7 +135,18 @@ describe('Delete branch modal', () => { }); }); - it('opens with the delete button disabled and enables it when branch name is confirmed', async () => { + it('opens with the delete button disabled and doesn`t fire submit when clicked or pressed enter', async () => { + expect(findDeleteButton().props('disabled')).toBe(true); + + findFormInput().vm.$emit('input', 'hello'); + + await waitForPromises(); + + findDeleteButton().trigger('click'); + expect(submitFormSpy()).not.toHaveBeenCalled(); + }); + + it('opens with the delete button disabled and enables it when branch name is confirmed and fires submit', async () => { expect(findDeleteButton().props('disabled')).toBe(true); findFormInput().vm.$emit('input', branchName); @@ -144,6 +154,9 @@ describe('Delete branch modal', () => { await waitForPromises(); expect(findDeleteButton().props('disabled')).not.toBe(true); + + findDeleteButton().trigger('click'); + expect(submitFormSpy()).toHaveBeenCalled(); }); }); diff --git a/spec/frontend/invite_members/components/invite_members_modal_spec.js b/spec/frontend/invite_members/components/invite_members_modal_spec.js index 47be1933ed7..9229854e3ab 100644 --- a/spec/frontend/invite_members/components/invite_members_modal_spec.js +++ b/spec/frontend/invite_members/components/invite_members_modal_spec.js @@ -57,6 +57,7 @@ describe('InviteMembersModal', () => { }, propsData: { usersLimitDataset: {}, + fullPath: 'project', ...propsData, ...props, }, diff --git a/spec/frontend/invite_members/mock_data/group_modal.js b/spec/frontend/invite_members/mock_data/group_modal.js index c8588683885..6b3052b4611 100644 --- a/spec/frontend/invite_members/mock_data/group_modal.js +++ b/spec/frontend/invite_members/mock_data/group_modal.js @@ -7,6 +7,7 @@ export const propsData = { accessLevels: { Guest: 10, Reporter: 20, Developer: 30, Maintainer: 40, Owner: 50 }, defaultAccessLevel: 10, helpLink: 'https://example.com', + fullPath: 'project', }; export const sharedGroup = { id: '981' }; diff --git a/spec/haml_lint/linter/documentation_links_spec.rb b/spec/haml_lint/linter/documentation_links_spec.rb index 49a720700da..380df49cde3 100644 --- a/spec/haml_lint/linter/documentation_links_spec.rb +++ b/spec/haml_lint/linter/documentation_links_spec.rb @@ -17,7 +17,7 @@ RSpec.describe HamlLint::Linter::DocumentationLinks do end context 'when link_to points to the existing file with valid anchor' do - let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'overview'), target: '_blank'" } + let(:haml) { "= link_to 'Description', #{link_pattern}('index.md', anchor: 'user-account'), target: '_blank'" } it { is_expected.not_to report_lint } end diff --git a/spec/helpers/invite_members_helper_spec.rb b/spec/helpers/invite_members_helper_spec.rb index c753d553371..48e94ec7e98 100644 --- a/spec/helpers/invite_members_helper_spec.rb +++ b/spec/helpers/invite_members_helper_spec.rb @@ -21,7 +21,8 @@ RSpec.describe InviteMembersHelper do invalid_groups: project.related_group_ids, help_link: help_page_url('user/permissions'), is_project: 'true', - access_levels: ProjectMember.access_level_roles.to_json + access_levels: ProjectMember.access_level_roles.to_json, + full_path: project.full_path } expect(helper.common_invite_group_modal_data(project, ProjectMember, 'true')).to include(attributes) @@ -56,7 +57,8 @@ RSpec.describe InviteMembersHelper do id: project.id, root_id: project.root_ancestor.id, name: project.name, - default_access_level: Gitlab::Access::GUEST + default_access_level: Gitlab::Access::GUEST, + full_path: project.full_path } expect(helper.common_invite_modal_dataset(project)).to include(attributes) diff --git a/spec/support/helpers/features/invite_members_modal_helper.rb b/spec/support/helpers/features/invite_members_modal_helper.rb index d02ec06d886..13b07ad034a 100644 --- a/spec/support/helpers/features/invite_members_modal_helper.rb +++ b/spec/support/helpers/features/invite_members_modal_helper.rb @@ -14,6 +14,8 @@ module Spec submit_invites end + wait_for_all_requests + page.refresh if refresh end |
