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
8bdf18d7
Commit
8bdf18d7
authored
Apr 14, 2020
by
Justin Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract active toggle click to a function
Extract away complex selector
parent
11a682a9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
4 deletions
+8
-4
spec/features/projects/services/user_activates_issue_tracker_spec.rb
...es/projects/services/user_activates_issue_tracker_spec.rb
+1
-1
spec/features/projects/services/user_activates_jira_spec.rb
spec/features/projects/services/user_activates_jira_spec.rb
+1
-1
spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
.../services/user_activates_mattermost_slash_command_spec.rb
+1
-1
spec/features/projects/services/user_activates_slack_slash_command_spec.rb
...jects/services/user_activates_slack_slash_command_spec.rb
+1
-1
spec/support/shared_contexts/project_service_shared_context.rb
...support/shared_contexts/project_service_shared_context.rb
+4
-0
No files found.
spec/features/projects/services/user_activates_issue_tracker_spec.rb
View file @
8bdf18d7
...
...
@@ -8,7 +8,7 @@ describe 'User activates issue tracker', :js do
let
(
:url
)
{
'http://tracker.example.com'
}
def
fill_form
(
disable:
false
,
skip_new_issue_url:
false
)
find
(
'input[name="service[active]"] + button'
).
click
if
disable
click_active_toggle
if
disable
fill_in
'service_project_url'
,
with:
url
fill_in
'service_issues_url'
,
with:
"
#{
url
}
/:id"
...
...
spec/features/projects/services/user_activates_jira_spec.rb
View file @
8bdf18d7
...
...
@@ -9,7 +9,7 @@ describe 'User activates Jira', :js do
let
(
:test_url
)
{
'http://jira.example.com/rest/api/2/serverInfo'
}
def
fill_form
(
disable:
false
)
find
(
'input[name="service[active]"] + button'
).
click
if
disable
click_active_toggle
if
disable
fill_in
'service_url'
,
with:
url
fill_in
'service_username'
,
with:
'username'
...
...
spec/features/projects/services/user_activates_mattermost_slash_command_spec.rb
View file @
8bdf18d7
...
...
@@ -28,7 +28,7 @@ describe 'Set up Mattermost slash commands', :js do
token
=
(
'a'
..
'z'
).
to_a
.
join
fill_in
'service_token'
,
with:
token
find
(
'input[name="service[active]"] + button'
).
click
click_active_toggle
click_on
'Save changes'
expect
(
current_path
).
to
eq
(
project_settings_integrations_path
(
project
))
...
...
spec/features/projects/services/user_activates_slack_slash_command_spec.rb
View file @
8bdf18d7
...
...
@@ -21,7 +21,7 @@ describe 'Slack slash commands' do
it
'redirects to the integrations page after saving but not activating'
,
:js
do
fill_in
'service_token'
,
with:
'token'
find
(
'input[name="service[active]"] + button'
).
click
click_active_toggle
click_on
'Save'
expect
(
current_path
).
to
eq
(
project_settings_integrations_path
(
project
))
...
...
spec/support/shared_contexts/project_service_shared_context.rb
View file @
8bdf18d7
...
...
@@ -18,6 +18,10 @@ shared_context 'project service activation' do
click_link
(
name
)
end
def
click_active_toggle
find
(
'input[name="service[active]"] + button'
).
click
end
def
click_test_integration
click_button
(
'Test settings and 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