Commit 820f7979 authored by David Barr's avatar David Barr Committed by Nathan Friend

Remove release_asset_link_editing feature flag

This feature flag was introduced by:

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26821

and was made default by:

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/28816

It is now safe to remove.
parent c94aa77f
......@@ -6,7 +6,6 @@ import MarkdownField from '~/vue_shared/components/markdown/field.vue';
import { BACK_URL_PARAM } from '~/releases/constants';
import { getParameterByName } from '~/lib/utils/common_utils';
import AssetLinksForm from './asset_links_form.vue';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import MilestoneCombobox from '~/milestones/project_milestone_combobox.vue';
import TagField from './tag_field.vue';
......@@ -22,7 +21,6 @@ export default {
MilestoneCombobox,
TagField,
},
mixins: [glFeatureFlagsMixin()],
computed: {
...mapState('detail', [
'isFetchingRelease',
......@@ -68,9 +66,6 @@ export default {
cancelPath() {
return getParameterByName(BACK_URL_PARAM) || this.releasesPagePath;
},
showAssetLinksForm() {
return this.glFeatures.releaseAssetLinkEditing;
},
saveButtonLabel() {
return this.isExistingRelease ? __('Save changes') : __('Create release');
},
......@@ -176,7 +171,7 @@ export default {
</div>
</gl-form-group>
<asset-links-form v-if="showAssetLinksForm" />
<asset-links-form />
<div class="d-flex pt-3">
<gl-button
......
......@@ -7,7 +7,6 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action :authorize_read_release!
before_action do
push_frontend_feature_flag(:release_evidence_collection, project, default_enabled: true)
push_frontend_feature_flag(:release_asset_link_editing, project, default_enabled: true)
push_frontend_feature_flag(:graphql_release_data, project, default_enabled: true)
push_frontend_feature_flag(:graphql_milestone_stats, project, default_enabled: true)
push_frontend_feature_flag(:graphql_releases_page, project, default_enabled: true)
......
......@@ -20,7 +20,7 @@ describe('Release edit/new component', () => {
let state;
let mock;
const factory = ({ featureFlags = {}, store: storeUpdates = {} } = {}) => {
const factory = async ({ featureFlags = {}, store: storeUpdates = {} } = {}) => {
state = {
release,
markdownDocsPath: 'path/to/markdown/docs',
......@@ -68,6 +68,8 @@ describe('Release edit/new component', () => {
},
});
await wrapper.vm.$nextTick();
wrapper.element.querySelectorAll('input').forEach(input => jest.spyOn(input, 'focus'));
};
......@@ -89,7 +91,9 @@ describe('Release edit/new component', () => {
const findForm = () => wrapper.find('form');
describe(`basic functionality tests: all tests unrelated to the "${BACK_URL_PARAM}" parameter`, () => {
beforeEach(factory);
beforeEach(async () => {
await factory();
});
it('calls initializeRelease when the component is created', () => {
expect(actions.initializeRelease).toHaveBeenCalledTimes(1);
......@@ -131,7 +135,9 @@ describe('Release edit/new component', () => {
});
describe(`when the URL does not contain a "${BACK_URL_PARAM}" parameter`, () => {
beforeEach(factory);
beforeEach(async () => {
await factory();
});
it(`renders a "Cancel" button with an href pointing to "${BACK_URL_PARAM}"`, () => {
const cancelButton = wrapper.find('.js-cancel-button');
......@@ -142,12 +148,12 @@ describe('Release edit/new component', () => {
describe(`when the URL contains a "${BACK_URL_PARAM}" parameter`, () => {
const backUrl = 'https://example.gitlab.com/back/url';
beforeEach(() => {
beforeEach(async () => {
commonUtils.getParameterByName = jest
.fn()
.mockImplementation(paramToGet => ({ [BACK_URL_PARAM]: backUrl }[paramToGet]));
factory();
await factory();
});
it('renders a "Cancel" button with an href pointing to the main Releases page', () => {
......@@ -157,8 +163,8 @@ describe('Release edit/new component', () => {
});
describe('when creating a new release', () => {
beforeEach(() => {
factory({
beforeEach(async () => {
await factory({
store: {
modules: {
detail: {
......@@ -177,7 +183,9 @@ describe('Release edit/new component', () => {
});
describe('when editing an existing release', () => {
beforeEach(factory);
beforeEach(async () => {
await factory();
});
it('renders the submit button with the text "Save changes"', () => {
expect(findSubmitButton().text()).toBe('Save changes');
......@@ -185,33 +193,17 @@ describe('Release edit/new component', () => {
});
describe('asset links form', () => {
const findAssetLinksForm = () => wrapper.find(AssetLinksForm);
describe('when the release_asset_link_editing feature flag is disabled', () => {
beforeEach(() => {
factory({ featureFlags: { releaseAssetLinkEditing: false } });
});
it('does not render the asset links portion of the form', () => {
expect(findAssetLinksForm().exists()).toBe(false);
});
});
describe('when the release_asset_link_editing feature flag is enabled', () => {
beforeEach(() => {
factory({ featureFlags: { releaseAssetLinkEditing: true } });
});
beforeEach(factory);
it('renders the asset links portion of the form', () => {
expect(findAssetLinksForm().exists()).toBe(true);
});
it('renders the asset links portion of the form', () => {
expect(wrapper.find(AssetLinksForm).exists()).toBe(true);
});
});
describe('validation', () => {
describe('when the form is valid', () => {
beforeEach(() => {
factory({
beforeEach(async () => {
await factory({
store: {
modules: {
detail: {
......@@ -230,8 +222,8 @@ describe('Release edit/new component', () => {
});
describe('when the form is invalid', () => {
beforeEach(() => {
factory({
beforeEach(async () => {
await factory({
store: {
modules: {
detail: {
......
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