Commit 7de5845a authored by pburdette's avatar pburdette Committed by Payton Burdette

Remove new pipelines table ff

Remove the feature flag and
some instances of it in the
codebase.
parent bda20332
...@@ -90,9 +90,6 @@ export default { ...@@ -90,9 +90,6 @@ export default {
canRenderPipelineButton() { canRenderPipelineButton() {
return this.latestPipelineDetachedFlag; return this.latestPipelineDetachedFlag;
}, },
pipelineButtonClass() {
return !this.glFeatures.newPipelinesTable ? 'gl-md-display-none' : 'gl-lg-display-none';
},
isForkMergeRequest() { isForkMergeRequest() {
return this.sourceProjectFullPath !== this.targetProjectFullPath; return this.sourceProjectFullPath !== this.targetProjectFullPath;
}, },
...@@ -195,8 +192,7 @@ export default { ...@@ -195,8 +192,7 @@ export default {
<gl-button <gl-button
v-if="canRenderPipelineButton" v-if="canRenderPipelineButton"
block block
class="gl-mt-3 gl-mb-3" class="gl-mt-3 gl-mb-3 gl-lg-display-none"
:class="pipelineButtonClass"
variant="confirm" variant="confirm"
data-testid="run_pipeline_button_mobile" data-testid="run_pipeline_button_mobile"
:loading="state.isRunningMergeRequestPipeline" :loading="state.isRunningMergeRequestPipeline"
......
...@@ -17,19 +17,11 @@ export default { ...@@ -17,19 +17,11 @@ export default {
user() { user() {
return this.pipeline.user; return this.pipeline.user;
}, },
classes() {
const triggererClass = 'pipeline-triggerer';
if (this.glFeatures.newPipelinesTable) {
return triggererClass;
}
return `table-section section-10 d-none d-md-block ${triggererClass}`;
},
}, },
}; };
</script> </script>
<template> <template>
<div :class="classes" data-testid="pipeline-triggerer"> <div class="pipeline-triggerer" data-testid="pipeline-triggerer">
<user-avatar-link <user-avatar-link
v-if="user" v-if="user"
:link-href="user.path" :link-href="user.path"
......
...@@ -49,19 +49,11 @@ export default { ...@@ -49,19 +49,11 @@ export default {
autoDevopsHelpPath() { autoDevopsHelpPath() {
return helpPagePath('topics/autodevops/index.md'); return helpPagePath('topics/autodevops/index.md');
}, },
classes() {
const tagsClass = 'pipeline-tags';
if (this.glFeatures.newPipelinesTable) {
return tagsClass;
}
return `table-section section-10 d-none d-md-block ${tagsClass}`;
},
}, },
}; };
</script> </script>
<template> <template>
<div :class="classes" data-testid="pipeline-url-table-cell"> <div class="pipeline-tags" data-testid="pipeline-url-table-cell">
<gl-link <gl-link
:href="pipeline.path" :href="pipeline.path"
data-testid="pipeline-url-link" data-testid="pipeline-url-link"
......
<script> <script>
import { GlTable, GlTooltipDirective } from '@gitlab/ui'; import { GlTable, GlTooltipDirective } from '@gitlab/ui';
import { s__ } from '~/locale'; import { s__ } from '~/locale';
import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import eventHub from '../../event_hub'; import eventHub from '../../event_hub';
import PipelineMiniGraph from './pipeline_mini_graph.vue'; import PipelineMiniGraph from './pipeline_mini_graph.vue';
import PipelineOperations from './pipeline_operations.vue'; import PipelineOperations from './pipeline_operations.vue';
...@@ -91,7 +90,6 @@ export default { ...@@ -91,7 +90,6 @@ export default {
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
mixins: [glFeatureFlagMixin()],
props: { props: {
pipelines: { pipelines: {
type: Array, type: Array,
...@@ -149,41 +147,7 @@ export default { ...@@ -149,41 +147,7 @@ export default {
</script> </script>
<template> <template>
<div class="ci-table"> <div class="ci-table">
<div v-if="!glFeatures.newPipelinesTable" data-testid="legacy-ci-table">
<div class="gl-responsive-table-row table-row-header" role="row">
<div class="table-section section-10 js-pipeline-status" role="rowheader">
{{ s__('Pipeline|Status') }}
</div>
<div class="table-section section-10 js-pipeline-info pipeline-info" role="rowheader">
{{ s__('Pipeline|Pipeline') }}
</div>
<div class="table-section section-10 js-triggerer-info triggerer-info" role="rowheader">
{{ s__('Pipeline|Triggerer') }}
</div>
<div class="table-section section-20 js-pipeline-commit pipeline-commit" role="rowheader">
{{ s__('Pipeline|Commit') }}
</div>
<div class="table-section section-15 js-pipeline-stages pipeline-stages" role="rowheader">
{{ s__('Pipeline|Stages') }}
</div>
<div class="table-section section-15" role="rowheader"></div>
<div class="table-section section-20" role="rowheader">
<slot name="table-header-actions"></slot>
</div>
</div>
<pipelines-table-row-component
v-for="model in pipelines"
:key="model.id"
:pipeline="model"
:pipeline-schedule-url="pipelineScheduleUrl"
:update-graph-dropdown="updateGraphDropdown"
:view-type="viewType"
:canceling-pipeline="cancelingPipeline"
/>
</div>
<gl-table <gl-table
v-else
:fields="$options.fields" :fields="$options.fields"
:items="pipelines" :items="pipelines"
tbody-tr-class="commit" tbody-tr-class="commit"
......
...@@ -48,12 +48,6 @@ export default { ...@@ -48,12 +48,6 @@ export default {
return `${hh}:${mm}:${ss}`; return `${hh}:${mm}:${ss}`;
}, },
legacySectionClass() {
return !this.glFeatures.newPipelinesTable ? 'table-section section-15' : '';
},
legacyTableMobileClass() {
return !this.glFeatures.newPipelinesTable ? 'table-mobile-content' : '';
},
showInProgress() { showInProgress() {
return !this.duration && !this.finishedTime && !this.skipped; return !this.duration && !this.finishedTime && !this.skipped;
}, },
...@@ -64,11 +58,8 @@ export default { ...@@ -64,11 +58,8 @@ export default {
}; };
</script> </script>
<template> <template>
<div :class="legacySectionClass"> <div>
<div v-if="!glFeatures.newPipelinesTable" class="table-mobile-header" role="rowheader"> <div>
{{ s__('Pipeline|Duration') }}
</div>
<div :class="legacyTableMobileClass">
<span v-if="showInProgress" data-testid="pipeline-in-progress"> <span v-if="showInProgress" data-testid="pipeline-in-progress">
<gl-icon <gl-icon
v-if="stuck" v-if="stuck"
......
...@@ -54,8 +54,6 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -54,8 +54,6 @@ class Projects::CommitController < Projects::ApplicationController
# rubocop: disable CodeReuse/ActiveRecord # rubocop: disable CodeReuse/ActiveRecord
def pipelines def pipelines
set_pipeline_feature_flag
@pipelines = @commit.pipelines.order(id: :desc) @pipelines = @commit.pipelines.order(id: :desc)
@pipelines = @pipelines.where(ref: params[:ref]).page(params[:page]).per(30) if params[:ref] @pipelines = @pipelines.where(ref: params[:ref]).page(params[:page]).per(30) if params[:ref]
...@@ -135,10 +133,6 @@ class Projects::CommitController < Projects::ApplicationController ...@@ -135,10 +133,6 @@ class Projects::CommitController < Projects::ApplicationController
private private
def set_pipeline_feature_flag
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
end
def create_new_branch? def create_new_branch?
params[:create_merge_request].present? || !can?(current_user, :push_code, @project) params[:create_merge_request].present? || !can?(current_user, :push_code, @project)
end end
......
...@@ -40,7 +40,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -40,7 +40,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
push_frontend_feature_flag(:codequality_backend_comparison, @project, default_enabled: :yaml) push_frontend_feature_flag(:codequality_backend_comparison, @project, default_enabled: :yaml)
push_frontend_feature_flag(:local_file_reviews, default_enabled: :yaml) push_frontend_feature_flag(:local_file_reviews, default_enabled: :yaml)
push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml) push_frontend_feature_flag(:paginated_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipelines_table, @project, default_enabled: :yaml)
push_frontend_feature_flag(:confidential_notes, @project, default_enabled: :yaml) push_frontend_feature_flag(:confidential_notes, @project, default_enabled: :yaml)
push_frontend_feature_flag(:usage_data_i_testing_summary_widget_total, @project, default_enabled: :yaml) push_frontend_feature_flag(:usage_data_i_testing_summary_widget_total, @project, default_enabled: :yaml)
push_frontend_feature_flag(:improved_emoji_picker, project, default_enabled: :yaml) push_frontend_feature_flag(:improved_emoji_picker, project, default_enabled: :yaml)
......
...@@ -19,7 +19,6 @@ class Projects::PipelinesController < Projects::ApplicationController ...@@ -19,7 +19,6 @@ class Projects::PipelinesController < Projects::ApplicationController
push_frontend_feature_flag(:graphql_pipeline_details, project, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:graphql_pipeline_details, project, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:graphql_pipeline_details_users, current_user, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:graphql_pipeline_details_users, current_user, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:jira_for_vulnerabilities, project, type: :development, default_enabled: :yaml) push_frontend_feature_flag(:jira_for_vulnerabilities, project, type: :development, default_enabled: :yaml)
push_frontend_feature_flag(:new_pipelines_table, project, default_enabled: :yaml)
end end
before_action :ensure_pipeline, only: [:show] before_action :ensure_pipeline, only: [:show]
......
...@@ -30,23 +30,17 @@ describe('Pipelines Table', () => { ...@@ -30,23 +30,17 @@ describe('Pipelines Table', () => {
return pipelines.find((p) => p.user !== null && p.commit !== null); return pipelines.find((p) => p.user !== null && p.commit !== null);
}; };
const createComponent = (props = {}, flagState = false) => { const createComponent = (props = {}) => {
wrapper = extendedWrapper( wrapper = extendedWrapper(
mount(PipelinesTable, { mount(PipelinesTable, {
propsData: { propsData: {
...defaultProps, ...defaultProps,
...props, ...props,
}, },
provide: {
glFeatures: {
newPipelinesTable: flagState,
},
},
}), }),
); );
}; };
const findRows = () => wrapper.findAll('.commit.gl-responsive-table-row');
const findGlTable = () => wrapper.findComponent(GlTable); const findGlTable = () => wrapper.findComponent(GlTable);
const findStatusBadge = () => wrapper.findComponent(PipelinesStatusBadge); const findStatusBadge = () => wrapper.findComponent(PipelinesStatusBadge);
const findPipelineInfo = () => wrapper.findComponent(PipelineUrl); const findPipelineInfo = () => wrapper.findComponent(PipelineUrl);
...@@ -56,8 +50,7 @@ describe('Pipelines Table', () => { ...@@ -56,8 +50,7 @@ describe('Pipelines Table', () => {
const findTimeAgo = () => wrapper.findComponent(PipelinesTimeago); const findTimeAgo = () => wrapper.findComponent(PipelinesTimeago);
const findActions = () => wrapper.findComponent(PipelineOperations); const findActions = () => wrapper.findComponent(PipelineOperations);
const findLegacyTable = () => wrapper.findByTestId('legacy-ci-table'); const findTableRows = () => wrapper.findAllByTestId('pipeline-table-row');
const findTableRows = () => wrapper.findAll('[data-testid="pipeline-table-row"]');
const findStatusTh = () => wrapper.findByTestId('status-th'); const findStatusTh = () => wrapper.findByTestId('status-th');
const findPipelineTh = () => wrapper.findByTestId('pipeline-th'); const findPipelineTh = () => wrapper.findByTestId('pipeline-th');
const findTriggererTh = () => wrapper.findByTestId('triggerer-th'); const findTriggererTh = () => wrapper.findByTestId('triggerer-th');
...@@ -75,52 +68,13 @@ describe('Pipelines Table', () => { ...@@ -75,52 +68,13 @@ describe('Pipelines Table', () => {
wrapper = null; wrapper = null;
}); });
describe('table with feature flag off', () => { describe('Pipelines Table', () => {
describe('renders the table correctly', () => {
beforeEach(() => {
createComponent();
});
it('should render a table', () => {
expect(wrapper.classes()).toContain('ci-table');
});
it('should render table head with correct columns', () => {
expect(wrapper.find('.table-section.js-pipeline-status').text()).toEqual('Status');
expect(wrapper.find('.table-section.js-pipeline-info').text()).toEqual('Pipeline');
expect(wrapper.find('.table-section.js-pipeline-commit').text()).toEqual('Commit');
expect(wrapper.find('.table-section.js-pipeline-stages').text()).toEqual('Stages');
});
});
describe('without data', () => {
it('should render an empty table', () => {
createComponent();
expect(findRows()).toHaveLength(0);
});
});
describe('with data', () => {
it('should render rows', () => {
createComponent({ pipelines: [pipeline], viewType: 'root' });
expect(findRows()).toHaveLength(1);
});
});
});
describe('table with feature flag on', () => {
beforeEach(() => { beforeEach(() => {
createComponent({ pipelines: [pipeline], viewType: 'root' }, true); createComponent({ pipelines: [pipeline], viewType: 'root' });
}); });
it('displays new table', () => { it('displays table', () => {
expect(findGlTable().exists()).toBe(true); expect(findGlTable().exists()).toBe(true);
expect(findLegacyTable().exists()).toBe(false);
}); });
it('should render table head with correct columns', () => { it('should render table head with correct columns', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment