Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
79fd94be
Commit
79fd94be
authored
Jan 21, 2020
by
Justin Ho Tuan Duong
Committed by
Dan Davison
Jan 21, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix all feature specs around services
To use new default where services are activated by default
parent
7d6623d4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
26 deletions
+21
-26
app/views/shared/_service_settings.html.haml
app/views/shared/_service_settings.html.haml
+1
-1
changelogs/unreleased/194381-new-integrations-are-not-active-by-default.yml
...sed/194381-new-integrations-are-not-active-by-default.yml
+5
-0
qa/qa/ee/page/project/settings/services/jenkins.rb
qa/qa/ee/page/project/settings/services/jenkins.rb
+0
-9
spec/features/projects/services/user_activates_issue_tracker_spec.rb
...es/projects/services/user_activates_issue_tracker_spec.rb
+7
-8
spec/features/projects/services/user_activates_jira_spec.rb
spec/features/projects/services/user_activates_jira_spec.rb
+4
-4
spec/features/projects/services/user_activates_youtrack_spec.rb
...eatures/projects/services/user_activates_youtrack_spec.rb
+4
-4
No files found.
app/views/shared/_service_settings.html.haml
View file @
79fd94be
...
...
@@ -12,7 +12,7 @@
.form-group.row
=
form
.
label
:active
,
"Active"
,
class:
"col-form-label col-sm-2"
.col-sm-10
=
form
.
check_box
:active
,
disabled:
disable_fields_service?
(
@service
),
data:
{
qa_selector:
'active_checkbox'
}
=
form
.
check_box
:active
,
checked:
@service
.
active
||
@service
.
new_record?
,
disabled:
disable_fields_service?
(
@service
)
-
if
@service
.
configurable_events
.
present?
.form-group.row
...
...
changelogs/unreleased/194381-new-integrations-are-not-active-by-default.yml
0 → 100644
View file @
79fd94be
---
title
:
Activate new project integrations by default
merge_request
:
23009
author
:
type
:
changed
qa/qa/ee/page/project/settings/services/jenkins.rb
View file @
79fd94be
...
...
@@ -7,10 +7,6 @@ module QA
module
Settings
module
Services
class
Jenkins
<
QA
::
Page
::
Base
view
'app/views/shared/_service_settings.html.haml'
do
element
:active_checkbox
end
view
'app/views/shared/_field.html.haml'
do
element
:jenkins_url_field
,
'data: { qa_selector: "#{name.downcase.gsub'
# rubocop:disable QA/ElementWithPattern
element
:project_name_field
,
'data: { qa_selector: "#{name.downcase.gsub'
# rubocop:disable QA/ElementWithPattern
...
...
@@ -23,7 +19,6 @@ module QA
end
def
setup_service_with
(
jenkins_url
:,
project_name
:)
click_active_checkbox
set_jenkins_url
(
jenkins_url
)
set_project_name
(
project_name
)
set_username
(
'admin'
)
...
...
@@ -33,10 +28,6 @@ module QA
private
def
click_active_checkbox
click_element
:active_checkbox
end
def
set_jenkins_url
(
jenkins_url
)
fill_element
(
:jenkins_url_field
,
jenkins_url
)
end
...
...
spec/features/projects/services/user_activates_issue_tracker_spec.rb
View file @
79fd94be
...
...
@@ -8,16 +8,15 @@ describe 'User activates issue tracker', :js do
let
(
:url
)
{
'http://tracker.example.com'
}
def
fill_short_form
(
active
=
tru
e
)
check
'Active'
if
active
def
fill_short_form
(
disabled:
fals
e
)
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
(
fals
e
)
fill_short_form
(
disabled:
tru
e
)
else
fill_full_form
(
fals
e
)
fill_full_form
(
disabled:
tru
e
)
end
click_button
(
'Save changes'
)
...
...
spec/features/projects/services/user_activates_jira_spec.rb
View file @
79fd94be
...
...
@@ -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
=
tru
e
)
check
'Active'
if
active
def
fill_form
(
disabled:
fals
e
)
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
(
fals
e
)
fill_form
(
disabled:
tru
e
)
click_button
(
'Save changes'
)
end
...
...
spec/features/projects/services/user_activates_youtrack_spec.rb
View file @
79fd94be
...
...
@@ -8,8 +8,8 @@ describe 'User activates issue tracker', :js do
let
(
:url
)
{
'http://tracker.example.com'
}
def
fill_form
(
active
=
tru
e
)
check
'Active'
if
active
def
fill_form
(
disabled:
fals
e
)
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
(
fals
e
)
fill_form
(
disabled:
tru
e
)
click_button
(
'Save changes'
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment