Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/services/user_activates_jira_spec.rb')
-rw-r--r--spec/features/projects/services/user_activates_jira_spec.rb30
1 files changed, 12 insertions, 18 deletions
diff --git a/spec/features/projects/services/user_activates_jira_spec.rb b/spec/features/projects/services/user_activates_jira_spec.rb
index 1da8a49699b..483671c4b5b 100644
--- a/spec/features/projects/services/user_activates_jira_spec.rb
+++ b/spec/features/projects/services/user_activates_jira_spec.rb
@@ -4,18 +4,7 @@ require 'spec_helper'
RSpec.describe 'User activates Jira', :js do
include_context 'project service activation'
-
- let(:url) { 'http://jira.example.com' }
- let(:test_url) { 'http://jira.example.com/rest/api/2/serverInfo' }
-
- def fill_form(disable: false)
- click_active_toggle if disable
-
- fill_in 'service_url', with: url
- fill_in 'service_username', with: 'username'
- fill_in 'service_password', with: 'password'
- fill_in 'service_jira_issue_transition_id', with: '25'
- end
+ include_context 'project service Jira context'
describe 'user sets and activates Jira Service' do
context 'when Jira connection test succeeds' do
@@ -30,12 +19,17 @@ RSpec.describe 'User activates Jira', :js do
it 'activates the Jira service' do
expect(page).to have_content('Jira activated.')
- expect(current_path).to eq(project_settings_integrations_path(project))
+ expect(current_path).to eq(edit_project_service_path(project, :jira))
end
- it 'shows the Jira link in the menu' do
- page.within('.nav-sidebar') do
- expect(page).to have_link('Jira', href: url)
+ unless Gitlab.ee?
+ it 'adds Jira link to sidebar menu' do
+ page.within('.nav-sidebar') do
+ expect(page).not_to have_link('Jira Issues')
+ expect(page).not_to have_link('Issue List', visible: false)
+ expect(page).not_to have_link('Open Jira', href: url, visible: false)
+ expect(page).to have_link('Jira', href: url)
+ end
end
end
end
@@ -61,7 +55,7 @@ RSpec.describe 'User activates Jira', :js do
click_test_then_save_integration
expect(page).to have_content('Jira activated.')
- expect(current_path).to eq(project_settings_integrations_path(project))
+ expect(current_path).to eq(edit_project_service_path(project, :jira))
end
end
end
@@ -75,7 +69,7 @@ RSpec.describe 'User activates Jira', :js do
it 'saves but does not activate the Jira service' do
expect(page).to have_content('Jira settings saved, but not activated.')
- expect(current_path).to eq(project_settings_integrations_path(project))
+ expect(current_path).to eq(edit_project_service_path(project, :jira))
end
it 'does not show the Jira link in the menu' do