Removes feature flag for ciEnvironmentsStatusChanges
This commit is contained in:
parent
a407bba81a
commit
9736eff056
|
@ -40,10 +40,8 @@ export default {
|
|||
failed: __('Failed to deploy to'),
|
||||
},
|
||||
data() {
|
||||
const features = window.gon.features || {};
|
||||
return {
|
||||
isStopping: false,
|
||||
enableCiEnvironmentsStatusChanges: features.ciEnvironmentsStatusChanges,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -74,10 +72,7 @@ export default {
|
|||
: '';
|
||||
},
|
||||
shouldRenderDropdown() {
|
||||
return (
|
||||
this.enableCiEnvironmentsStatusChanges &&
|
||||
(this.deployment.changes && this.deployment.changes.length > 0)
|
||||
);
|
||||
return this.deployment.changes && this.deployment.changes.length > 0;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
|
|
@ -14,9 +14,6 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
|
|||
before_action :set_issuables_index, only: [:index]
|
||||
before_action :authenticate_user!, only: [:assign_related_issues]
|
||||
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
|
||||
@merge_requests = @issuables
|
||||
|
|
|
@ -37,7 +37,7 @@ class EnvironmentStatusEntity < Grape::Entity
|
|||
es.deployment.try(:formatted_deployment_time)
|
||||
end
|
||||
|
||||
expose :changes, if: ->(*) { Feature.enabled?(:ci_environments_status_changes, project) }
|
||||
expose :changes
|
||||
|
||||
private
|
||||
|
||||
|
|
|
@ -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', () => {
|
||||
beforeEach(() => {
|
||||
window.gon = window.gon || {};
|
||||
window.gon.features = window.gon.features || {};
|
||||
window.gon.features.ciEnvironmentsStatusChanges = true;
|
||||
delete deploymentMockData.changes;
|
||||
|
||||
vm = mountComponent(Component, { deployment: { ...deploymentMockData } });
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
delete window.gon.features.ciEnvironmentsStatusChanges;
|
||||
});
|
||||
|
||||
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-deploy-url-feature-flag')).not.toBeNull();
|
||||
|
|
|
@ -458,10 +458,6 @@ describe('mrWidgetOptions', () => {
|
|||
};
|
||||
|
||||
beforeEach(done => {
|
||||
window.gon = window.gon || {};
|
||||
window.gon.features = window.gon.features || {};
|
||||
window.gon.features.ciEnvironmentsStatusChanges = true;
|
||||
|
||||
vm.mr.deployments.push(
|
||||
{
|
||||
...deploymentMockData,
|
||||
|
|
|
@ -33,14 +33,6 @@ describe EnvironmentStatusEntity do
|
|||
it { is_expected.not_to include(:metrics_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
|
||||
before do
|
||||
project.add_maintainer(user)
|
||||
|
|
Loading…
Reference in New Issue