summaryrefslogtreecommitdiff
path: root/spec/features/projects/integrations/user_activates_prometheus_spec.rb
blob: 80629af6fcee0fb4318128a57cf41e77ea3f8bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'User activates Prometheus' do
  include_context 'project integration activation'

  before do
    stub_request(:get, /.*prometheus.example.com.*/)
  end

  it 'does not activate integration and informs about deprecation', :js do
    visit_project_integration('Prometheus')
    check('Active')
    fill_in('API URL', with: 'http://prometheus.example.com')

    click_button('Save changes')

    expect(page).not_to have_content('Prometheus settings saved and active.')
    expect(page).to have_content('Fields on this page have been deprecated.')
  end
end