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')
-rw-r--r--spec/features/projects/services/user_activates_issue_tracker_spec.rb15
-rw-r--r--spec/features/projects/services/user_activates_jira_spec.rb8
-rw-r--r--spec/features/projects/services/user_activates_youtrack_spec.rb8
3 files changed, 15 insertions, 16 deletions
diff --git a/spec/features/projects/services/user_activates_issue_tracker_spec.rb b/spec/features/projects/services/user_activates_issue_tracker_spec.rb
index 5f3bb794b48..0b0a3362043 100644
--- a/spec/features/projects/services/user_activates_issue_tracker_spec.rb
+++ b/spec/features/projects/services/user_activates_issue_tracker_spec.rb
@@ -8,16 +8,15 @@ describe 'User activates issue tracker', :js do
let(:url) { 'http://tracker.example.com' }
- def fill_short_form(active = true)
- check 'Active' if active
+ def fill_short_form(disabled: false)
+ uncheck 'Active' if disabled
fill_in 'service_project_url', with: url
fill_in 'service_issues_url', with: "#{url}/:id"
end
- def fill_full_form(active = true)
- fill_short_form(active)
- check 'Active' if active
+ def fill_full_form(disabled: false)
+ fill_short_form(disabled: disabled)
fill_in 'service_new_issue_url', with: url
end
@@ -86,14 +85,14 @@ describe 'User activates issue tracker', :js do
end
end
- describe 'user sets the service but keeps it disabled' do
+ describe 'user disables the service' do
before do
click_link(tracker)
if skip_new_issue_url
- fill_short_form(false)
+ fill_short_form(disabled: true)
else
- fill_full_form(false)
+ fill_full_form(disabled: true)
end
click_button('Save changes')
diff --git a/spec/features/projects/services/user_activates_jira_spec.rb b/spec/features/projects/services/user_activates_jira_spec.rb
index 7847b7d5177..557615f8872 100644
--- a/spec/features/projects/services/user_activates_jira_spec.rb
+++ b/spec/features/projects/services/user_activates_jira_spec.rb
@@ -9,8 +9,8 @@ describe 'User activates Jira', :js do
let(:url) { 'http://jira.example.com' }
let(:test_url) { 'http://jira.example.com/rest/api/2/serverInfo' }
- def fill_form(active = true)
- check 'Active' if active
+ def fill_form(disabled: false)
+ uncheck 'Active' if disabled
fill_in 'service_url', with: url
fill_in 'service_username', with: 'username'
@@ -83,10 +83,10 @@ describe 'User activates Jira', :js do
end
end
- describe 'user sets Jira Service but keeps it disabled' do
+ describe 'user disables the Jira Service' do
before do
click_link('Jira')
- fill_form(false)
+ fill_form(disabled: true)
click_button('Save changes')
end
diff --git a/spec/features/projects/services/user_activates_youtrack_spec.rb b/spec/features/projects/services/user_activates_youtrack_spec.rb
index 8fdeddfdfb4..2f6aad1d736 100644
--- a/spec/features/projects/services/user_activates_youtrack_spec.rb
+++ b/spec/features/projects/services/user_activates_youtrack_spec.rb
@@ -8,8 +8,8 @@ describe 'User activates issue tracker', :js do
let(:url) { 'http://tracker.example.com' }
- def fill_form(active = true)
- check 'Active' if active
+ def fill_form(disabled: false)
+ uncheck 'Active' if disabled
fill_in 'service_project_url', with: url
fill_in 'service_issues_url', with: "#{url}/:id"
@@ -67,10 +67,10 @@ describe 'User activates issue tracker', :js do
end
end
- describe 'user sets the service but keeps it disabled' do
+ describe 'user disables the service' do
before do
click_link(tracker)
- fill_form(false)
+ fill_form(disabled: true)
click_button('Save changes')
end