Commit 812b7d2d authored by Sarah Groff Hennigh-Palermo's avatar Sarah Groff Hennigh-Palermo

Merge branch 'fc-remove-pipeline-editor-empty-state-flag' into 'master'

Remove feature flag for CTA in empty state

See merge request gitlab-org/gitlab!71952
parents e1181056 e62bc455
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
import { GlButton, GlSprintf } from '@gitlab/ui'; import { GlButton, GlSprintf } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue'; import PipelineEditorFileNav from '~/pipeline_editor/components/file_nav/pipeline_editor_file_nav.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default { export default {
components: { components: {
...@@ -17,17 +16,11 @@ export default { ...@@ -17,17 +16,11 @@ export default {
), ),
btnText: __('Create new CI/CD pipeline'), btnText: __('Create new CI/CD pipeline'),
}, },
mixins: [glFeatureFlagsMixin()],
inject: { inject: {
emptyStateIllustrationPath: { emptyStateIllustrationPath: {
default: '', default: '',
}, },
}, },
computed: {
showCTAButton() {
return this.glFeatures.pipelineEditorEmptyStateAction;
},
},
methods: { methods: {
createEmptyConfigFile() { createEmptyConfigFile() {
this.$emit('createEmptyConfigFile'); this.$emit('createEmptyConfigFile');
...@@ -48,12 +41,7 @@ export default { ...@@ -48,12 +41,7 @@ export default {
</template> </template>
</gl-sprintf> </gl-sprintf>
</p> </p>
<gl-button <gl-button variant="confirm" class="gl-mt-3" @click="createEmptyConfigFile">
v-if="showCTAButton"
variant="confirm"
class="gl-mt-3"
@click="createEmptyConfigFile"
>
{{ $options.i18n.btnText }} {{ $options.i18n.btnText }}
</gl-button> </gl-button>
</div> </div>
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
class Projects::Ci::PipelineEditorController < Projects::ApplicationController class Projects::Ci::PipelineEditorController < Projects::ApplicationController
before_action :check_can_collaborate! before_action :check_can_collaborate!
before_action do before_action do
push_frontend_feature_flag(:pipeline_editor_empty_state_action, @project, default_enabled: :yaml)
push_frontend_feature_flag(:pipeline_editor_drawer, @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) push_frontend_feature_flag(:schema_linting, @project, default_enabled: :yaml)
end end
......
---
name: pipeline_editor_empty_state_action
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55414
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/323229
milestone: '13.10'
type: development
group: group::pipeline authoring
default_enabled: true
...@@ -6,9 +6,6 @@ import PipelineEditorEmptyState from '~/pipeline_editor/components/ui/pipeline_e ...@@ -6,9 +6,6 @@ import PipelineEditorEmptyState from '~/pipeline_editor/components/ui/pipeline_e
describe('Pipeline editor empty state', () => { describe('Pipeline editor empty state', () => {
let wrapper; let wrapper;
const defaultProvide = { const defaultProvide = {
glFeatures: {
pipelineEditorEmptyStateAction: false,
},
emptyStateIllustrationPath: 'my/svg/path', emptyStateIllustrationPath: 'my/svg/path',
}; };
...@@ -51,24 +48,6 @@ describe('Pipeline editor empty state', () => { ...@@ -51,24 +48,6 @@ describe('Pipeline editor empty state', () => {
expect(findFileNav().exists()).toBe(true); expect(findFileNav().exists()).toBe(true);
}); });
describe('with feature flag off', () => {
it('does not renders a CTA button', () => {
expect(findConfirmButton().exists()).toBe(false);
});
});
});
describe('with feature flag on', () => {
beforeEach(() => {
createComponent({
provide: {
glFeatures: {
pipelineEditorEmptyStateAction: true,
},
},
});
});
it('renders a CTA button', () => { it('renders a CTA button', () => {
expect(findConfirmButton().exists()).toBe(true); expect(findConfirmButton().exists()).toBe(true);
expect(findConfirmButton().text()).toBe(wrapper.vm.$options.i18n.btnText); expect(findConfirmButton().text()).toBe(wrapper.vm.$options.i18n.btnText);
......
...@@ -22,7 +22,6 @@ import { ...@@ -22,7 +22,6 @@ import {
mockCiConfigPath, mockCiConfigPath,
mockCiConfigQueryResponse, mockCiConfigQueryResponse,
mockBlobContentQueryResponse, mockBlobContentQueryResponse,
mockBlobContentQueryResponseEmptyCiFile,
mockBlobContentQueryResponseNoCiFile, mockBlobContentQueryResponseNoCiFile,
mockCiYml, mockCiYml,
mockCommitSha, mockCommitSha,
...@@ -43,9 +42,6 @@ const MockSourceEditor = { ...@@ -43,9 +42,6 @@ const MockSourceEditor = {
const mockProvide = { const mockProvide = {
ciConfigPath: mockCiConfigPath, ciConfigPath: mockCiConfigPath,
defaultBranch: mockDefaultBranch, defaultBranch: mockDefaultBranch,
glFeatures: {
pipelineEditorEmptyStateAction: false,
},
projectFullPath: mockProjectFullPath, projectFullPath: mockProjectFullPath,
}; };
...@@ -221,37 +217,12 @@ describe('Pipeline editor app component', () => { ...@@ -221,37 +217,12 @@ describe('Pipeline editor app component', () => {
}); });
}); });
describe('with an empty CI config file', () => { describe('with no CI config setup', () => {
describe('with empty state feature flag on', () => { it('user can click on CTA button to get started', async () => {
it('does not show the empty screen state', async () => {
mockBlobContentData.mockResolvedValue(mockBlobContentQueryResponseEmptyCiFile);
await createComponentWithApollo({
provide: {
glFeatures: {
pipelineEditorEmptyStateAction: true,
},
},
});
expect(findEmptyState().exists()).toBe(false);
expect(findTextEditor().exists()).toBe(true);
});
});
});
describe('when landing on the empty state with feature flag on', () => {
it('user can click on CTA button and see an empty editor', async () => {
mockBlobContentData.mockResolvedValue(mockBlobContentQueryResponseNoCiFile); mockBlobContentData.mockResolvedValue(mockBlobContentQueryResponseNoCiFile);
mockLatestCommitShaQuery.mockResolvedValue(mockEmptyCommitShaResults); mockLatestCommitShaQuery.mockResolvedValue(mockEmptyCommitShaResults);
await createComponentWithApollo({ await createComponentWithApollo();
provide: {
glFeatures: {
pipelineEditorEmptyStateAction: true,
},
},
});
expect(findEmptyState().exists()).toBe(true); expect(findEmptyState().exists()).toBe(true);
expect(findTextEditor().exists()).toBe(false); expect(findTextEditor().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