Commit 70b6e75b authored by Tom Quirk's avatar Tom Quirk

Remove redundant service template specs

Services templates are deprecated, and we now only show
active service templates. In other words,
users cannot activate new service templates.

This commit removes all redundant specs for service templates.
parent 568a5fdd
......@@ -249,35 +249,6 @@ RSpec.describe 'Admin updates settings' do
expect(page).to have_content "Application settings saved successfully"
expect(current_settings.hide_third_party_offers).to be true
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'
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
context 'Integration page', :js do
......
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Admin activates Prometheus', :js do
let(:admin) { create(:user, :admin) }
before do
sign_in(admin)
gitlab_enable_admin_mode_sign_in(admin)
visit(admin_application_settings_services_path)
click_link('Prometheus')
end
it 'activates service' do
check('Active')
fill_in('API URL', with: 'http://prometheus.example.com')
click_button('Save changes')
expect(page).to have_content('Application settings saved successfully')
end
end
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'admin/services/index.html.haml' do
before do
assign(:services, build_stubbed_list(:service, 1))
assign(:existing_instance_types, [])
end
context 'user has not dismissed Service Templates deprecation message' do
it 'shows the message' do
allow(view).to receive(:show_service_templates_deprecated?).and_return(true)
render
expect(rendered).to have_content('Service Templates will soon be deprecated.')
end
end
context 'user has dismissed Service Templates deprecation message' do
it 'does not show the message' do
allow(view).to receive(:show_service_templates_deprecated?).and_return(false)
render
expect(rendered).not_to have_content('Service Templates will soon be deprecated.')
end
end
end
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