Commit 2cf8a20b authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch '327436-disable-service-templates-cleanup' into 'master'

Remove :disable_service_templates feature flag [RUN AS-IF-FOSS] [RUN ALL RSPEC]

See merge request gitlab-org/gitlab!64582
parents 6e48a8e0 243c25ee
...@@ -172,10 +172,6 @@ module IntegrationsHelper ...@@ -172,10 +172,6 @@ module IntegrationsHelper
name: integration.to_param name: integration.to_param
} }
end end
def show_service_templates_nav_link?
Feature.disabled?(:disable_service_templates, type: :development, default_enabled: :yaml)
end
end end
IntegrationsHelper.prepend_mod_with('IntegrationsHelper') IntegrationsHelper.prepend_mod_with('IntegrationsHelper')
......
...@@ -209,19 +209,6 @@ ...@@ -209,19 +209,6 @@
= render_if_exists 'layouts/nav/sidebar/credentials_link' = render_if_exists 'layouts/nav/sidebar/credentials_link'
- if show_service_templates_nav_link?
= nav_link(controller: :services) do
= link_to admin_application_settings_services_path do
.nav-icon-container
= sprite_icon('template')
%span.nav-item-name
= _('Service Templates')
%ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :services, html_options: { class: "fly-out-top-item" } ) do
= link_to admin_application_settings_services_path do
%strong.fly-out-top-item-name
= _('Service Templates')
= nav_link(controller: :labels) do = nav_link(controller: :labels) do
= link_to admin_labels_path do = link_to admin_labels_path do
.nav-icon-container .nav-icon-container
......
---
name: disable_service_templates
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/59098
rollout_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/327436
milestone: '13.12'
type: development
group: group::ecosystem
default_enabled: true
...@@ -309,65 +309,6 @@ RSpec.describe 'Admin updates settings' do ...@@ -309,65 +309,6 @@ RSpec.describe 'Admin updates settings' do
end end
end end
context 'when Service Templates are enabled' do
before do
stub_feature_flags(disable_service_templates: false)
visit general_admin_application_settings_path
end
it 'shows Service Templates link' do
expect(page).to have_link('Service Templates')
end
context 'when the Slack Notifications Service template is active' do
before do
create(:service, :template, type: 'SlackService', active: true)
visit general_admin_application_settings_path
end
it 'change Slack Notifications Service template settings', :js do
first(:link, 'Service Templates').click
click_link 'Slack notifications'
fill_in 'Webhook', with: 'http://localhost'
fill_in 'Username', with: 'test_user'
fill_in 'service[push_channel]', with: '#test_channel'
page.check('Notify only broken pipelines')
page.select 'All branches', from: 'Branches to be notified'
page.select 'Match any of the labels', from: 'Labels to be notified behavior'
check_all_events
click_button 'Save changes'
expect(page).to have_content 'Application settings saved successfully'
click_link 'Slack notifications'
expect(page.all('input[type=checkbox]')).to all(be_checked)
expect(find_field('Webhook').value).to eq 'http://localhost'
expect(find_field('Username').value).to eq 'test_user'
expect(find('[name="service[push_channel]"]').value).to eq '#test_channel'
end
it 'defaults Deployment events to false for chat notification template settings', :js do
first(:link, 'Service Templates').click
click_link 'Slack notifications'
expect(find_field('Deployment')).not_to be_checked
end
end
end
context 'When Service templates are disabled' do
before do
stub_feature_flags(disable_service_templates: true)
end
it 'does not show Service Templates link' do
expect(page).not_to have_link('Service Templates')
end
end
context 'Integration page', :js do context 'Integration page', :js do
before do before do
visit integrations_admin_application_settings_path visit integrations_admin_application_settings_path
......
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