Commit 0e84ab34 authored by Phil Hughes's avatar Phil Hughes

Merge branch '52937-remove-feature-flag' into 'master'

Removes feature flag for ciEnvironmentsStatusChanges

Closes #52937

See merge request gitlab-org/gitlab-ce!22947
parents a407bba8 9736eff0
...@@ -40,10 +40,8 @@ export default { ...@@ -40,10 +40,8 @@ export default {
failed: __('Failed to deploy to'), failed: __('Failed to deploy to'),
}, },
data() { data() {
const features = window.gon.features || {};
return { return {
isStopping: false, isStopping: false,
enableCiEnvironmentsStatusChanges: features.ciEnvironmentsStatusChanges,
}; };
}, },
computed: { computed: {
...@@ -74,10 +72,7 @@ export default { ...@@ -74,10 +72,7 @@ export default {
: ''; : '';
}, },
shouldRenderDropdown() { shouldRenderDropdown() {
return ( return this.deployment.changes && this.deployment.changes.length > 0;
this.enableCiEnvironmentsStatusChanges &&
(this.deployment.changes && this.deployment.changes.length > 0)
);
}, },
}, },
methods: { methods: {
......
...@@ -14,9 +14,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo ...@@ -14,9 +14,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action :set_issuables_index, only: [:index] before_action :set_issuables_index, only: [:index]
before_action :authenticate_user!, only: [:assign_related_issues] before_action :authenticate_user!, only: [:assign_related_issues]
before_action :check_user_can_push_to_source_branch!, only: [:rebase] before_action :check_user_can_push_to_source_branch!, only: [:rebase]
before_action do
push_frontend_feature_flag(:ci_environments_status_changes)
end
def index def index
@merge_requests = @issuables @merge_requests = @issuables
......
...@@ -37,7 +37,7 @@ class EnvironmentStatusEntity < Grape::Entity ...@@ -37,7 +37,7 @@ class EnvironmentStatusEntity < Grape::Entity
es.deployment.try(:formatted_deployment_time) es.deployment.try(:formatted_deployment_time)
end end
expose :changes, if: ->(*) { Feature.enabled?(:ci_environments_status_changes, project) } expose :changes
private private
......
...@@ -174,57 +174,13 @@ describe('Deployment component', () => { ...@@ -174,57 +174,13 @@ describe('Deployment component', () => {
}); });
}); });
describe('with `features.ciEnvironmentsStatusChanges` enabled', () => {
beforeEach(() => {
window.gon = window.gon || {};
window.gon.features = window.gon.features || {};
window.gon.features.ciEnvironmentsStatusChanges = true;
vm = mountComponent(Component, { deployment: { ...deploymentMockData } });
});
afterEach(() => {
window.gon.features = {};
});
it('renders dropdown with changes', () => {
expect(vm.$el.querySelector('.js-mr-wigdet-deployment-dropdown')).not.toBeNull();
expect(vm.$el.querySelector('.js-deploy-url-feature-flag')).toBeNull();
});
});
describe('with `features.ciEnvironmentsStatusChanges` disabled', () => {
beforeEach(() => {
window.gon = window.gon || {};
window.gon.features = window.gon.features || {};
window.gon.features.ciEnvironmentsStatusChanges = false;
vm = mountComponent(Component, { deployment: { ...deploymentMockData } });
});
afterEach(() => {
delete window.gon.features.ciEnvironmentsStatusChanges;
});
it('renders the old link to the review app', () => {
expect(vm.$el.querySelector('.js-mr-wigdet-deployment-dropdown')).toBeNull();
expect(vm.$el.querySelector('.js-deploy-url-feature-flag')).not.toBeNull();
});
});
describe('without changes', () => { describe('without changes', () => {
beforeEach(() => { beforeEach(() => {
window.gon = window.gon || {};
window.gon.features = window.gon.features || {};
window.gon.features.ciEnvironmentsStatusChanges = true;
delete deploymentMockData.changes; delete deploymentMockData.changes;
vm = mountComponent(Component, { deployment: { ...deploymentMockData } }); vm = mountComponent(Component, { deployment: { ...deploymentMockData } });
}); });
afterEach(() => {
delete window.gon.features.ciEnvironmentsStatusChanges;
});
it('renders the link to the review app without dropdown', () => { it('renders the link to the review app without dropdown', () => {
expect(vm.$el.querySelector('.js-mr-wigdet-deployment-dropdown')).toBeNull(); expect(vm.$el.querySelector('.js-mr-wigdet-deployment-dropdown')).toBeNull();
expect(vm.$el.querySelector('.js-deploy-url-feature-flag')).not.toBeNull(); expect(vm.$el.querySelector('.js-deploy-url-feature-flag')).not.toBeNull();
......
...@@ -458,10 +458,6 @@ describe('mrWidgetOptions', () => { ...@@ -458,10 +458,6 @@ describe('mrWidgetOptions', () => {
}; };
beforeEach(done => { beforeEach(done => {
window.gon = window.gon || {};
window.gon.features = window.gon.features || {};
window.gon.features.ciEnvironmentsStatusChanges = true;
vm.mr.deployments.push( vm.mr.deployments.push(
{ {
...deploymentMockData, ...deploymentMockData,
......
...@@ -33,14 +33,6 @@ describe EnvironmentStatusEntity do ...@@ -33,14 +33,6 @@ describe EnvironmentStatusEntity do
it { is_expected.not_to include(:metrics_url) } it { is_expected.not_to include(:metrics_url) }
it { is_expected.not_to include(:metrics_monitoring_url) } it { is_expected.not_to include(:metrics_monitoring_url) }
context 'when :ci_environments_status_changes feature flag is disabled' do
before do
stub_feature_flags(ci_environments_status_changes: false)
end
it { is_expected.not_to include(:changes) }
end
context 'when the user is project maintainer' do context 'when the user is project maintainer' do
before do before do
project.add_maintainer(user) project.add_maintainer(user)
......
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