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
Jérome Perrin
gitlab-ce
Commits
a2266593
Commit
a2266593
authored
Jul 20, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IssueNotesRefactor: Fix award emoji specs.
parent
0555d691
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
8 deletions
+11
-8
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+1
-1
app/assets/javascripts/notes/components/issue_note.vue
app/assets/javascripts/notes/components/issue_note.vue
+0
-1
app/assets/javascripts/notes/components/issue_note_actions.vue
...ssets/javascripts/notes/components/issue_note_actions.vue
+3
-0
app/assets/javascripts/notes/components/issue_note_awards_list.vue
...s/javascripts/notes/components/issue_note_awards_list.vue
+1
-1
app/assets/javascripts/notes/stores/issue_notes_store.js
app/assets/javascripts/notes/stores/issue_notes_store.js
+3
-3
spec/features/issues/award_emoji_spec.rb
spec/features/issues/award_emoji_spec.rb
+2
-2
spec/support/quick_actions_helpers.rb
spec/support/quick_actions_helpers.rb
+1
-0
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
a2266593
...
...
@@ -51,7 +51,7 @@ export default {
'
btn-close
'
:
this
.
isIssueOpen
,
'
js-note-target-close
'
:
this
.
isIssueOpen
,
'
js-note-target-reopen
'
:
!
this
.
isIssueOpen
,
}
}
;
},
canUpdateIssue
()
{
const
{
issueData
}
=
window
.
gl
;
...
...
app/assets/javascripts/notes/components/issue_note.vue
View file @
a2266593
...
...
@@ -137,7 +137,6 @@ export default {
:authorId=
"author.id"
:noteId=
"note.id"
:accessLevel=
"note.human_access"
:canAward=
"note.emoji_awardable"
:canEdit=
"note.current_user.can_edit"
:canDelete=
"note.current_user.can_edit"
:canReportAsAbuse=
"canReportAsAbuse"
...
...
app/assets/javascripts/notes/components/issue_note_actions.vue
View file @
a2266593
...
...
@@ -78,6 +78,9 @@ export default {
data-position="right"
href="#"
title="Add reaction">
<i
aria-hidden=
"true"
class=
"fa fa-spinner fa-spin"
></i>
<span
v-html=
"emojiSmiling"
class=
"link-highlight award-control-icon-neutral"
></span>
...
...
app/assets/javascripts/notes/components/issue_note_awards_list.vue
View file @
a2266593
...
...
@@ -173,7 +173,7 @@ export default {
data-placement=
"bottom"
type=
"button"
>
<span
v-html=
"getAwardHTML(awardName)"
></span>
<span
class=
"award-control-text"
>
<span
class=
"award-control-text
js-counter
"
>
{{
awardList
.
length
}}
</span>
</button>
...
...
app/assets/javascripts/notes/stores/issue_notes_store.js
View file @
a2266593
...
...
@@ -225,6 +225,7 @@ const actions = {
return
context
.
dispatch
(
methodToDispatch
,
noteData
)
.
then
((
res
)
=>
{
const
{
errors
}
=
res
;
const
commandsChanges
=
res
.
commands_changes
;
if
(
hasQuickActions
&&
Object
.
keys
(
errors
).
length
)
{
context
.
dispatch
(
'
poll
'
);
...
...
@@ -232,12 +233,11 @@ const actions = {
new
Flash
(
'
Commands applied
'
,
'
notice
'
,
$
(
noteData
.
flashContainer
));
// eslint-disable-line
}
if
(
res
.
commands_changes
.
emoji_award
)
{
if
(
commandsChanges
&&
commandsChanges
.
emoji_award
)
{
const
votesBlock
=
$
(
'
.js-awards-block
'
).
eq
(
0
);
loadAwardsHandler
().
then
((
awardsHandler
)
=>
{
awardsHandler
.
addAwardToEmojiBar
(
votesBlock
,
res
.
commands_c
hanges
.
emoji_award
);
awardsHandler
.
addAwardToEmojiBar
(
votesBlock
,
commandsC
hanges
.
emoji_award
);
awardsHandler
.
scrollToAwards
();
}).
catch
(()
=>
{
const
msg
=
'
Something went wrong while adding your award. Please try again.
'
;
...
...
spec/features/issues/award_emoji_spec.rb
View file @
a2266593
...
...
@@ -70,13 +70,13 @@ describe 'Awards Emoji', feature: true do
it
'toggles the smiley emoji on a note'
,
js:
true
do
toggle_smiley_emoji
(
true
)
within
(
'.note-
awards
'
)
do
within
(
'.note-
body
'
)
do
expect
(
find
(
emoji_counter
)).
to
have_text
(
"1"
)
end
toggle_smiley_emoji
(
false
)
within
(
'.note-
awards
'
)
do
within
(
'.note-
body
'
)
do
expect
(
page
).
not_to
have_selector
(
emoji_counter
)
end
end
...
...
spec/support/quick_actions_helpers.rb
View file @
a2266593
...
...
@@ -4,6 +4,7 @@ module QuickActionsHelpers
page
.
within
(
'.js-main-target-form'
)
do
fill_in
'note-body'
,
with:
text
find
(
'.js-comment-submit-button'
).
trigger
(
'click'
)
wait_for_requests
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