Commit 9a1a4e25 authored by Ezekiel Kigbo's avatar Ezekiel Kigbo

Merge branch '230742-feature-flag-enable-new-create-epic-form' into 'master'

Remove create_epic_form feature flag

See merge request gitlab-org/gitlab!37535
parents ce6e7abd a453e656
...@@ -7,7 +7,6 @@ import { __ } from '~/locale'; ...@@ -7,7 +7,6 @@ import { __ } from '~/locale';
import tooltip from '~/vue_shared/directives/tooltip'; import tooltip from '~/vue_shared/directives/tooltip';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeagoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import epicUtils from '../utils/epic_utils'; import epicUtils from '../utils/epic_utils';
import { statusType } from '../constants'; import { statusType } from '../constants';
...@@ -24,7 +23,6 @@ export default { ...@@ -24,7 +23,6 @@ export default {
GitlabTeamMemberBadge: () => GitlabTeamMemberBadge: () =>
import('ee_component/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue'), import('ee_component/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue'),
}, },
mixins: [glFeatureFlagsMixin()],
computed: { computed: {
...mapState([ ...mapState([
'sidebarCollapsed', 'sidebarCollapsed',
...@@ -50,9 +48,6 @@ export default { ...@@ -50,9 +48,6 @@ export default {
actionButtonText() { actionButtonText() {
return this.isEpicOpen ? __('Close epic') : __('Reopen epic'); return this.isEpicOpen ? __('Close epic') : __('Reopen epic');
}, },
userCanCreate() {
return this.canCreate && this.glFeatures.createEpicForm;
},
}, },
mounted() { mounted() {
/** /**
...@@ -141,7 +136,7 @@ export default { ...@@ -141,7 +136,7 @@ export default {
{{ actionButtonText }} {{ actionButtonText }}
</gl-button> </gl-button>
<gl-button <gl-button
v-if="userCanCreate" v-if="canCreate"
:href="newEpicWebUrl" :href="newEpicWebUrl"
category="secondary" category="secondary"
variant="success" variant="success"
......
...@@ -19,7 +19,6 @@ class Groups::EpicsController < Groups::ApplicationController ...@@ -19,7 +19,6 @@ class Groups::EpicsController < Groups::ApplicationController
before_action do before_action do
push_frontend_feature_flag(:vue_issuable_epic_sidebar, @group) push_frontend_feature_flag(:vue_issuable_epic_sidebar, @group)
push_frontend_feature_flag(:confidential_epics, @group, default_enabled: true) push_frontend_feature_flag(:confidential_epics, @group, default_enabled: true)
push_frontend_feature_flag(:create_epic_form, @group, default_enabled: true)
end end
def new; end def new; end
......
- create_group_epic = can?(current_user, :create_epic, @group) - return unless can?(current_user, :create_epic, @group)
- return unless create_group_epic && Feature.enabled?(:create_epic_form)
%li= link_to _('New epic'), new_group_epic_path(@group) %li= link_to _('New epic'), new_group_epic_path(@group)
...@@ -12,7 +12,6 @@ import { mockEpicMeta, mockEpicData } from '../mock_data'; ...@@ -12,7 +12,6 @@ import { mockEpicMeta, mockEpicData } from '../mock_data';
describe('EpicHeaderComponent', () => { describe('EpicHeaderComponent', () => {
let wrapper; let wrapper;
let store; let store;
let features = {};
beforeEach(() => { beforeEach(() => {
store = createStore(); store = createStore();
...@@ -21,9 +20,6 @@ describe('EpicHeaderComponent', () => { ...@@ -21,9 +20,6 @@ describe('EpicHeaderComponent', () => {
wrapper = shallowMount(EpicHeader, { wrapper = shallowMount(EpicHeader, {
store, store,
provide: {
glFeatures: features,
},
}); });
}); });
...@@ -169,29 +165,19 @@ describe('EpicHeaderComponent', () => { ...@@ -169,29 +165,19 @@ describe('EpicHeaderComponent', () => {
}); });
}); });
it('does not render new epic button without `createEpicForm` feature flag', () => { it('does not render new epic button if user cannot create it', () => {
expect(findNewEpicButton().exists()).toBeFalsy(); store.state.canCreate = false;
});
describe('with `createEpicForm` feature flag', () => { return wrapper.vm.$nextTick().then(() => {
beforeAll(() => { expect(findNewEpicButton().exists()).toBe(false);
features = { createEpicForm: true };
});
it('does not render new epic button if user cannot create it', () => {
store.state.canCreate = false;
return wrapper.vm.$nextTick().then(() => {
expect(findNewEpicButton().exists()).toBe(false);
});
}); });
});
it('renders new epic button if user can create it', () => { it('renders new epic button if user can create it', () => {
store.state.canCreate = true; store.state.canCreate = true;
return wrapper.vm.$nextTick().then(() => { return wrapper.vm.$nextTick().then(() => {
expect(findNewEpicButton().exists()).toBe(true); expect(findNewEpicButton().exists()).toBe(true);
});
}); });
}); });
}); });
......
...@@ -41,21 +41,6 @@ RSpec.describe 'layouts/header/_new_dropdown' do ...@@ -41,21 +41,6 @@ RSpec.describe 'layouts/header/_new_dropdown' do
href: new_group_epic_path(group) href: new_group_epic_path(group)
) )
end end
context 'with the create_epic_form feature flag disabled' do
before do
stub_feature_flags(create_epic_form: false)
end
it 'does not have "New epic" link' do
render
expect(rendered).not_to have_link(
'New epic',
href: new_group_epic_path(group)
)
end
end
end end
end end
end end
......
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