summaryrefslogtreecommitdiff
path: root/spec/features/projects/services/user_activates_atlassian_bamboo_ci_spec.rb
blob: 7b89b9ac4a7a5fbda885a2c2be511c4f74de31bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe 'User activates Atlassian Bamboo CI' do
  include_context 'project service activation'

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

  it 'activates service', :js do
    visit_project_integration('Atlassian Bamboo CI')
    fill_in('Bamboo url', with: 'http://bamboo.example.com')
    fill_in('Build key', with: 'KEY')
    fill_in('Username', with: 'user')
    fill_in('Password', with: 'verySecret')

    click_test_integration

    expect(page).to have_content('Atlassian Bamboo CI activated.')

    # Password field should not be filled in.
    click_link('Atlassian Bamboo CI')

    expect(find_field('Enter new Password').value).to be_blank
  end
end