Commit 20c3a18e authored by Justin Ho's avatar Justin Ho

Fix specs and hide old views when ff is enabled

- Stub existing specs to not use the feature flag.
- Only show wither the HAML or Vue version of triggers.
parent 88081a24
...@@ -44,7 +44,7 @@ export default { ...@@ -44,7 +44,7 @@ export default {
</script> </script>
<template> <template>
<gl-form-group label="Trigger" label-for="trigger-fields"> <gl-form-group :label="__('Trigger')" label-for="trigger-fields">
<div id="trigger-fields"> <div id="trigger-fields">
<gl-form-group v-for="event in events" :key="event.title" :description="event.description"> <gl-form-group v-for="event in events" :key="event.title" :description="event.description">
<input :name="checkboxName(event.name)" type="hidden" value="false" /> <input :name="checkboxName(event.name)" type="hidden" value="false" />
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.js-vue-integration-settings{ data: { show_active: @service.show_active_box?.to_s, activated: (@service.active || @service.new_record?).to_s, type: @service.to_param, merge_request_events: @service.merge_requests_events.to_s, .js-vue-integration-settings{ data: { show_active: @service.show_active_box?.to_s, activated: (@service.active || @service.new_record?).to_s, type: @service.to_param, merge_request_events: @service.merge_requests_events.to_s,
commit_events: @service.commit_events.to_s, enable_comments: @service.comment_on_event_enabled.to_s, comment_detail: @service.comment_detail, trigger_events: Feature.enabled?(:integration_form_refactor) ? @service.configurable_events_json : [] } } commit_events: @service.commit_events.to_s, enable_comments: @service.comment_on_event_enabled.to_s, comment_detail: @service.comment_detail, trigger_events: Feature.enabled?(:integration_form_refactor) ? @service.configurable_events_json : [] } }
- if @service.configurable_events.present? && !@service.is_a?(JiraService) - if @service.configurable_events.present? && !@service.is_a?(JiraService) && Feature.disabled?(:integration_form_refactor)
.form-group.row .form-group.row
%label.col-form-label.col-sm-2= _('Trigger') %label.col-form-label.col-sm-2= _('Trigger')
......
...@@ -198,7 +198,7 @@ describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_moc ...@@ -198,7 +198,7 @@ describe 'Admin updates settings', :clean_gitlab_redis_shared_state, :do_not_moc
context 'Integrations page' do context 'Integrations page' do
before do before do
stub_feature_flags(instance_level_integrations: false) stub_feature_flags(instance_level_integrations: false, integration_form_refactor: false)
visit integrations_admin_application_settings_path visit integrations_admin_application_settings_path
end end
......
...@@ -5,6 +5,7 @@ shared_context 'project service activation' do ...@@ -5,6 +5,7 @@ shared_context 'project service activation' do
let(:user) { create(:user) } let(:user) { create(:user) }
before do before do
stub_feature_flags(integration_form_refactor: false)
project.add_maintainer(user) project.add_maintainer(user)
sign_in(user) sign_in(user)
end end
......
...@@ -7,6 +7,8 @@ describe 'projects/services/_form' do ...@@ -7,6 +7,8 @@ describe 'projects/services/_form' do
let(:user) { create(:admin) } let(:user) { create(:admin) }
before do before do
stub_feature_flags(integration_form_refactor: false)
assign(:project, project) assign(:project, project)
allow(controller).to receive(:current_user).and_return(user) allow(controller).to receive(:current_user).and_return(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