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
8cc53334
Commit
8cc53334
authored
Dec 15, 2016
by
victorwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace wording for slash command confirmation message
parent
ee5cc454
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
19 deletions
+22
-19
app/services/notes/create_service.rb
app/services/notes/create_service.rb
+1
-1
changelogs/unreleased/25705-your-commands-have-been-executed-is-overkill.yml
...ed/25705-your-commands-have-been-executed-is-overkill.yml
+3
-0
spec/features/issues/user_uses_slash_commands_spec.rb
spec/features/issues/user_uses_slash_commands_spec.rb
+4
-4
spec/features/merge_requests/user_uses_slash_commands_spec.rb
.../features/merge_requests/user_uses_slash_commands_spec.rb
+3
-3
spec/support/features/issuable_slash_commands_shared_examples.rb
...pport/features/issuable_slash_commands_shared_examples.rb
+11
-11
No files found.
app/services/notes/create_service.rb
View file @
8cc53334
...
@@ -41,7 +41,7 @@ module Notes
...
@@ -41,7 +41,7 @@ module Notes
# We must add the error after we call #save because errors are reset
# We must add the error after we call #save because errors are reset
# when #save is called
# when #save is called
if
only_commands
if
only_commands
note
.
errors
.
add
(
:commands_only
,
'
Your commands have been executed!
'
)
note
.
errors
.
add
(
:commands_only
,
'
Commands applied
'
)
end
end
note
.
commands_changes
=
command_params
.
keys
note
.
commands_changes
=
command_params
.
keys
...
...
changelogs/unreleased/25705-your-commands-have-been-executed-is-overkill.yml
0 → 100644
View file @
8cc53334
---
title
:
Replace wording for slash command confirmation message
merge_request
:
8123
spec/features/issues/user_uses_slash_commands_spec.rb
View file @
8cc53334
...
@@ -30,7 +30,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
...
@@ -30,7 +30,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
write_note
(
"/due 2016-08-28"
)
write_note
(
"/due 2016-08-28"
)
expect
(
page
).
not_to
have_content
'/due 2016-08-28'
expect
(
page
).
not_to
have_content
'/due 2016-08-28'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
issue
.
reload
issue
.
reload
...
@@ -51,7 +51,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
...
@@ -51,7 +51,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
write_note
(
"/due 2016-08-28"
)
write_note
(
"/due 2016-08-28"
)
expect
(
page
).
to
have_content
'/due 2016-08-28'
expect
(
page
).
to
have_content
'/due 2016-08-28'
expect
(
page
).
not_to
have_content
'
Your commands have been executed!
'
expect
(
page
).
not_to
have_content
'
Commands applied
'
issue
.
reload
issue
.
reload
...
@@ -70,7 +70,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
...
@@ -70,7 +70,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
write_note
(
"/remove_due_date"
)
write_note
(
"/remove_due_date"
)
expect
(
page
).
not_to
have_content
'/remove_due_date'
expect
(
page
).
not_to
have_content
'/remove_due_date'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
issue
.
reload
issue
.
reload
...
@@ -91,7 +91,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
...
@@ -91,7 +91,7 @@ feature 'Issues > User uses slash commands', feature: true, js: true do
write_note
(
"/remove_due_date"
)
write_note
(
"/remove_due_date"
)
expect
(
page
).
to
have_content
'/remove_due_date'
expect
(
page
).
to
have_content
'/remove_due_date'
expect
(
page
).
not_to
have_content
'
Your commands have been executed!
'
expect
(
page
).
not_to
have_content
'
Commands applied
'
issue
.
reload
issue
.
reload
...
...
spec/features/merge_requests/user_uses_slash_commands_spec.rb
View file @
8cc53334
...
@@ -31,7 +31,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
...
@@ -31,7 +31,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
write_note
(
"/wip"
)
write_note
(
"/wip"
)
expect
(
page
).
not_to
have_content
'/wip'
expect
(
page
).
not_to
have_content
'/wip'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
merge_request
.
reload
.
work_in_progress?
).
to
eq
true
expect
(
merge_request
.
reload
.
work_in_progress?
).
to
eq
true
end
end
...
@@ -42,7 +42,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
...
@@ -42,7 +42,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
write_note
(
"/wip"
)
write_note
(
"/wip"
)
expect
(
page
).
not_to
have_content
'/wip'
expect
(
page
).
not_to
have_content
'/wip'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
merge_request
.
reload
.
work_in_progress?
).
to
eq
false
expect
(
merge_request
.
reload
.
work_in_progress?
).
to
eq
false
end
end
...
@@ -61,7 +61,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
...
@@ -61,7 +61,7 @@ feature 'Merge Requests > User uses slash commands', feature: true, js: true do
write_note
(
"/wip"
)
write_note
(
"/wip"
)
expect
(
page
).
not_to
have_content
'/wip'
expect
(
page
).
not_to
have_content
'/wip'
expect
(
page
).
not_to
have_content
'
Your commands have been executed!
'
expect
(
page
).
not_to
have_content
'
Commands applied
'
expect
(
merge_request
.
reload
.
work_in_progress?
).
to
eq
false
expect
(
merge_request
.
reload
.
work_in_progress?
).
to
eq
false
end
end
...
...
spec/support/features/issuable_slash_commands_shared_examples.rb
View file @
8cc53334
...
@@ -76,7 +76,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -76,7 +76,7 @@ shared_examples 'issuable record that supports slash commands in its description
expect
(
page
).
not_to
have_content
'/assign @bob'
expect
(
page
).
not_to
have_content
'/assign @bob'
expect
(
page
).
not_to
have_content
'/label ~bug'
expect
(
page
).
not_to
have_content
'/label ~bug'
expect
(
page
).
not_to
have_content
'/milestone %"ASAP"'
expect
(
page
).
not_to
have_content
'/milestone %"ASAP"'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
issuable
.
reload
issuable
.
reload
...
@@ -97,7 +97,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -97,7 +97,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/close"
)
write_note
(
"/close"
)
expect
(
page
).
not_to
have_content
'/close'
expect
(
page
).
not_to
have_content
'/close'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
issuable
.
reload
).
to
be_closed
expect
(
issuable
.
reload
).
to
be_closed
end
end
...
@@ -114,7 +114,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -114,7 +114,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/close"
)
write_note
(
"/close"
)
expect
(
page
).
not_to
have_content
'/close'
expect
(
page
).
not_to
have_content
'/close'
expect
(
page
).
not_to
have_content
'
Your commands have been executed!
'
expect
(
page
).
not_to
have_content
'
Commands applied
'
expect
(
issuable
).
to
be_open
expect
(
issuable
).
to
be_open
end
end
...
@@ -132,7 +132,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -132,7 +132,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/reopen"
)
write_note
(
"/reopen"
)
expect
(
page
).
not_to
have_content
'/reopen'
expect
(
page
).
not_to
have_content
'/reopen'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
issuable
.
reload
).
to
be_open
expect
(
issuable
.
reload
).
to
be_open
end
end
...
@@ -149,7 +149,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -149,7 +149,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/reopen"
)
write_note
(
"/reopen"
)
expect
(
page
).
not_to
have_content
'/reopen'
expect
(
page
).
not_to
have_content
'/reopen'
expect
(
page
).
not_to
have_content
'
Your commands have been executed!
'
expect
(
page
).
not_to
have_content
'
Commands applied
'
expect
(
issuable
).
to
be_closed
expect
(
issuable
).
to
be_closed
end
end
...
@@ -162,7 +162,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -162,7 +162,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/title Awesome new title"
)
write_note
(
"/title Awesome new title"
)
expect
(
page
).
not_to
have_content
'/title'
expect
(
page
).
not_to
have_content
'/title'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
issuable
.
reload
.
title
).
to
eq
'Awesome new title'
expect
(
issuable
.
reload
.
title
).
to
eq
'Awesome new title'
end
end
...
@@ -179,7 +179,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -179,7 +179,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/title Awesome new title"
)
write_note
(
"/title Awesome new title"
)
expect
(
page
).
not_to
have_content
'/title'
expect
(
page
).
not_to
have_content
'/title'
expect
(
page
).
not_to
have_content
'
Your commands have been executed!
'
expect
(
page
).
not_to
have_content
'
Commands applied
'
expect
(
issuable
.
reload
.
title
).
not_to
eq
'Awesome new title'
expect
(
issuable
.
reload
.
title
).
not_to
eq
'Awesome new title'
end
end
...
@@ -191,7 +191,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -191,7 +191,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/todo"
)
write_note
(
"/todo"
)
expect
(
page
).
not_to
have_content
'/todo'
expect
(
page
).
not_to
have_content
'/todo'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
todos
=
TodosFinder
.
new
(
master
).
execute
todos
=
TodosFinder
.
new
(
master
).
execute
todo
=
todos
.
first
todo
=
todos
.
first
...
@@ -222,7 +222,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -222,7 +222,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/done"
)
write_note
(
"/done"
)
expect
(
page
).
not_to
have_content
'/done'
expect
(
page
).
not_to
have_content
'/done'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
todo
.
reload
).
to
be_done
expect
(
todo
.
reload
).
to
be_done
end
end
...
@@ -235,7 +235,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -235,7 +235,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/subscribe"
)
write_note
(
"/subscribe"
)
expect
(
page
).
not_to
have_content
'/subscribe'
expect
(
page
).
not_to
have_content
'/subscribe'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
issuable
.
subscribed?
(
master
,
project
)).
to
be_truthy
expect
(
issuable
.
subscribed?
(
master
,
project
)).
to
be_truthy
end
end
...
@@ -252,7 +252,7 @@ shared_examples 'issuable record that supports slash commands in its description
...
@@ -252,7 +252,7 @@ shared_examples 'issuable record that supports slash commands in its description
write_note
(
"/unsubscribe"
)
write_note
(
"/unsubscribe"
)
expect
(
page
).
not_to
have_content
'/unsubscribe'
expect
(
page
).
not_to
have_content
'/unsubscribe'
expect
(
page
).
to
have_content
'
Your commands have been executed!
'
expect
(
page
).
to
have_content
'
Commands applied
'
expect
(
issuable
.
subscribed?
(
master
,
project
)).
to
be_falsy
expect
(
issuable
.
subscribed?
(
master
,
project
)).
to
be_falsy
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