Commit 721e73e7 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch 'cleanup/pipeline_editor_branch_switcher' into 'master'

Clean up feature flag for pipeline editor branch switcher

See merge request gitlab-org/gitlab!66717
parents 2a97c885 a8f2168e
<script>
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import BranchSwitcher from './branch_switcher.vue';
export default {
components: {
BranchSwitcher,
},
mixins: [glFeatureFlagsMixin()],
computed: {
showBranchSwitcher() {
return this.glFeatures.pipelineEditorBranchSwitcher;
},
},
};
</script>
<template>
<div class="gl-mb-4">
<branch-switcher v-if="showBranchSwitcher" v-on="$listeners" />
<branch-switcher v-on="$listeners" />
</div>
</template>
......@@ -24,9 +24,6 @@ export default {
},
},
computed: {
showFileNav() {
return this.glFeatures.pipelineEditorBranchSwitcher;
},
showCTAButton() {
return this.glFeatures.pipelineEditorEmptyStateAction;
},
......@@ -40,7 +37,7 @@ export default {
</script>
<template>
<div>
<pipeline-editor-file-nav v-if="showFileNav" v-on="$listeners" />
<pipeline-editor-file-nav v-on="$listeners" />
<div class="gl-display-flex gl-flex-direction-column gl-align-items-center gl-mt-11">
<img :src="emptyStateIllustrationPath" />
<h1 class="gl-font-size-h1">{{ $options.i18n.title }}</h1>
......
......@@ -4,7 +4,6 @@ class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action :check_can_collaborate!
before_action do
push_frontend_feature_flag(:pipeline_editor_empty_state_action, @project, default_enabled: :yaml)
push_frontend_feature_flag(:pipeline_editor_branch_switcher, @project, default_enabled: :yaml)
push_frontend_feature_flag(:pipeline_editor_drawer, @project, default_enabled: :yaml)
push_frontend_feature_flag(:schema_linting, @project, default_enabled: :yaml)
end
......
---
name: pipeline_editor_branch_switcher
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/57562
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/326189
milestone: '13.11'
type: development
group: group::pipeline authoring
default_enabled: true
......@@ -58,14 +58,12 @@ module QA
end
before do
Runtime::Feature.enable(:pipeline_editor_branch_switcher)
Flow::Login.sign_in
project.visit!
Page::Project::Menu.perform(&:go_to_pipeline_editor)
end
after do
Runtime::Feature.disable(:pipeline_editor_branch_switcher)
project.remove_via_api!
Page::Main::Menu.perform(&:sign_out)
end
......
......@@ -27,10 +27,6 @@ RSpec.describe 'Pipeline Editor', :js do
end
context 'branch switcher' do
before do
stub_feature_flags(pipeline_editor_branch_switcher: true)
end
def switch_to_branch(branch)
find('[data-testid="branch-selector"]').click
......
......@@ -4,16 +4,10 @@ import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipelin
describe('Pipeline editor file nav', () => {
let wrapper;
const mockProvide = {
glFeatures: {
pipelineEditorBranchSwitcher: true,
},
};
const createComponent = ({ provide = {} } = {}) => {
wrapper = shallowMount(PipelineEditorFileNav, {
provide: {
...mockProvide,
...provide,
},
});
......@@ -34,16 +28,4 @@ describe('Pipeline editor file nav', () => {
expect(findBranchSwitcher().exists()).toBe(true);
});
});
describe('with branch switcher feature flag OFF', () => {
it('does not render the branch switcher', () => {
createComponent({
provide: {
glFeatures: { pipelineEditorBranchSwitcher: false },
},
});
expect(findBranchSwitcher().exists()).toBe(false);
});
});
});
......@@ -7,7 +7,6 @@ describe('Pipeline editor empty state', () => {
let wrapper;
const defaultProvide = {
glFeatures: {
pipelineEditorBranchSwitcher: true,
pipelineEditorEmptyStateAction: false,
},
emptyStateIllustrationPath: 'my/svg/path',
......@@ -82,17 +81,5 @@ describe('Pipeline editor empty state', () => {
await findConfirmButton().vm.$emit('click');
expect(wrapper.emitted(expectedEvent)).toHaveLength(1);
});
describe('with branch switcher feature flag OFF', () => {
it('does not render the file nav', () => {
createComponent({
provide: {
glFeatures: { pipelineEditorBranchSwitcher: false },
},
});
expect(findFileNav().exists()).toBe(false);
});
});
});
});
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