From bd4eece38d24e421c8745c365f94be756589e892 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 5 Aug 2020 06:09:36 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- .../boards/components/project_select.vue | 2 +- .../add_extra_tokens_for_merge_requests.js | 60 +++- .../available_dropdown_mappings.js | 2 +- app/assets/javascripts/project_select.js | 2 +- .../javascripts/vue_shared/constants.js | 4 +- ...e_cluster_applications_artifact_service.rb | 2 + app/views/projects/hooks/index.html.haml | 3 +- ...ve-buttons-in-settings-webhooks-to-the.yml | 5 + .../unreleased/jivanvl-update-date-units.yml | 5 + .../graphql/reference/gitlab_schema.graphql | 122 +++++++ doc/api/graphql/reference/gitlab_schema.json | 322 ++++++++++++++++++ doc/api/graphql/reference/index.md | 20 ++ doc/development/documentation/styleguide.md | 8 +- locale/gitlab.pot | 18 +- qa/qa/page/project/issue/show.rb | 17 - ...notation.rb => add_design_content_spec.rb} | 19 +- spec/features/groups/issues_spec.rb | 2 - .../helm/helm_list_v2_empty_blob.json.gz | Bin 0 -> 81 bytes ...ster_applications_artifact_service_spec.rb | 11 + 19 files changed, 564 insertions(+), 60 deletions(-) create mode 100644 changelogs/unreleased/222333-ux-pajamas-implementation-move-buttons-in-settings-webhooks-to-the.yml create mode 100644 changelogs/unreleased/jivanvl-update-date-units.yml rename qa/qa/specs/features/browser_ui/3_create/design_management/{add_design_add_annotation.rb => add_design_content_spec.rb} (50%) create mode 100644 spec/fixtures/helm/helm_list_v2_empty_blob.json.gz diff --git a/app/assets/javascripts/boards/components/project_select.vue b/app/assets/javascripts/boards/components/project_select.vue index ef081f0f470..598e92726c1 100644 --- a/app/assets/javascripts/boards/components/project_select.vue +++ b/app/assets/javascripts/boards/components/project_select.vue @@ -64,10 +64,10 @@ export default { this.groupId, term, { - search_namespaces: true, with_issues_enabled: true, with_shared: false, include_subgroups: true, + order_by: 'similarity', ...additionalAttrs, }, projects => { diff --git a/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js b/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js index 9440015b32e..80f78c154ee 100644 --- a/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js +++ b/app/assets/javascripts/filtered_search/add_extra_tokens_for_merge_requests.js @@ -1,21 +1,55 @@ import { __ } from '~/locale'; export default IssuableTokenKeys => { - const wipToken = { - formattedKey: __('WIP'), - key: 'wip', - type: 'string', - param: '', - symbol: '', - icon: 'admin', - tag: __('Yes or No'), - lowercaseValueOnSubmit: true, - uppercaseTokenName: true, - capitalizeTokenValue: true, + const draftToken = { + token: { + formattedKey: __('Draft'), + key: 'draft', + type: 'string', + param: '', + symbol: '', + icon: 'admin', + tag: __('Yes or No'), + lowercaseValueOnSubmit: true, + capitalizeTokenValue: true, + }, + conditions: [ + { + url: 'wip=yes', + // eslint-disable-next-line @gitlab/require-i18n-strings + replacementUrl: 'draft=yes', + tokenKey: 'draft', + value: __('Yes'), + operator: '=', + }, + { + url: 'wip=no', + // eslint-disable-next-line @gitlab/require-i18n-strings + replacementUrl: 'draft=no', + tokenKey: 'draft', + value: __('No'), + operator: '=', + }, + { + url: 'not[wip]=yes', + replacementUrl: 'not[draft]=yes', + tokenKey: 'draft', + value: __('Yes'), + operator: '!=', + }, + { + url: 'not[wip]=no', + replacementUrl: 'not[draft]=no', + tokenKey: 'draft', + value: __('No'), + operator: '!=', + }, + ], }; - IssuableTokenKeys.tokenKeys.push(wipToken); - IssuableTokenKeys.tokenKeysWithAlternative.push(wipToken); + IssuableTokenKeys.tokenKeys.push(draftToken.token); + IssuableTokenKeys.tokenKeysWithAlternative.push(draftToken.token); + IssuableTokenKeys.conditions.push(...draftToken.conditions); const targetBranchToken = { formattedKey: __('Target-Branch'), diff --git a/app/assets/javascripts/filtered_search/available_dropdown_mappings.js b/app/assets/javascripts/filtered_search/available_dropdown_mappings.js index 692b41da965..49bd3cda127 100644 --- a/app/assets/javascripts/filtered_search/available_dropdown_mappings.js +++ b/app/assets/javascripts/filtered_search/available_dropdown_mappings.js @@ -106,7 +106,7 @@ export default class AvailableDropdownMappings { gl: DropdownEmoji, element: this.container.querySelector('#js-dropdown-my-reaction'), }, - wip: { + draft: { reference: null, gl: DropdownNonUser, element: this.container.querySelector('#js-dropdown-wip'), diff --git a/app/assets/javascripts/project_select.js b/app/assets/javascripts/project_select.js index 2b2c365dd54..788553636f9 100644 --- a/app/assets/javascripts/project_select.js +++ b/app/assets/javascripts/project_select.js @@ -54,11 +54,11 @@ const projectSelect = () => { this.groupId, query.term, { - search_namespaces: true, with_issues_enabled: this.withIssuesEnabled, with_merge_requests_enabled: this.withMergeRequestsEnabled, with_shared: this.withShared, include_subgroups: this.includeProjectsInSubgroups, + order_by: 'similarity', }, projectsCallback, ); diff --git a/app/assets/javascripts/vue_shared/constants.js b/app/assets/javascripts/vue_shared/constants.js index 235beb1f22d..5511145fba2 100644 --- a/app/assets/javascripts/vue_shared/constants.js +++ b/app/assets/javascripts/vue_shared/constants.js @@ -41,13 +41,13 @@ export const timeRanges = [ interval: INTERVALS.hour, }, { - label: __('1 week'), + label: __('7 days'), duration: { seconds: 60 * 60 * 24 * 7 * 1 }, name: 'oneWeek', interval: INTERVALS.day, }, { - label: __('1 month'), + label: __('30 days'), duration: { seconds: 60 * 60 * 24 * 30 }, name: 'oneMonth', interval: INTERVALS.day, diff --git a/app/services/clusters/parse_cluster_applications_artifact_service.rb b/app/services/clusters/parse_cluster_applications_artifact_service.rb index 7ffe43e9ce4..e9a23b7c5f2 100644 --- a/app/services/clusters/parse_cluster_applications_artifact_service.rb +++ b/app/services/clusters/parse_cluster_applications_artifact_service.rb @@ -46,6 +46,8 @@ module Clusters releases = [] artifact.each_blob do |blob| + next if blob.empty? + releases.concat(Gitlab::Kubernetes::Helm::Parsers::ListV2.new(blob).releases) end diff --git a/app/views/projects/hooks/index.html.haml b/app/views/projects/hooks/index.html.haml index e40c36da29d..5c6a87ddb26 100644 --- a/app/views/projects/hooks/index.html.haml +++ b/app/views/projects/hooks/index.html.haml @@ -9,6 +9,7 @@ .col-lg-8.gl-mb-3 = form_for @hook, as: :hook, url: polymorphic_path([@project, :hooks]) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } - = f.submit 'Add webhook', class: 'btn btn-success' + .gl-display-flex.gl-justify-content-end + = f.submit 'Add webhook', class: 'btn btn-success' = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class diff --git a/changelogs/unreleased/222333-ux-pajamas-implementation-move-buttons-in-settings-webhooks-to-the.yml b/changelogs/unreleased/222333-ux-pajamas-implementation-move-buttons-in-settings-webhooks-to-the.yml new file mode 100644 index 00000000000..b0c93acfa62 --- /dev/null +++ b/changelogs/unreleased/222333-ux-pajamas-implementation-move-buttons-in-settings-webhooks-to-the.yml @@ -0,0 +1,5 @@ +--- +title: Move button in Settings > Webhooks to the right +merge_request: 38650 +author: +type: other diff --git a/changelogs/unreleased/jivanvl-update-date-units.yml b/changelogs/unreleased/jivanvl-update-date-units.yml new file mode 100644 index 00000000000..79ad813a5f6 --- /dev/null +++ b/changelogs/unreleased/jivanvl-update-date-units.yml @@ -0,0 +1,5 @@ +--- +title: Change date time picker units +merge_request: 38232 +author: +type: changed diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index 36cd717f2f3..c7f84c84e63 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -2314,6 +2314,56 @@ type DastScannerProfileCreatePayload { id: ID } +""" +Represents a DAST Site Profile. +""" +type DastSiteProfile { + """ + ID of the site profile + """ + id: ID! + + """ + The name of the site profile + """ + profileName: String + + """ + The URL of the target to be scanned + """ + targetUrl: String + + """ + Permissions for the current user on the resource + """ + userPermissions: DastSiteProfilePermissions! + + """ + The current validation status of the site profile + """ + validationStatus: DastSiteProfileValidationStatusEnum +} + +""" +The connection type for DastSiteProfile. +""" +type DastSiteProfileConnection { + """ + A list of edges. + """ + edges: [DastSiteProfileEdge] + + """ + A list of nodes. + """ + nodes: [DastSiteProfile] + + """ + Information to aid in pagination. + """ + pageInfo: PageInfo! +} + """ Autogenerated input type of DastSiteProfileCreate """ @@ -2394,11 +2444,58 @@ type DastSiteProfileDeletePayload { errors: [String!]! } +""" +An edge in a connection. +""" +type DastSiteProfileEdge { + """ + A cursor for use in pagination. + """ + cursor: String! + + """ + The item at the end of the edge. + """ + node: DastSiteProfile +} + """ Identifier of DastSiteProfile """ scalar DastSiteProfileID +""" +Check permissions for the current user on site profile +""" +type DastSiteProfilePermissions { + """ + Indicates the user can perform `create_on_demand_dast_scan` on this resource + """ + createOnDemandDastScan: Boolean! +} + +enum DastSiteProfileValidationStatusEnum { + """ + Site validation process finished but failed + """ + FAILED_VALIDATION + + """ + Site validation process is in progress + """ + INPROGRESS_VALIDATION + + """ + Site validation process finished successfully + """ + PASSED_VALIDATION + + """ + Site validation process has not started + """ + PENDING_VALIDATION +} + """ Autogenerated input type of DeleteAnnotation """ @@ -9575,6 +9672,31 @@ type Project { """ createdAt: Time + """ + DAST Site Profiles associated with the project + """ + dastSiteProfiles( + """ + Returns the elements in the list that come after the specified cursor. + """ + after: String + + """ + Returns the elements in the list that come before the specified cursor. + """ + before: String + + """ + Returns the first _n_ elements from the list. + """ + first: Int + + """ + Returns the last _n_ elements from the list. + """ + last: Int + ): DastSiteProfileConnection + """ Short description of the project """ diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index ae4da89237e..021fcf566d3 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -6214,6 +6214,164 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "DastSiteProfile", + "description": "Represents a DAST Site Profile.", + "fields": [ + { + "name": "id", + "description": "ID of the site profile", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "profileName", + "description": "The name of the site profile", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "targetUrl", + "description": "The URL of the target to be scanned", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "userPermissions", + "description": "Permissions for the current user on the resource", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DastSiteProfilePermissions", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "validationStatus", + "description": "The current validation status of the site profile", + "args": [ + + ], + "type": { + "kind": "ENUM", + "name": "DastSiteProfileValidationStatusEnum", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DastSiteProfileConnection", + "description": "The connection type for DastSiteProfile.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [ + + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DastSiteProfileEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [ + + ], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "DastSiteProfile", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "DastSiteProfileCreateInput", @@ -6442,6 +6600,51 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "DastSiteProfileEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [ + + ], + "type": { + "kind": "OBJECT", + "name": "DastSiteProfile", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, { "kind": "SCALAR", "name": "DastSiteProfileID", @@ -6452,6 +6655,72 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "DastSiteProfilePermissions", + "description": "Check permissions for the current user on site profile", + "fields": [ + { + "name": "createOnDemandDastScan", + "description": "Indicates the user can perform `create_on_demand_dast_scan` on this resource", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "DastSiteProfileValidationStatusEnum", + "description": null, + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "PENDING_VALIDATION", + "description": "Site validation process has not started", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "INPROGRESS_VALIDATION", + "description": "Site validation process is in progress", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "PASSED_VALIDATION", + "description": "Site validation process finished successfully", + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "FAILED_VALIDATION", + "description": "Site validation process finished but failed", + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "DeleteAnnotationInput", @@ -28694,6 +28963,59 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "dastSiteProfiles", + "description": "DAST Site Profiles associated with the project", + "args": [ + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DastSiteProfileConnection", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "description", "description": "Short description of the project", diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index d1aed6cba63..3a9a6faf41b 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -402,6 +402,18 @@ Autogenerated return type of DastScannerProfileCreate | `errors` | String! => Array | Errors encountered during execution of the mutation. | | `id` | ID | ID of the scanner profile. | +## DastSiteProfile + +Represents a DAST Site Profile. + +| Name | Type | Description | +| --- | ---- | ---------- | +| `id` | ID! | ID of the site profile | +| `profileName` | String | The name of the site profile | +| `targetUrl` | String | The URL of the target to be scanned | +| `userPermissions` | DastSiteProfilePermissions! | Permissions for the current user on the resource | +| `validationStatus` | DastSiteProfileValidationStatusEnum | The current validation status of the site profile | + ## DastSiteProfileCreatePayload Autogenerated return type of DastSiteProfileCreate @@ -421,6 +433,14 @@ Autogenerated return type of DastSiteProfileDelete | `clientMutationId` | String | A unique identifier for the client performing the mutation. | | `errors` | String! => Array | Errors encountered during execution of the mutation. | +## DastSiteProfilePermissions + +Check permissions for the current user on site profile + +| Name | Type | Description | +| --- | ---- | ---------- | +| `createOnDemandDastScan` | Boolean! | Indicates the user can perform `create_on_demand_dast_scan` on this resource | + ## DeleteAnnotationPayload Autogenerated return type of DeleteAnnotation diff --git a/doc/development/documentation/styleguide.md b/doc/development/documentation/styleguide.md index ad5ac75f96f..8b174ff1cbf 100644 --- a/doc/development/documentation/styleguide.md +++ b/doc/development/documentation/styleguide.md @@ -270,8 +270,12 @@ Use sentence case. For example: #### UI text -When including user interface text, like button labels or menu items, use the same capitalization that's in the UI. -Standards for this content are listed in the [Pajamas Design System Content section](https://design.gitlab.com/content/punctuation). +When referring to specific user interface text, like a button label or menu item, use the same capitalization that is displayed in the UI. +Standards for this content are listed in the [Pajamas Design System Content section](https://design.gitlab.com/content/punctuation) and typically +match what is called for in this Documentation Style Guide. + +If you think there is a mistake in the way the UI text is styled, +create an issue or an MR to propose a change to the UI text. #### Feature names diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 5ee29dd0904..b3481307b51 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -957,9 +957,6 @@ msgid_plural "%d minutes" msgstr[0] "" msgstr[1] "" -msgid "1 month" -msgstr "" - msgid "1 open issue" msgid_plural "%{issues} open issues" msgstr[0] "" @@ -985,9 +982,6 @@ msgid_plural "%{num} users" msgstr[0] "" msgstr[1] "" -msgid "1 week" -msgstr "" - msgid "1-9 contributions" msgstr "" @@ -1012,6 +1006,9 @@ msgstr "" msgid "3 hours" msgstr "" +msgid "30 days" +msgstr "" + msgid "30 minutes" msgstr "" @@ -1033,6 +1030,9 @@ msgstr "" msgid "404|Please contact your GitLab administrator if you think this is a mistake." msgstr "" +msgid "7 days" +msgstr "" + msgid "8 hours" msgstr "" @@ -8646,6 +8646,9 @@ msgstr "" msgid "Downvotes" msgstr "" +msgid "Draft" +msgstr "" + msgid "Draft merge requests can't be merged." msgstr "" @@ -27000,9 +27003,6 @@ msgstr "" msgid "Vulnerability|Status" msgstr "" -msgid "WIP" -msgstr "" - msgid "Wait for the file to load to copy its contents" msgstr "" diff --git a/qa/qa/page/project/issue/show.rb b/qa/qa/page/project/issue/show.rb index 04f0f34cbbb..1e6c7c2ee32 100644 --- a/qa/qa/page/project/issue/show.rb +++ b/qa/qa/page/project/issue/show.rb @@ -38,23 +38,6 @@ module QA element :new_note_form, 'attr: :note' # rubocop:disable QA/ElementWithPattern end - view 'app/views/projects/issues/_tabs.html.haml' do - element :designs_tab_content - element :designs_tab_link - element :discussion_tab_content - element :discussion_tab_link - end - - def click_discussion_tab - click_element(:discussion_tab_link) - active_element?(:discussion_tab_content) - end - - def click_designs_tab - click_element(:designs_tab_link) - active_element?(:designs_tab_content) - end - def click_remove_related_issue_button click_element(:remove_related_issue_button) end diff --git a/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_add_annotation.rb b/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb similarity index 50% rename from qa/qa/specs/features/browser_ui/3_create/design_management/add_design_add_annotation.rb rename to qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb index b50edcfcf08..44c1511fffb 100644 --- a/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_add_annotation.rb +++ b/qa/qa/specs/features/browser_ui/3_create/design_management/add_design_content_spec.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true module QA - context 'Create' do - describe 'Design management' do + RSpec.describe 'Create' do + context 'Design Management' do let(:issue) { Resource::Issue.fabricate_via_api! } let(:design_filename) { 'banana_sample.gif' } let(:design) { File.absolute_path(File.join('spec', 'fixtures', design_filename)) } @@ -12,18 +12,15 @@ module QA Flow::Login.sign_in end - it 'user adds a design and annotation' do + it 'user adds a design and annotates it' do issue.visit! - Page::Project::Issue::Show.perform do |show| - show.click_designs_tab - show.add_design(design) - show.click_design(design_filename) - show.add_annotation(annotation) + Page::Project::Issue::Show.perform do |issue| + issue.add_design(design) + issue.click_design(design_filename) + issue.add_annotation(annotation) - expect(show).to have_annotation(annotation) - - show.click_discussion_tab + expect(issue).to have_annotation(annotation) end end end diff --git a/spec/features/groups/issues_spec.rb b/spec/features/groups/issues_spec.rb index 39bcfd62cfb..8ecd2beba68 100644 --- a/spec/features/groups/issues_spec.rb +++ b/spec/features/groups/issues_spec.rb @@ -110,8 +110,6 @@ RSpec.describe 'Group issues page' do find('.empty-state .js-lazy-loaded') find('.new-project-item-link').click - find('.select2-input').set(group.name) - page.within('.select2-results') do expect(page).to have_content(project.full_name) expect(page).not_to have_content(project_with_issues_disabled.full_name) diff --git a/spec/fixtures/helm/helm_list_v2_empty_blob.json.gz b/spec/fixtures/helm/helm_list_v2_empty_blob.json.gz new file mode 100644 index 0000000000000000000000000000000000000000..5647f052c3b561e85f461d8ee5b67933d50b7761 GIT binary patch literal 81 zcmb2|=8(7%sT|MnKRrh`Ij6L^B(+F4v7jI)GdZy&Ge56bFRM5|j{&bFBLl<#{|rz7 E0Mk7ixBvhE literal 0 HcmV?d00001 diff --git a/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb b/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb index 3b155d95345..e669e73ccb8 100644 --- a/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb +++ b/spec/services/clusters/parse_cluster_applications_artifact_service_spec.rb @@ -108,6 +108,17 @@ RSpec.describe Clusters::ParseClusterApplicationsArtifactService do end end + context 'blob is empty' do + let(:file) { fixture_file_upload(Rails.root.join("spec/fixtures/helm/helm_list_v2_empty_blob.json.gz")) } + let(:artifact) { create(:ci_job_artifact, :cluster_applications, job: job, file: file) } + + it 'returns success' do + result = described_class.new(job, user).execute(artifact) + + expect(result[:status]).to eq(:success) + end + end + context 'job has deployment cluster' do context 'current user does not have access to deployment cluster' do let(:other_user) { create(:user) }