diff --git a/.rubocop_todo/rspec/before_all_role_assignment.yml b/.rubocop_todo/rspec/before_all_role_assignment.yml index 6f0c796c0134fe50c2d74d29427f3759a75d79d6..c74116aecdea1e32073d62a309b8bcdb2ce14496 100644 --- a/.rubocop_todo/rspec/before_all_role_assignment.yml +++ b/.rubocop_todo/rspec/before_all_role_assignment.yml @@ -1506,7 +1506,6 @@ RSpec/BeforeAllRoleAssignment: - 'spec/support/shared_examples/services/issuable/issuable_import_csv_service_shared_examples.rb' - 'spec/support/shared_examples/services/security/ci_configuration/create_service_shared_examples.rb' - 'spec/views/groups/group_members/index.html.haml_spec.rb' - - 'spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb' - 'spec/views/projects/pages/new.html.haml_spec.rb' - 'spec/views/projects/project_members/index.html.haml_spec.rb' - 'spec/workers/group_destroy_worker_spec.rb' diff --git a/.rubocop_todo/rspec/factory_bot/avoid_create.yml b/.rubocop_todo/rspec/factory_bot/avoid_create.yml index 20d43048fd02ca189b531d0352172c0808e60ae5..31c9bd67ce10f8d0b0ffa77173547577d4dd5374 100644 --- a/.rubocop_todo/rspec/factory_bot/avoid_create.yml +++ b/.rubocop_todo/rspec/factory_bot/avoid_create.yml @@ -597,7 +597,6 @@ RSpec/FactoryBot/AvoidCreate: - 'spec/views/projects/hooks/edit.html.haml_spec.rb' - 'spec/views/projects/hooks/index.html.haml_spec.rb' - 'spec/views/projects/imports/new.html.haml_spec.rb' - - 'spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb' - 'spec/views/projects/issues/service_desk/_issue.html.haml_spec.rb' - 'spec/views/projects/issues/show.html.haml_spec.rb' - 'spec/views/projects/jobs/_build.html.haml_spec.rb' diff --git a/.rubocop_todo/rspec/feature_category.yml b/.rubocop_todo/rspec/feature_category.yml index eed1d8573ebb5ec544dc705268834ede4847149e..88af6232953d8dca12f1cc56bdb882644e8d47e1 100644 --- a/.rubocop_todo/rspec/feature_category.yml +++ b/.rubocop_todo/rspec/feature_category.yml @@ -5357,7 +5357,6 @@ RSpec/FeatureCategory: - 'spec/views/projects/hooks/index.html.haml_spec.rb' - 'spec/views/projects/imports/new.html.haml_spec.rb' - 'spec/views/projects/issues/_related_branches.html.haml_spec.rb' - - 'spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb' - 'spec/views/projects/issues/show.html.haml_spec.rb' - 'spec/views/projects/jobs/_build.html.haml_spec.rb' - 'spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb' diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 511228a1e16a3e71668076cc1514325a470127d1..318003d287c4331bbb8a919d094b0dcb72542aa8 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -89,12 +89,6 @@ ul.related-merge-requests > li gl-emoji { } } -.issues-nav-controls { - .btn-group:empty { - display: none; - } -} - .recaptcha { margin-bottom: 30px; } diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index 4453cb2e538cf922951e1a394eed6a3bae12f788..f3e3b009fffb59101190d3fa88b120318ae5230d 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -3,32 +3,16 @@ - page_title _("Service Desk") - add_page_specific_style 'page_bundles/issuable_list' - add_page_specific_style 'page_bundles/issues_list' -- content_for :breadcrumbs_extra do - = render "projects/issues/service_desk/nav_btns", show_export_button: false, show_rss_button: false - support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(Users::Internal.support_bot) }.to_json .js-service-desk-issues.service-desk-issues{ data: { support_bot: support_bot_attrs } } - - if ::Feature.enabled?(:service_desk_vue_list, @project) - .js-service-desk-list{ data: { project_data: project_issues_list_data(@project, current_user), - service_desk_email_address: @project.service_desk_address, - can_admin_issues: can?(current_user, :admin_issue, @project).to_s, - can_edit_project_settings: can?(current_user, :admin_project, @project).to_s, - service_desk_callout_svg_path: image_path('service_desk_callout.svg'), - service_desk_settings_path: edit_project_path(@project, anchor: 'js-service-desk'), - service_desk_help_path: help_page_path('user/project/service_desk/index'), - is_service_desk_supported: Gitlab::ServiceDesk.supported?.to_s, - is_service_desk_enabled: @project.service_desk_enabled?.to_s } } - - else - .top-area - = render 'shared/issuable/nav', type: :issues - .nav-controls.gl-display-block.gl-sm-display-none - = render "projects/issues/service_desk/nav_btns", show_feed_buttons: false, show_import_button: false, show_export_button: false - - - if @issues.present? - = render 'shared/issuable/search_bar', type: :issues - - if Gitlab::ServiceDesk.supported? - = render 'projects/issues/service_desk/service_desk_info_content' - - .issues-holder - = render 'projects/issues/issues', empty_state_path: 'projects/issues/service_desk/service_desk_empty_state' + .js-service-desk-list{ data: { project_data: project_issues_list_data(@project, current_user), + service_desk_email_address: @project.service_desk_address, + can_admin_issues: can?(current_user, :admin_issue, @project).to_s, + can_edit_project_settings: can?(current_user, :admin_project, @project).to_s, + service_desk_callout_svg_path: image_path('service_desk_callout.svg'), + service_desk_settings_path: edit_project_path(@project, anchor: 'js-service-desk'), + service_desk_help_path: help_page_path('user/project/service_desk/index'), + is_service_desk_supported: Gitlab::ServiceDesk.supported?.to_s, + is_service_desk_enabled: @project.service_desk_enabled?.to_s } } diff --git a/app/views/projects/issues/service_desk/_nav_btns.html.haml b/app/views/projects/issues/service_desk/_nav_btns.html.haml deleted file mode 100644 index 3b7b3f57abd797c678ad8ecc5799966614f1e8e7..0000000000000000000000000000000000000000 --- a/app/views/projects/issues/service_desk/_nav_btns.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -- show_feed_buttons = local_assigns.fetch(:show_feed_buttons, true) -- show_import_button = local_assigns.fetch(:show_import_button, true) && can?(current_user, :import_issues, @project) -- show_export_button = local_assigns.fetch(:show_export_button, true) -- issuable_type = 'issue' -- can_edit = can?(current_user, :admin_project, @project) -- notification_email = @current_user.present? ? @current_user.notification_email_or_default : nil - -.nav-controls.issues-nav-controls.gl-font-size-0 - - if @can_bulk_update - = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-mr-3 js-bulk-update-toggle' }) do - = _("Bulk edit") - - if show_new_issue_link?(@project) - = render Pajamas::ButtonComponent.new(variant: :confirm, - href: new_project_issue_path(@project, issue: { milestone_id: finder.milestones.first.try(:id) }), - button_options: { id: 'new_issue_link', class: 'gl-mr-3' }) do - = _("New issue") - -.dropdown.gl-dropdown - = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md gl-button gl-dropdown gl-dropdown-toggle btn-default-tertiary dropdown-icon-only dropdown-toggle-no-caret has-tooltip gl-display-none! gl-md-display-inline-flex!", data: { toggle: 'dropdown', title: _('Actions') } do - = sprite_icon "ellipsis_v", size: 16, css_class: "dropdown-icon gl-icon" - %span.gl-sr-only - = _('Actions') - = button_tag type: 'button', class: "btn dropdown-toggle btn-default btn-md btn-block gl-button gl-dropdown-toggle gl-md-display-none!", data: { 'toggle' => 'dropdown' } do - %span.gl-dropdown-button-text= _('Actions') - = sprite_icon "chevron-down", size: 16, css_class: "dropdown-icon gl-icon" - .dropdown-menu.dropdown-menu-right - .gl-dropdown-inner - .gl-dropdown-contents - %ul - .js-csv-import-export-buttons{ data: { show_export_button: show_export_button.to_s, show_import_button: show_import_button.to_s, issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_issues_path(@project, request.query_parameters), import_csv_issues_path: import_csv_namespace_project_issues_path, can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } } - %li.gl-dropdown-divider - %hr.dropdown-divider - %li.gl-dropdown-item - - if show_feed_buttons - = render 'shared/issuable/feed_buttons' diff --git a/app/views/projects/issues/service_desk/_service_desk_empty_state.html.haml b/app/views/projects/issues/service_desk/_service_desk_empty_state.html.haml deleted file mode 100644 index 919810413cdacbba17e25c9f9d7c7b0fc1450a21..0000000000000000000000000000000000000000 --- a/app/views/projects/issues/service_desk/_service_desk_empty_state.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -- service_desk_enabled = @project.service_desk_enabled? - -- can_edit_project_settings = can?(current_user, :admin_project, @project) -- title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab") - -- if Gitlab::ServiceDesk.supported? - .empty-state - .svg-content - = render partial: 'projects/issues/service_desk/icons/service_desk_empty_state', formats: :svg - - .text-content - %h4= title_text - - - if can_edit_project_settings && service_desk_enabled - %p - = s_("ServiceDesk|Your users can send emails to this address:") - %code= @project.service_desk_address - - %span= s_("ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.") - = link_to _('Learn more.'), help_page_path('user/project/service_desk/index') - - - if can_edit_project_settings && !service_desk_enabled - .text-center - = link_button_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), variant: :confirm -- else - .empty-state - .svg-content - = render partial: 'projects/issues/service_desk/icons/service_desk_setup', formats: :svg - .text-content - - if can_edit_project_settings - %h4= s_('ServiceDesk|Service Desk is not supported') - %p - = s_("ServiceDesk|To enable Service Desk on this instance, an instance administrator must first set up incoming email.") - = link_to _('Learn more.'), help_page_path('administration/incoming_email', anchor: 'set-it-up') - - else - %h4= s_('ServiceDesk|Service Desk is not enabled') - %p= s_("ServiceDesk|For help setting up the Service Desk for your instance, please contact an administrator.") diff --git a/app/views/projects/issues/service_desk/_service_desk_info_content.html.haml b/app/views/projects/issues/service_desk/_service_desk_info_content.html.haml deleted file mode 100644 index 97bfb2f9f62011c967d70303543e858973490c56..0000000000000000000000000000000000000000 --- a/app/views/projects/issues/service_desk/_service_desk_info_content.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -- service_desk_enabled = @project.service_desk_enabled? - -- can_edit_project_settings = can?(current_user, :admin_project, @project) -- can_admin_issues = can?(current_user, :admin_issue, @project) -- title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab") - -.media.gl-border-b.gl-pb-3.gl-text-left - .svg-content - = render partial: 'projects/issues/service_desk/icons/service_desk_callout', formats: :svg - - .gl-mt-3.gl-ml-3 - %h5= title_text - - - if can_admin_issues && service_desk_enabled - %p - = s_("ServiceDesk|Your users can send emails to this address:") - %code= @project.service_desk_address - - %span= s_("ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.") - = link_to _('Learn more.'), help_page_path('user/project/service_desk/index') - - - if can_edit_project_settings && !service_desk_enabled - .gl-mt-3 - = link_button_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), variant: :confirm diff --git a/app/views/projects/issues/service_desk/icons/_service_desk_callout.svg b/app/views/projects/issues/service_desk/icons/_service_desk_callout.svg deleted file mode 100644 index 2886388279ee438fe360d0f653e95a054581364f..0000000000000000000000000000000000000000 --- a/app/views/projects/issues/service_desk/icons/_service_desk_callout.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="78" height="82" viewBox="0 0 78 82"><g fill="none" fill-rule="evenodd"><path fill="#F9F9F9" d="M2.12 42c-.08.99-.12 1.99-.12 3 0 20.435 16.565 37 37 37s37-16.565 37-37c0-1.01-.04-2.01-.12-3C74.353 61.032 58.425 76 39 76 19.575 76 3.647 61.032 2.12 42z"/><path fill="#EEE" fill-rule="nonzero" d="M39 78C17.46 78 0 60.54 0 39S17.46 0 39 0s39 17.46 39 39-17.46 39-39 39zm0-4c19.33 0 35-15.67 35-35S58.33 4 39 4 4 19.67 4 39s15.67 35 35 35z"/><rect width="7" height="1" x="59" y="38" fill="#E1DBF2" rx=".5"/><path fill="#6B4FBB" d="M60.5 42a3.5 3.5 0 0 0 0-7v7z"/><rect width="7" height="1" x="12" y="38" fill="#E1DBF2" transform="matrix(-1 0 0 1 31 0)" rx=".5"/><path fill="#6B4FBB" d="M17.5 42a3.5 3.5 0 0 1 0-7v7z"/><path fill="#E1DBF1" fill-rule="nonzero" d="M39 58c10.493 0 19-8.507 19-19s-8.507-19-19-19-19 8.507-19 19 8.507 19 19 19zm0 4c-12.703 0-23-10.297-23-23s10.297-23 23-23 23 10.297 23 23-10.297 23-23 23z"/><path fill="#6B4FBB" d="M35 56a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2zm4 0a1 1 0 1 1 0-2 1 1 0 0 1 0 2z"/><path fill="#E1DBF1" fill-rule="nonzero" d="M26.5 40c0 4.143 3.355 7.5 7.494 7.5h10.012A7.497 7.497 0 0 0 51.5 40c0-4.143-3.355-7.5-7.494-7.5H33.994A7.497 7.497 0 0 0 26.5 40zm-3 0c0-5.799 4.698-10.5 10.494-10.5h10.012C49.802 29.5 54.5 34.2 54.5 40c0 5.799-4.698 10.5-10.494 10.5H33.994C28.198 50.5 23.5 45.8 23.5 40z"/><path fill="#6B4FBB" fill-rule="nonzero" d="M35.255 42.406a1 1 0 1 1 1.872-.703 2.001 2.001 0 0 0 3.76-.038 1 1 0 1 1 1.886.665 4 4 0 0 1-7.518.076zM31.5 40a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm15 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/><path fill="#6B4FBB" d="M38 22h2a1 1 0 0 1 0 2h-2a1 1 0 0 1 0-2zm0 3h2a1 1 0 0 1 0 2h-2a1 1 0 0 1 0-2z" style="mix-blend-mode:multiply"/></g></svg> \ No newline at end of file diff --git a/app/views/projects/issues/service_desk/icons/_service_desk_empty_state.svg b/app/views/projects/issues/service_desk/icons/_service_desk_empty_state.svg deleted file mode 100644 index 04c4870be0794ea6e8f3bd41aed74a241decb432..0000000000000000000000000000000000000000 --- a/app/views/projects/issues/service_desk/icons/_service_desk_empty_state.svg +++ /dev/null @@ -1 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" width="226" height="178" viewBox="0 0 226 178"><g fill="none" fill-rule="evenodd"><path fill="#EEE" fill-rule="nonzero" d="M109.496 165.895c2.06.108 4.113.134 6.158.08 1.104-.03 1.975-.95 1.945-2.055-.03-1.104-.95-1.975-2.055-1.945-1.94.053-3.886.028-5.84-.074-1.102-.057-2.043.79-2.1 1.893-.06 1.104.788 2.045 1.89 2.102zm18.408-1.245c2.02-.386 4.023-.853 6-1.4 1.066-.295 1.69-1.396 1.396-2.46-.295-1.066-1.397-1.69-2.46-1.396-1.875.52-3.772.96-5.686 1.327-1.085.208-1.797 1.255-1.59 2.34.207 1.085 1.255 1.797 2.34 1.59zm17.572-5.636c1.865-.86 3.696-1.795 5.486-2.803.962-.54 1.303-1.76.762-2.723-.542-.962-1.762-1.303-2.724-.762-1.697.955-3.43 1.84-5.2 2.656-1.002.464-1.44 1.652-.978 2.655.462 1.003 1.65 1.44 2.654.98zm44.342-74.897c-.142-2.056-.367-4.1-.674-6.127-.165-1.092-1.184-1.844-2.276-1.678-1.092.165-1.844 1.184-1.68 2.276.29 1.92.505 3.857.64 5.805.076 1.102 1.03 1.934 2.133 1.857 1.103-.076 1.934-1.03 1.858-2.133zm-3.505-18.144c-.632-1.956-1.343-3.884-2.13-5.78-.425-1.02-1.595-1.504-2.615-1.08-1.02.424-1.503 1.594-1.08 2.614.747 1.797 1.42 3.624 2.02 5.476.34 1.05 1.467 1.628 2.518 1.288 1.05-.34 1.627-1.466 1.287-2.517zm-7.754-16.73c-1.083-1.745-2.235-3.447-3.454-5.1-.655-.89-1.907-1.08-2.797-.423-.89.655-1.08 1.907-.424 2.796 1.155 1.568 2.247 3.18 3.273 4.835.58.94 1.814 1.23 2.753.647.938-.582 1.228-1.815.646-2.754zm-11.582-14.446c-1.468-1.437-2.993-2.814-4.572-4.128-.85-.708-2.11-.592-2.816.256-.707.85-.592 2.11.257 2.817 1.496 1.246 2.942 2.55 4.334 3.913.79.773 2.057.76 2.83-.03.772-.79.758-2.057-.032-2.83zm-101.422-4.91c-1.6 1.288-3.148 2.64-4.64 4.05-.802.76-.837 2.026-.078 2.828.76.802 2.025.837 2.827.078 1.415-1.338 2.882-2.62 4.4-3.84.86-.692.996-1.95.303-2.812-.692-.86-1.95-.996-2.812-.303zM52.7 43.062c-1.25 1.632-2.433 3.313-3.546 5.04-.6.93-.33 2.167.597 2.765.93.6 2.167.33 2.766-.597 1.055-1.637 2.176-3.23 3.36-4.777.67-.878.504-2.133-.374-2.804-.877-.672-2.132-.505-2.803.372zm-9.373 15.924c-.82 1.882-1.56 3.8-2.226 5.745-.356 1.047.2 2.183 1.247 2.54 1.045.358 2.182-.2 2.54-1.246.63-1.844 1.333-3.66 2.108-5.443.44-1.012-.023-2.19-1.036-2.63-1.014-.44-2.192.023-2.633 1.036zm-5.26 17.74c-.34 2.02-.6 4.058-.777 6.11-.096 1.102.72 2.07 1.82 2.167 1.1.095 2.07-.72 2.165-1.82.17-1.947.415-3.88.737-5.793.183-1.09-.552-2.12-1.64-2.304-1.09-.183-2.122.552-2.305 1.64zM74.87 155.55c1.772 1.038 3.585 2.005 5.437 2.897.995.48 2.19.062 2.67-.933.48-.995.062-2.19-.933-2.67-1.755-.845-3.473-1.76-5.152-2.745-.953-.56-2.178-.24-2.737.714-.558.954-.238 2.18.715 2.738zm16.97 7.34c1.966.578 3.96 1.078 5.975 1.498 1.082.225 2.14-.47 2.366-1.55.226-1.082-.468-2.14-1.55-2.366-1.91-.398-3.798-.872-5.662-1.42-1.06-.312-2.172.294-2.483 1.354-.312 1.06.294 2.17 1.354 2.483z"/><path fill="#F9F9F9" d="M2.12 130c-.08.99-.12 1.99-.12 3 0 20.435 16.565 37 37 37s37-16.565 37-37c0-1.01-.04-2.01-.12-3-1.527 19.032-17.455 34-36.88 34-19.425 0-35.353-14.968-36.88-34z"/><path fill="#EEE" fill-rule="nonzero" d="M39 166c-21.54 0-39-17.46-39-39s17.46-39 39-39 39 17.46 39 39-17.46 39-39 39zm0-4c19.33 0 35-15.67 35-35S58.33 92 39 92 4 107.67 4 127s15.67 35 35 35z"/><path fill="#FDC4A8" fill-rule="nonzero" d="M53.925 116.226c-.277-.144-.59-.226-.925-.226H25c-.323 0-.628.076-.898.212l14.663 13.406c.39.357.99.348 1.37-.02l13.79-13.372zm1.075 4.53L42.92 132.47c-1.898 1.84-4.902 1.885-6.854.1L23 120.624V138c0 1.105.895 2 2 2h28c1.105 0 2-.895 2-2v-17.244zM25 112h28c3.314 0 6 2.686 6 6v20c0 3.314-2.686 6-6 6H25c-3.314 0-6-2.686-6-6v-20c0-3.314 2.686-6 6-6z"/><g><path fill="#F9F9F9" d="M150.12 131c-.08.99-.12 1.99-.12 3 0 20.435 16.565 37 37 37s37-16.565 37-37c0-1.01-.04-2.01-.12-3-1.527 19.032-17.455 34-36.88 34-19.425 0-35.353-14.968-36.88-34z"/><path fill="#EEE" fill-rule="nonzero" d="M187 167c-21.54 0-39-17.46-39-39s17.46-39 39-39 39 17.46 39 39-17.46 39-39 39zm0-4c19.33 0 35-15.67 35-35s-15.67-35-35-35-35 15.67-35 35 15.67 35 35 35z"/><path fill="#E1DBF1" fill-rule="nonzero" d="M180.51 137H199c1.105 0 2-.895 2-2v-16c0-1.105-.895-2-2-2h-24c-1.105 0-2 .895-2 2v22.743l7.51-4.743zm1.157 4l-9.6 6.062c-.32.202-.69.31-1.067.31-1.105 0-2-.896-2-2V119c0-3.314 2.686-6 6-6h24c3.314 0 6 2.686 6 6v16c0 3.314-2.686 6-6 6h-17.333z"/><path fill="#6B4FBB" d="M180 129c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2zm7 0c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2zm7 0c-1.105 0-2-.895-2-2s.895-2 2-2 2 .895 2 2-.895 2-2 2z"/></g><g><path fill="#F9F9F9" d="M76.12 42c-.08.99-.12 1.99-.12 3 0 20.435 16.565 37 37 37s37-16.565 37-37c0-1.01-.04-2.01-.12-3-1.527 19.032-17.455 34-36.88 34-19.425 0-35.353-14.968-36.88-34z"/><path fill="#EEE" fill-rule="nonzero" d="M113 78c-21.54 0-39-17.46-39-39S91.46 0 113 0s39 17.46 39 39-17.46 39-39 39zm0-4c19.33 0 35-15.67 35-35S132.33 4 113 4 78 19.67 78 39s15.67 35 35 35z"/><g transform="translate(133 35)"><rect width="7" height="1" y="3" fill="#E1DBF2" rx=".5"/><path fill="#6B4FBB" d="M1.5 7C3.433 7 5 5.433 5 3.5S3.433 0 1.5 0v7z"/></g><g transform="matrix(-1 0 0 1 93 35)"><rect width="7" height="1" y="3" fill="#E1DBF2" rx=".5"/><path fill="#6B4FBB" d="M1.5 7C3.433 7 5 5.433 5 3.5S3.433 0 1.5 0v7z"/></g><path fill="#E1DBF1" fill-rule="nonzero" d="M113 58c10.493 0 19-8.507 19-19s-8.507-19-19-19-19 8.507-19 19 8.507 19 19 19zm0 4c-12.703 0-23-10.297-23-23s10.297-23 23-23 23 10.297 23 23-10.297 23-23 23z"/><path fill="#6B4FBB" d="M109 56c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm4 0c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1zm4 0c-.552 0-1-.448-1-1s.448-1 1-1 1 .448 1 1-.448 1-1 1z"/><path fill="#E1DBF1" fill-rule="nonzero" d="M97.5 40c0-5.8 4.698-10.5 10.494-10.5h10.012c5.796 0 10.494 4.7 10.494 10.5s-4.698 10.5-10.494 10.5h-10.012C102.198 50.5 97.5 45.8 97.5 40zm3 0c0 4.143 3.355 7.5 7.494 7.5h10.012c4.14 0 7.494-3.358 7.494-7.5 0-4.143-3.355-7.5-7.494-7.5h-10.012c-4.14 0-7.494 3.358-7.494 7.5z"/><path fill="#6B4FBB" fill-rule="nonzero" d="M109.255 42.406c-.195-.517.067-1.093.584-1.287.516-.196 1.093.066 1.287.583.29.774 1.033 1.297 1.873 1.297.855 0 1.608-.542 1.887-1.335.184-.52.755-.794 1.276-.61.52.183.794.754.61 1.275-.56 1.587-2.063 2.67-3.773 2.67-1.68 0-3.164-1.046-3.745-2.594zM105.5 40c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5zm15 0c-.828 0-1.5-.672-1.5-1.5s.672-1.5 1.5-1.5 1.5.672 1.5 1.5-.672 1.5-1.5 1.5z"/><path fill="#6B4FBB" d="M112 22h2c.552 0 1 .448 1 1s-.448 1-1 1h-2c-.552 0-1-.448-1-1s.448-1 1-1zm0 3h2c.552 0 1 .448 1 1s-.448 1-1 1h-2c-.552 0-1-.448-1-1s.448-1 1-1z" style="mix-blend-mode:multiply"/></g></g></svg> diff --git a/app/views/projects/issues/service_desk/icons/_service_desk_setup.svg b/app/views/projects/issues/service_desk/icons/_service_desk_setup.svg deleted file mode 100644 index bb791b5859340c2a539c54abf3b4c479f5235379..0000000000000000000000000000000000000000 --- a/app/views/projects/issues/service_desk/icons/_service_desk_setup.svg +++ /dev/null @@ -1,39 +0,0 @@ -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="430" height="167" viewBox="0 0 430 167"> - <defs> - <rect id="a" width="81" height="4" x="96" y="88"/> - </defs> - <g fill="none" fill-rule="evenodd"> - <g transform="translate(282 2)"> - <rect width="40" height="4" x="25" y="86" fill="#DFDFDF" rx="2"/> - <rect width="22" height="4" y="86" fill="#DFDFDF" rx="2"/> - <path stroke="#DFDFDF" stroke-linecap="round" stroke-width="4" d="M63,88 C87.300529,88 107,68.300529 107,44 C107,19.699471 87.300529,0 63,0 C38.699471,0 19,19.699471 19,44 C19,55.4692579 23.3882741,65.9135795 30.5774088,73.7455512"/> - <path stroke="#DFDFDF" stroke-linecap="round" stroke-width="4" d="M52,142 L119,142 C133.911688,142 146,129.911688 146,115 C146,100.088312 133.911688,88 119,88 C104.088312,88 92,100.088312 92,115 C92,122.037954 94.6928046,128.446969 99.104319,133.252952" transform="matrix(1 0 0 -1 0 230)"/> - <path fill="#A7A7A7" d="M128 106C129.6569 106 131 107.343145 131 109L131 121C131 122.6569 129.6569 124 128 124L114.06641 124 109.250585 126.78325C108.250579 127.3612 107 126.63955 107 125.48455L107 109C107 107.343145 108.343147 106 110 106L128 106zM128 109L110 109 110 122.8852 113.26184 121 128 121 128 109zM114.5 113.5C115.32842 113.5 116 114.17158 116 115 116 115.82842 115.32842 116.5 114.5 116.5 113.67158 116.5 113 115.82842 113 115 113 114.17158 113.67158 113.5 114.5 113.5zM119 113.5C119.82842 113.5 120.5 114.17158 120.5 115 120.5 115.82842 119.82842 116.5 119 116.5 118.17158 116.5 117.5 115.82842 117.5 115 117.5 114.17158 118.17158 113.5 119 113.5zM123.5 113.5C124.32845 113.5 125 114.17158 125 115 125 115.82842 124.32845 116.5 123.5 116.5 122.67155 116.5 122 115.82842 122 115 122 114.17158 122.67155 113.5 123.5 113.5zM47 36C47 33.790862 48.790862 32 51 32L75 32C77.2092 32 79 33.790862 79 36L79 52C79 54.2092 77.2092 56 75 56L51 56C48.790862 56 47 54.2092 47 52L47 36zM51 36L75 36 75 36.0154 63.0079 42.93904 51 36.0063 51 36zM51 40.6251L51 52 75 52 75 40.6342 63.0079 47.55786 51 40.6251z"/> - </g> - <path stroke="#C2B7E6" stroke-linecap="round" stroke-width="4" d="M276.5,20 L276.5,165"/> - <use fill="#6E49CB" xlink:href="#a"/> - <use fill="#FFFFFF" fill-opacity=".6" xlink:href="#a"/> - <g transform="translate(172 40)"> - <path fill="#6E49CB" fill-rule="nonzero" d="M64.5083266,2.16939521 C64.5598976,1.31008332 65.1555623,0.580183202 65.9870892,0.357376239 L67.0659897,0.0682857185 C67.8975166,-0.154521245 68.7783275,0.179758436 69.2526452,0.898158883 L71.0838835,3.67168101 C71.8604055,3.69835108 72.6253745,3.80075177 73.3696161,3.97339039 L75.8570965,1.76768551 C76.501214,1.19651341 77.4383928,1.10164098 78.1839968,1.53205032 L79.1513003,2.09052325 C79.8969043,2.52093259 80.2832521,3.38015574 80.1106561,4.22354464 L79.4443144,7.48050479 C79.9657604,8.03872555 80.4370489,8.65007844 80.8482561,9.30920953 L84.1658391,9.50834112 C85.025263,9.55988206 85.7551052,10.1555623 85.9779122,10.9870892 L86.2670027,12.0659897 C86.4898096,12.8975166 86.1555879,13.778312 85.4370754,14.2526597 L82.6635301,16.0839042 C82.6369953,16.86039 82.534498,17.6253848 82.3620332,18.3695798 L84.5676029,20.8570965 C85.1387232,21.5010208 85.2337633,22.4383618 84.8032767,23.1839864 L84.2448038,24.1512899 C83.8142654,24.8967214 82.9552293,25.2832262 82.111821,25.1106354 L78.8547318,24.4441212 C78.2965242,24.9657707 77.6852679,25.4370334 77.0260789,25.8482561 L76.8269473,29.1658391 C76.7754063,30.025263 76.1797261,30.7551052 75.3481992,30.9779122 L74.2692987,31.2670027 C73.4377718,31.4898096 72.5569764,31.1555879 72.0826287,30.4370754 L70.2513842,27.6635301 C69.4749563,27.6369798 68.7098843,27.5345032 67.9657472,27.3620229 L65.478263,29.5677909 C64.8341648,30.1389578 63.89683,30.2337892 63.1512826,29.8032819 L62.1839598,29.2448141 C61.4384642,28.8145 61.0520043,27.9552448 61.2245757,27.1118417 L61.8910899,23.8547525 C61.369479,23.2965346 60.898313,22.6852524 60.486955,22.0260996 L57.1693952,21.8269618 C56.3100833,21.7753908 55.5801832,21.1797261 55.3573762,20.3481992 L55.0682857,19.2692987 C54.8454788,18.4377718 55.1797584,17.5569609 55.8981589,17.0826432 L58.671681,15.2514049 C58.6983614,14.4749215 58.8007311,13.7098367 58.9733555,12.9656196 L56.7676172,10.4781688 C56.1964503,9.83407059 56.1015416,8.89675656 56.5319717,8.15122986 L57.0904394,7.18390704 C57.5208695,6.43838035 58.380086,6.05193078 59.2234504,6.22451259 L62.4805641,6.89104094 C63.0387487,6.36945971 63.6501081,5.89827293 64.3091888,5.48695498 L64.5083266,2.16939521 Z M72.7381966,23.3950508 C77.00585,22.2515365 79.5385651,17.8647453 78.3950508,13.5970918 C77.2515158,9.32936108 72.8647453,6.79672328 68.5970918,7.94023759 C64.3293611,9.0837726 61.7967026,13.4704658 62.9402376,17.7381966 C64.0837519,22.00585 68.4704658,24.5385858 72.7381966,23.3950508 Z"/> - <path fill="#EFEDF8" stroke="#6E49CB" stroke-width="4" d="M27.08832,20.735088 C27.63276,19.10172 29.16132,18 30.88304,18 L33.11696,18 C34.83868,18 36.36724,19.10172 36.91168,20.735088 L39.01368,27.04104 C40.5,27.49452 41.9248,28.08832 43.2732,28.80708 L49.2204,25.8336 C50.7604,25.0636 52.62,25.36544 53.8376,26.58288 L55.4172,28.16248 C56.6348,29.37992 56.9364,31.2398 56.1664,32.77976 L53.1932,38.7268 C53.9116,40.07512 54.5056,41.50012 54.9588,42.98632 L61.2648,45.08832 C62.8984,45.63276 64,47.16132 64,48.88304 L64,51.11696 C64,52.83868 62.8984,54.36724 61.2648,54.91168 L54.9588,57.01368 C54.5056,58.5 53.9116,59.9248 53.1932,61.2732 L56.1664,67.2204 C56.9364,68.76 56.6348,70.62 55.4172,71.8376 L53.8376,73.4172 C52.62,74.6344 50.7604,74.9364 49.2204,74.1664 L43.2732,71.1928 C41.9248,71.9116 40.5,72.5056 39.01368,72.9588 L36.91168,79.2648 C36.36724,80.8984 34.83868,82 33.11696,82 L30.88304,82 C29.16132,82 27.63276,80.8984 27.08832,79.2648 L24.98632,72.9588 C23.50012,72.5056 22.07516,71.9116 20.72688,71.1932 L14.77964,74.1668 C13.23968,74.9368 11.3798,74.6348 10.16236,73.4172 L8.58272,71.8376 C7.36528,70.6204 7.06348,68.7604 7.83344,67.2204 L10.80704,61.2732 C10.08832,59.9248 9.49452,58.5 9.04104,57.01368 L2.735088,54.91168 C1.10172,54.36724 0,52.83868 0,51.11696 L0,48.88304 C0,47.16132 1.10172,45.63276 2.735088,45.08832 L9.04104,42.98632 C9.49452,41.50008 10.08832,40.07504 10.80704,38.72668 L7.83348,32.77952 C7.06348,31.23956 7.36532,29.37968 8.58276,28.16224 L10.16236,26.5826 C11.3798,25.36516 13.23972,25.06336 14.77964,25.83332 L20.72688,28.80696 C22.0752,28.08828 23.50016,27.49448 24.98632,27.04104 L27.08832,20.735088 Z M32,66 C40.8364,66 48,58.8364 48,50 C48,41.16344 40.8364,34 32,34 C23.16344,34 16,41.16344 16,50 C16,58.8364 23.16344,66 32,66 Z"/> - <circle cx="32" cy="50" r="10" stroke="#6E49CB" stroke-linecap="round" stroke-width="2"/> - </g> - <g stroke="#FC6D26" transform="translate(123 78)"> - <circle cx="12" cy="12" r="11" fill="#FFFFFF" stroke-width="2"/> - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M8,12.25 C9.8974359,14.0833333 10.8461538,15 10.8461538,15 C10.8461538,15 12.8974359,13 17,9"/> - </g> - <g transform="translate(0 40)"> - <circle cx="50" cy="50" r="48" fill="#FFFFFF" stroke="#FC6D26" stroke-width="4"/> - <circle cx="21" cy="50" r="4" fill="#6E49CB"/> - <circle cx="79" cy="50" r="4" fill="#6E49CB"/> - <circle cx="50" cy="50" r="27" fill="#FFFFFF" stroke="#E1DBF1" stroke-width="4"/> - <rect width="38" height="24" x="31" y="38" fill="#FFFFFF" stroke="#E1DBF1" stroke-width="2" rx="12"/> - <circle cx="50" cy="69" r="2" fill="#6E49CB"/> - <circle cx="50" cy="69" r="2" fill="#6E49CB"/> - <circle cx="55" cy="69" r="1" fill="#6E49CB"/> - <circle cx="45" cy="69" r="1" fill="#6E49CB"/> - <path stroke="#6E49CB" stroke-linecap="round" stroke-width="2" d="M48 30L52 30M15 50L19 50M81 50L85 50M48 33.5L52 33.5"/> - <path fill="#6E49CB" d="M54.214 52.70154C54.9314 53.11584 55.177 54.0332 54.7628 54.7506 54.2804 55.5856 53.58722 56.2792 52.7524 56.7618 51.91758 57.2442 50.97058 57.4988 50.00632 57.5000085 49.04208 57.5012 48.09448 57.2488 47.25856 56.768 46.42264 56.2874 45.72774 55.5956 45.24358 54.7616 44.8276 54.0452 45.07118 53.12726 45.7876 52.71128 46.4443183 52.3299833 47.2704031 52.5028667 47.7239338 53.0861543L47.83798 53.2553C48.05804 53.63434 48.3739 53.94886 48.75388 54.1674 49.13384 54.3858 49.56456 54.5006 50.00286 54.5 50.44116 54.4994 50.8716 54.3838 51.25108 54.1644 51.554648 53.988944 51.8170384 53.7520992 52.0220822 53.470055L52.16486 53.2503C52.57918 52.53292 53.49658 52.28722 54.214 52.70154zM41 46C42.10456 46 43 46.89544 43 48 43 49.10456 42.10456 50 41 50 39.89544 50 39 49.10456 39 48 39 46.89544 39.89544 46 41 46zM59 46C60.1046 46 61 46.89544 61 48 61 49.10456 60.1046 50 59 50 57.89544 50 57 49.10456 57 48 57 46.89544 57.89544 46 59 46z"/> - </g> - </g> -</svg> diff --git a/config/feature_flags/development/service_desk_vue_list.yml b/config/feature_flags/development/service_desk_vue_list.yml deleted file mode 100644 index 29af75d4442bce17e208fc0604e2b6286ad854b9..0000000000000000000000000000000000000000 --- a/config/feature_flags/development/service_desk_vue_list.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -name: service_desk_vue_list -introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/123064 -rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/415385 -milestone: '16.1' -type: development -group: group::respond -default_enabled: true diff --git a/doc/user/project/service_desk/using_service_desk.md b/doc/user/project/service_desk/using_service_desk.md index 87af46806a281ce2fd9e074795630e79aa4fb72e..a8891304643e60175c65407b13148c228f52f8f8 100644 --- a/doc/user/project/service_desk/using_service_desk.md +++ b/doc/user/project/service_desk/using_service_desk.md @@ -75,13 +75,9 @@ To view Service Desk issues: #### Redesigned issue list > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/413092) in GitLab 16.1 [with a flag](../../../administration/feature_flags.md) named `service_desk_vue_list`. Disabled by default. -> - [Enabled on GitLab.com and self-managed](https://gitlab.com/gitlab-org/gitlab/-/issues/413092) in GitLab 16.5. +> - [Generally available](https://gitlab.com/gitlab-org/gitlab/-/issues/415385) in GitLab 16.10. Feature flag `service_desk_vue_list` removed. -FLAG: -On self-managed GitLab, by default this feature is available. To hide the feature per project or for your entire instance, an administrator can [disable the feature flag](../../../administration/feature_flags.md) named `service_desk_vue_list`. -On GitLab.com, this feature is available. - -When this feature is enabled, the Service Desk issue list more closely matches the regular issue list. +The Service Desk issue list more closely matches the regular issue list. Available features include: - The same sorting and ordering options [as on the issue list](../issues/sorting_issue_lists.md). diff --git a/locale/gitlab.pot b/locale/gitlab.pot index f76ff2cb026d12d26c558cc714d7af3bb29e108b..f28bb13f9550e2eb6768da3d9b333a0c319c5a66 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -46187,9 +46187,6 @@ msgstr "" msgid "ServiceDesk|Enable custom email address" msgstr "" -msgid "ServiceDesk|For help setting up the Service Desk for your instance, please contact an administrator." -msgstr "" - msgid "ServiceDesk|Forward all emails to the custom email address to %{incomingEmail}." msgstr "" @@ -46292,12 +46289,6 @@ msgstr "" msgid "ServiceDesk|Service Desk email address to forward emails to" msgstr "" -msgid "ServiceDesk|Service Desk is not enabled" -msgstr "" - -msgid "ServiceDesk|Service Desk is not supported" -msgstr "" - msgid "ServiceDesk|Service Desk setting missing" msgstr "" @@ -46325,9 +46316,6 @@ msgstr "" msgid "ServiceDesk|This issue has been reopened because it received a new comment from an external participant." msgstr "" -msgid "ServiceDesk|To enable Service Desk on this instance, an instance administrator must first set up incoming email." -msgstr "" - msgid "ServiceDesk|To use a custom email address for this Service Desk, you'll need to configure and verify an email address again." msgstr "" diff --git a/spec/features/issues/service_desk_spec.rb b/spec/features/issues/service_desk_spec.rb index 3a2074b9b13aa28cfbc4fcd6c5251ffc1745ed9b..331a2a226c81f378820de954f8a8334521d92f4c 100644 --- a/spec/features/issues/service_desk_spec.rb +++ b/spec/features/issues/service_desk_spec.rb @@ -15,7 +15,6 @@ project.add_maintainer(user) sign_in(user) - stub_feature_flags(service_desk_vue_list: false) end describe 'navigation to service desk' do @@ -44,145 +43,7 @@ describe 'issues list' do context 'when service desk is supported' do - context 'when there are no issues' do - describe 'service desk info content' do - it 'displays the large info box, documentation, and the address' do - visit service_desk_project_issues_path(project) - - aggregate_failures do - expect(page).to have_css('.empty-state') - expect(page).to have_text('Use Service Desk to connect with your users') - expect(page).to have_link('Learn more.', href: help_page_path('user/project/service_desk/index')) - expect(page).not_to have_link('Enable Service Desk') - expect(page).to have_content(project.service_desk_address) - end - end - - context 'when user does not have permission to edit project settings' do - before do - user_2 = create(:user) - - project.add_guest(user_2) - sign_in(user_2) - visit service_desk_project_issues_path(project) - end - - it 'displays the large info box and the documentation link' do - aggregate_failures do - expect(page).to have_css('.empty-state') - expect(page).to have_text('Use Service Desk to connect with your users') - expect(page).to have_link('Learn more.', href: help_page_path('user/project/service_desk/index')) - expect(page).not_to have_link('Enable Service Desk') - expect(page).not_to have_content(project.service_desk_address) - end - end - end - end - end - - context 'when there are issues' do - let_it_be(:project) { create(:project, :private, service_desk_enabled: true) } - let_it_be(:other_user) { create(:user) } - let_it_be(:service_desk_issue) { create(:issue, project: project, author: support_bot, service_desk_reply_to: 'service.desk@example.com') } - let_it_be(:other_user_issue) { create(:issue, project: project, author: other_user) } - - describe 'service desk info content' do - before do - visit service_desk_project_issues_path(project) - end - - it 'displays the small info box, documentation, a button to configure service desk, and the address' do - aggregate_failures do - expect(page).to have_link('Learn more.', href: help_page_path('user/project/service_desk/index')) - expect(page).not_to have_link('Enable Service Desk') - expect(page).to have_content(project.service_desk_address) - end - end - end - - describe 'issues list' do - before do - visit service_desk_project_issues_path(project) - end - - it 'only displays issues created by support bot' do - expect(page).to have_selector('.issues-list .issue', count: 1) - end - - it 'shows service_desk_reply_to in issues list' do - expect(page).to have_text('by service.desk@example.com via GitLab Support Bot') - end - end - - describe 'search box' do - before do - visit service_desk_project_issues_path(project) - end - - it 'adds hidden support bot author token' do - expect(page).to have_selector('.filtered-search-token .value', text: 'Support Bot', visible: false) - end - - it 'support bot author token cannot be deleted' do - find('.input-token .filtered-search').native.send_key(:backspace) - expect(page).to have_selector('.js-visual-token', count: 1) - end - - it 'support bot author token has been properly added' do - within('.filtered-search-token') do - expect(page).to have_selector('.name', count: 1, visible: false) - expect(page).to have_selector('.operator', count: 1, visible: false) - expect(page).to have_selector('.value-container', count: 1, visible: false) - end - end - end - end - end - - context 'when service desk is not supported' do - let(:project_without_service_desk) { create(:project, :private, service_desk_enabled: false) } - - before do - allow(Gitlab::ServiceDesk).to receive(:supported?).and_return(false) - visit service_desk_project_issues_path(project) - end - - describe 'service desk info content' do - context 'when user has permissions to edit project settings' do - before do - project_without_service_desk.add_maintainer(user) - visit service_desk_project_issues_path(project_without_service_desk) - end - - it 'informs user to setup incoming email to turn on support for Service Desk' do - aggregate_failures do - expect(page).to have_css('.empty-state') - expect(page).to have_text('Service Desk is not supported') - expect(page).to have_text('To enable Service Desk on this instance, an instance administrator must first set up incoming email.') - expect(page).to have_link('Learn more.', href: help_page_path('administration/incoming_email', anchor: 'set-it-up')) - end - end - end - - context 'when user does not have permission to edit project settings' do - before do - project_without_service_desk.add_developer(user) - visit service_desk_project_issues_path(project_without_service_desk) - end - - it 'informs user to contact an administrator to enable service desk' do - expect(page).to have_css('.empty-state') - # NOTE: here, "enabled" is not used in the sense of "ServiceDesk::Enabled?" - expect(page).to have_text('Service Desk is not enabled') - expect(page).to have_text('For help setting up the Service Desk for your instance, please contact an administrator.') - end - end - end - end - - context 'when service_desk_vue_list feature flag is enabled' do before do - stub_feature_flags(service_desk_vue_list: true) stub_feature_flags(frontend_caching: true) end diff --git a/spec/support/rspec_order_todo.yml b/spec/support/rspec_order_todo.yml index c08fc4980a6ca5a054c5565922ff29ab67d23687..10d9e8f6a5750f88c68e5b5f195134e5d7f42a0b 100644 --- a/spec/support/rspec_order_todo.yml +++ b/spec/support/rspec_order_todo.yml @@ -9313,7 +9313,6 @@ - './spec/views/projects/hooks/index.html.haml_spec.rb' - './spec/views/projects/imports/new.html.haml_spec.rb' - './spec/views/projects/issues/_related_branches.html.haml_spec.rb' -- './spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb' - './spec/views/projects/issues/show.html.haml_spec.rb' - './spec/views/projects/jobs/_build.html.haml_spec.rb' - './spec/views/projects/jobs/_generic_commit_status.html.haml_spec.rb' diff --git a/spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb b/spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb deleted file mode 100644 index 92ca0bb52d615dd73039526644864e343a46132b..0000000000000000000000000000000000000000 --- a/spec/views/projects/issues/_service_desk_info_content.html.haml_spec.rb +++ /dev/null @@ -1,95 +0,0 @@ -# frozen_string_literal: true - -require 'spec_helper' - -RSpec.describe 'projects/issues/service_desk/_service_desk_info_content' do - let_it_be(:project) { create(:project) } - let_it_be(:user) { create(:user) } - let_it_be(:service_desk_address) { 'address@example.com' } - - before do - assign(:project, project) - allow(project).to receive(:service_desk_address).and_return(service_desk_address) - allow(view).to receive(:current_user).and_return(user) - end - - context 'when service desk is disabled' do - before do - allow(project).to receive(:service_desk_enabled?).and_return(false) - end - - context 'when the logged user is at least maintainer' do - before do - project.add_maintainer(user) - end - - it 'shows the info including the project settings link', :aggregate_failures do - render - - expect(rendered).to have_text('Use Service Desk') - expect(rendered).not_to have_text(service_desk_address) - expect(rendered).to have_link(href: "/#{project.full_path}/edit") - end - end - - context 'when the logged user is at only a developer' do - before do - project.add_developer(user) - end - - it 'shows the info without the project settings link', :aggregate_failures do - render - - expect(rendered).to have_text('Use Service Desk') - expect(rendered).not_to have_text(service_desk_address) - expect(rendered).not_to have_link(href: "/#{project.full_path}/edit") - end - end - end - - context 'when service desk is enabled' do - before do - allow(project).to receive(:service_desk_enabled?).and_return(true) - end - - context 'when the logged user is at least reporter' do - before do - project.add_reporter(user) - end - - it 'shows the info including the email address', :aggregate_failures do - render - - expect(rendered).to have_text('Use Service Desk') - expect(rendered).to have_text(service_desk_address) - expect(rendered).not_to have_link(href: "/#{project.full_path}/edit") - end - end - - context 'when the logged user is at only a guest' do - before do - project.add_guest(user) - end - - it 'shows the info without the email address', :aggregate_failures do - render - - expect(rendered).to have_text('Use Service Desk') - expect(rendered).not_to have_text(service_desk_address) - expect(rendered).not_to have_link(href: "/#{project.full_path}/edit") - end - end - - context 'when user is not logged in' do - let(:user) { nil } - - it 'shows the info without the email address', :aggregate_failures do - render - - expect(rendered).to have_text('Use Service Desk') - expect(rendered).not_to have_text(service_desk_address) - expect(rendered).not_to have_link(href: "/#{project.full_path}/edit") - end - end - end -end