Commit d4ec23b8b5fbc4aab4f5ba65c93e976fa4113db9
1 parent
21b028b5
Exists in
spb-stable
and in
3 other branches
fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
app/assets/javascripts/notes.js.coffee
... | ... | @@ -379,7 +379,9 @@ class Notes |
379 | 379 | |
380 | 380 | # does it already have notes? |
381 | 381 | if nextRow.is(".notes_holder") |
382 | - $.proxy(@replyToDiscussionNote, nextRow.find(".js-discussion-reply-button")).call() | |
382 | + replyButton = nextRow.find(".js-discussion-reply-button") | |
383 | + if replyButton.length > 0 | |
384 | + $.proxy(@replyToDiscussionNote, replyButton).call() | |
383 | 385 | else |
384 | 386 | # add a notes row and insert the form |
385 | 387 | row.after "<tr class=\"notes_holder js-temp-notes-holder\"><td class=\"notes_line\" colspan=\"2\"></td><td class=\"notes_content\"></td></tr>" | ... | ... |
spec/features/notes_on_merge_requests_spec.rb
... | ... | @@ -108,7 +108,7 @@ describe "On a merge request", js: true do |
108 | 108 | |
109 | 109 | within("#note_#{note.id}") do |
110 | 110 | should have_css(".note-last-update small") |
111 | - find(".note-last-update small").text.should match(/Edited just now/) | |
111 | + find(".note-last-update small").text.should match(/Edited less than a minute ago/) | |
112 | 112 | end |
113 | 113 | end |
114 | 114 | end | ... | ... |