2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe 'User activates Atlassian Bamboo CI' do
|
2022-04-04 11:22:00 +05:30
|
|
|
include_context 'project integration activation'
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
before do
|
2020-04-22 19:07:51 +05:30
|
|
|
stub_request(:get, /.*bamboo.example.com.*/)
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
|
2022-04-04 11:22:00 +05:30
|
|
|
it 'activates integration', :js do
|
2021-04-29 21:17:54 +05:30
|
|
|
visit_project_integration('Atlassian Bamboo')
|
|
|
|
fill_in('Bamboo URL', with: 'http://bamboo.example.com')
|
2018-03-17 18:26:18 +05:30
|
|
|
fill_in('Build key', with: 'KEY')
|
|
|
|
fill_in('Username', with: 'user')
|
|
|
|
fill_in('Password', with: 'verySecret')
|
2020-04-22 19:07:51 +05:30
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
click_test_then_save_integration(expect_test_to_fail: false)
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
expect(page).to have_content('Atlassian Bamboo settings saved and active.')
|
2018-03-17 18:26:18 +05:30
|
|
|
|
|
|
|
# Password field should not be filled in.
|
2021-04-29 21:17:54 +05:30
|
|
|
click_link('Atlassian Bamboo')
|
2018-03-17 18:26:18 +05:30
|
|
|
|
2021-04-29 21:17:54 +05:30
|
|
|
expect(find_field('Enter new password').value).to be_blank
|
|
|
|
expect(page).to have_content('Leave blank to use your current password')
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
end
|