From dda131ac2aeefb90c951ce75196707f256be9a9b Mon Sep 17 00:00:00 2001
From: Briley  Sandlin <bsandlin@gitlab.com>
Date: Thu, 12 Sep 2024 17:55:51 +0000
Subject: [PATCH] Remove needs tab

Remove the needs tab from the pipeline page

Changelog: removed
---
 .../ci/pipeline_details/tabs/pipeline_tabs.vue      | 13 -------------
 .../pipelines/components/pipeline_tabs_spec.js      |  2 --
 locale/gitlab.pot                                   |  3 ---
 spec/features/projects/pipelines/pipeline_spec.rb   |  9 +++------
 .../ci/pipeline_details/tabs/pipeline_tabs_spec.js  |  2 --
 5 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/app/assets/javascripts/ci/pipeline_details/tabs/pipeline_tabs.vue b/app/assets/javascripts/ci/pipeline_details/tabs/pipeline_tabs.vue
index e21d46e5c9bac..9382f805245d4 100644
--- a/app/assets/javascripts/ci/pipeline_details/tabs/pipeline_tabs.vue
+++ b/app/assets/javascripts/ci/pipeline_details/tabs/pipeline_tabs.vue
@@ -9,7 +9,6 @@ import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
 import {
   failedJobsTabName,
   jobsTabName,
-  needsTabName,
   pipelineTabName,
   testReportTabName,
   manualVariablesTabName,
@@ -20,7 +19,6 @@ export default {
     tabs: {
       failedJobsTitle: __('Failed Jobs'),
       jobsTitle: __('Jobs'),
-      needsTitle: __('Needs'),
       pipelineTitle: __('Pipeline'),
       testsTitle: __('Tests'),
       manualVariables: __('Manual Variables'),
@@ -28,7 +26,6 @@ export default {
   },
   tabNames: {
     pipeline: pipelineTabName,
-    needs: needsTabName,
     jobs: jobsTabName,
     failures: failedJobsTabName,
     tests: testReportTabName,
@@ -111,16 +108,6 @@ export default {
     >
       <router-view />
     </gl-tab>
-    <gl-tab
-      ref="dagTab"
-      :title="$options.i18n.tabs.needsTitle"
-      :active="isActive($options.tabNames.needs)"
-      data-testid="dag-tab"
-      lazy
-      @click="navigateTo($options.tabNames.needs)"
-    >
-      <router-view />
-    </gl-tab>
     <gl-tab
       :active="isActive($options.tabNames.jobs)"
       data-testid="jobs-tab"
diff --git a/ee/spec/frontend/pipelines/components/pipeline_tabs_spec.js b/ee/spec/frontend/pipelines/components/pipeline_tabs_spec.js
index 4a2ae4c7049b8..e38522e68eeff 100644
--- a/ee/spec/frontend/pipelines/components/pipeline_tabs_spec.js
+++ b/ee/spec/frontend/pipelines/components/pipeline_tabs_spec.js
@@ -14,7 +14,6 @@ describe('The Pipeline Tabs', () => {
   let wrapper;
 
   const findCodeQualityTab = () => wrapper.findByTestId('code-quality-tab');
-  const findDagTab = () => wrapper.findByTestId('dag-tab');
   const findFailedJobsTab = () => wrapper.findByTestId('failed-jobs-tab');
   const findJobsTab = () => wrapper.findByTestId('jobs-tab');
   const findLicenseTab = () => wrapper.findByTestId('license-tab');
@@ -87,7 +86,6 @@ describe('The Pipeline Tabs', () => {
     it.each`
       tabName          | tabComponent
       ${'Pipeline'}    | ${findPipelineTab}
-      ${'Dag'}         | ${findDagTab}
       ${'Jobs'}        | ${findJobsTab}
       ${'Failed Jobs'} | ${findFailedJobsTab}
       ${'Tests'}       | ${findTestsTab}
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index 850a14249bbe7..0cb60c63d26e4 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -35551,9 +35551,6 @@ msgstr ""
 msgid "Nav|Sign out and sign in with a different account"
 msgstr ""
 
-msgid "Needs"
-msgstr ""
-
 msgid "Needs attention"
 msgstr ""
 
diff --git a/spec/features/projects/pipelines/pipeline_spec.rb b/spec/features/projects/pipelines/pipeline_spec.rb
index e5439bc89e04e..6b791f5a1c112 100644
--- a/spec/features/projects/pipelines/pipeline_spec.rb
+++ b/spec/features/projects/pipelines/pipeline_spec.rb
@@ -467,10 +467,9 @@
         visit_pipeline
       end
 
-      it 'shows Pipeline, Jobs, DAG and Failed Jobs tabs with link' do
+      it 'shows Pipeline, Jobs, and Failed Jobs tabs with link' do
         expect(page).to have_link('Pipeline')
         expect(page).to have_link('Jobs')
-        expect(page).to have_link('Needs')
         expect(page).to have_link('Failed Jobs')
       end
 
@@ -1034,10 +1033,9 @@
     end
 
     context 'page tabs' do
-      it 'shows Pipeline, Jobs and DAG tabs with link' do
+      it 'shows Pipeline and Jobs tabs with link' do
         expect(page).to have_link('Pipeline')
         expect(page).to have_link('Jobs')
-        expect(page).to have_link('Needs')
       end
 
       it 'shows counter in Jobs tab' do
@@ -1234,10 +1232,9 @@
     end
 
     context 'page tabs' do
-      it 'shows Pipeline, Jobs and DAG tabs with link' do
+      it 'shows Pipeline and Jobs tabs with link' do
         expect(page).to have_link('Pipeline')
         expect(page).to have_link('Jobs')
-        expect(page).to have_link('Needs')
       end
     end
   end
diff --git a/spec/frontend/ci/pipeline_details/tabs/pipeline_tabs_spec.js b/spec/frontend/ci/pipeline_details/tabs/pipeline_tabs_spec.js
index e90c32170d1c0..9bc7de89a7eb3 100644
--- a/spec/frontend/ci/pipeline_details/tabs/pipeline_tabs_spec.js
+++ b/spec/frontend/ci/pipeline_details/tabs/pipeline_tabs_spec.js
@@ -12,7 +12,6 @@ describe('The Pipeline Tabs', () => {
 
   const $router = { push: jest.fn() };
 
-  const findDagTab = () => wrapper.findByTestId('dag-tab');
   const findFailedJobsTab = () => wrapper.findByTestId('failed-jobs-tab');
   const findJobsTab = () => wrapper.findByTestId('jobs-tab');
   const findPipelineTab = () => wrapper.findByTestId('pipeline-tab');
@@ -53,7 +52,6 @@ describe('The Pipeline Tabs', () => {
     it.each`
       tabName          | tabComponent
       ${'Pipeline'}    | ${findPipelineTab}
-      ${'Dag'}         | ${findDagTab}
       ${'Jobs'}        | ${findJobsTab}
       ${'Failed Jobs'} | ${findFailedJobsTab}
       ${'Tests'}       | ${findTestsTab}
-- 
GitLab