Commit a9697e60 authored by Clement Ho's avatar Clement Ho

Merge branch '218045-remove-create-issue-feature-flag-FE' into 'master'

Remove create issue feature flag

See merge request gitlab-org/gitlab!33213
parents 9d6ae6d6 cda08103
......@@ -14,7 +14,6 @@ import { s__ } from '~/locale';
import query from '../graphql/queries/details.query.graphql';
import { fetchPolicies } from '~/lib/graphql';
import TimeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { ALERTS_SEVERITY_LABELS, trackAlertsDetailsViewsOptions } from '../constants';
import createIssueQuery from '../graphql/mutations/create_issue_from_alert.graphql';
import { visitUrl, joinPaths } from '~/lib/utils/url_utility';
......@@ -47,7 +46,6 @@ export default {
TimeAgoTooltip,
AlertSidebar,
},
mixins: [glFeatureFlagsMixin()],
props: {
alertId: {
type: String,
......@@ -204,7 +202,6 @@ export default {
<template #tool>{{ alert.monitoringTool }}</template>
</gl-sprintf>
</div>
<div v-if="glFeatures.alertManagementCreateAlertIssue">
<gl-button
v-if="alert.issueIid"
class="gl-mt-3 mt-sm-0 align-self-center align-self-sm-baseline alert-details-issue-button"
......@@ -226,7 +223,6 @@ export default {
>
{{ s__('AlertManagement|Create issue') }}
</gl-button>
</div>
<gl-button
:aria-label="__('Toggle sidebar')"
category="primary"
......
......@@ -3,7 +3,6 @@
class Projects::AlertManagementController < Projects::ApplicationController
before_action :authorize_read_alert_management_alert!
before_action do
push_frontend_feature_flag(:alert_management_create_alert_issue, project)
push_frontend_feature_flag(:alert_assignee, project)
end
......
---
title: Create issue from alert
merge_request: 33213
author:
type: added
......@@ -17,13 +17,7 @@ describe('AlertDetails', () => {
const findDetailsTable = () => wrapper.find(GlTable);
function mountComponent({
data,
alertManagementCreateAlertIssue = false,
loading = false,
mountMethod = shallowMount,
stubs = {},
} = {}) {
function mountComponent({ data, loading = false, mountMethod = shallowMount, stubs = {} } = {}) {
wrapper = mountMethod(AlertDetails, {
propsData: {
alertId: 'alertId',
......@@ -33,9 +27,6 @@ describe('AlertDetails', () => {
data() {
return { alert: { ...mockAlert }, ...data };
},
provide: {
glFeatures: { alertManagementCreateAlertIssue },
},
mocks: {
$apollo: {
mutate: jest.fn(),
......@@ -123,17 +114,13 @@ describe('AlertDetails', () => {
});
describe('Create issue from alert', () => {
describe('createIssueFromAlertEnabled feature flag enabled', () => {
it('should display "View issue" button that links the issue page when issue exists', () => {
const issueIid = '3';
mountComponent({
alertManagementCreateAlertIssue: true,
data: { alert: { ...mockAlert, issueIid } },
});
expect(findViewIssueBtn().exists()).toBe(true);
expect(findViewIssueBtn().attributes('href')).toBe(
joinPaths(projectIssuesPath, issueIid),
);
expect(findViewIssueBtn().attributes('href')).toBe(joinPaths(projectIssuesPath, issueIid));
expect(findCreateIssueBtn().exists()).toBe(false);
});
......@@ -141,7 +128,6 @@ describe('AlertDetails', () => {
const issueIid = null;
mountComponent({
mountMethod: mount,
alertManagementCreateAlertIssue: true,
data: { alert: { ...mockAlert, issueIid } },
});
expect(findViewIssueBtn().exists()).toBe(false);
......@@ -168,7 +154,6 @@ describe('AlertDetails', () => {
const errorMsg = 'Something went wrong';
mountComponent({
mountMethod: mount,
alertManagementCreateAlertIssue: true,
data: { alert: { ...mockAlert, alertIid: 1 } },
});
......@@ -181,15 +166,6 @@ describe('AlertDetails', () => {
});
});
describe('createIssueFromAlertEnabled feature flag disabled', () => {
it('should not display a View or Create issue button', () => {
mountComponent({ alertManagementCreateAlertIssue: false });
expect(findCreateIssueBtn().exists()).toBe(false);
expect(findViewIssueBtn().exists()).toBe(false);
});
});
});
describe('View full alert details', () => {
beforeEach(() => {
mountComponent({ data: { alert: mockAlert } });
......
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