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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
e06f88ef
Commit
e06f88ef
authored
Dec 19, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
298d05a5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
28 deletions
+20
-28
features/project/service.feature
features/project/service.feature
+3
-3
features/steps/project/services.rb
features/steps/project/services.rb
+3
-3
spec/features/projects/services/slack_slash_command_spec.rb
spec/features/projects/services/slack_slash_command_spec.rb
+14
-22
No files found.
features/project/service.feature
View file @
e06f88ef
...
@@ -37,10 +37,10 @@ Feature: Project Services
...
@@ -37,10 +37,10 @@ Feature: Project Services
And
I fill Assembla settings
And
I fill Assembla settings
Then
I should see Assembla service settings saved
Then
I should see Assembla service settings saved
Scenario
:
Activate Slack service
Scenario
:
Activate Slack
notifications
service
When
I visit project
"Shop"
services page
When
I visit project
"Shop"
services page
And
I click Slack
N
otifications service link
And
I click Slack
n
otifications service link
And
I fill Slack
N
otifications settings
And
I fill Slack
n
otifications settings
Then
I should see Slack Notifications service settings saved
Then
I should see Slack Notifications service settings saved
Scenario
:
Activate Pushover service
Scenario
:
Activate Pushover service
...
...
features/steps/project/services.rb
View file @
e06f88ef
...
@@ -137,11 +137,11 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
...
@@ -137,11 +137,11 @@ class Spinach::Features::ProjectServices < Spinach::FeatureSteps
expect
(
find_field
(
'Colorize messages'
).
value
).
to
eq
'1'
expect
(
find_field
(
'Colorize messages'
).
value
).
to
eq
'1'
end
end
step
'I click Slack
N
otifications service link'
do
step
'I click Slack
n
otifications service link'
do
click_link
'Slack
N
otifications'
click_link
'Slack
n
otifications'
end
end
step
'I fill Slack
N
otifications settings'
do
step
'I fill Slack
n
otifications settings'
do
check
'Active'
check
'Active'
fill_in
'Webhook'
,
with:
'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685'
fill_in
'Webhook'
,
with:
'https://hooks.slack.com/services/SVRWFV0VVAR97N/B02R25XN3/ZBqu7xMupaEEICInN685'
click_button
'Save'
click_button
'Save'
...
...
spec/features/projects/services/slack_slash_command_spec.rb
View file @
e06f88ef
...
@@ -12,37 +12,29 @@ feature 'Slack slash commands', feature: true do
...
@@ -12,37 +12,29 @@ feature 'Slack slash commands', feature: true do
login_as
(
user
)
login_as
(
user
)
end
end
scenario
'user visits the slack slash command config page'
,
js:
true
do
scenario
'user visits the slack slash command config page and shows a help message'
,
js:
true
do
it
'shows a help message'
do
visit
edit_namespace_project_service_path
(
project
.
namespace
,
project
,
service
)
visit
edit_namespace_project_service_path
(
project
.
namespace
,
project
,
service
)
wait_for_ajax
wait_for_ajax
expect
(
page
).
to
have_content
(
'This service allows GitLab users to perform common'
)
expect
(
page
).
to
have_content
(
'This service allows GitLab users to perform common'
)
end
end
end
scenario
'saving a token'
do
given
(
:token
)
{
(
'a'
..
'z'
).
to_a
.
join
}
it
'shows the token after saving'
do
scenario
'shows the token after saving'
do
visit
edit_namespace_project_service_path
(
project
.
namespace
,
project
,
service
)
visit
edit_namespace_project_service_path
(
project
.
namespace
,
project
,
service
)
fill_in
'service_token'
,
with:
token
fill_in
'service_token'
,
with:
'token'
click_on
'Save'
click_on
'Save'
value
=
find_field
(
'service_token'
).
value
value
=
find_field
(
'service_token'
).
value
expect
(
value
).
to
eq
(
token
)
expect
(
value
).
to
eq
(
'token'
)
end
end
end
scenario
'the trigger url'
do
scenario
'shows the correct trigger url'
do
it
'shows the correct url'
do
visit
edit_namespace_project_service_path
(
project
.
namespace
,
project
,
service
)
visit
edit_namespace_project_service_path
(
project
.
namespace
,
project
,
service
)
value
=
find_field
(
'url'
).
value
value
=
find_field
(
'url'
).
value
expect
(
value
).
to
match
(
"api/v3/projects/
#{
project
.
id
}
/services/slack_slash_commands/trigger"
)
expect
(
value
).
to
match
(
"api/v3/projects/
#{
project
.
id
}
/services/slack_slash_commands/trigger"
)
end
end
end
end
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