2019-07-25 01:24:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-26 17:07:17 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-16 14:09:01 -04:00
|
|
|
RSpec.describe 'Admin activates Prometheus', :js do
|
2018-02-26 17:07:17 -05:00
|
|
|
let(:admin) { create(:user, :admin) }
|
|
|
|
|
|
|
|
before do
|
|
|
|
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')
|
|
|
|
|
|
|
|
expect(page).to have_content('Application settings saved successfully')
|
|
|
|
end
|
|
|
|
end
|