committed by
Juanjo Bazán
parent
d832d41209
commit
f2ea7fd95e
@@ -4,10 +4,10 @@ App.Comments =
|
|||||||
$(response_html).insertAfter($("#js-comment-form-#{parent_id}"))
|
$(response_html).insertAfter($("#js-comment-form-#{parent_id}"))
|
||||||
|
|
||||||
reset_and_hide_form: (id) ->
|
reset_and_hide_form: (id) ->
|
||||||
form = $("#js-comment-form-#{id} form")
|
form_container = $("#js-comment-form-#{id}")
|
||||||
input = form.find("textarea")
|
input = form_container.find("form textarea")
|
||||||
input.val('')
|
input.val('')
|
||||||
form.hide()
|
form_container.hide()
|
||||||
|
|
||||||
reset_form: (id) ->
|
reset_form: (id) ->
|
||||||
input = $("#js-comment-form-#{id} form textarea")
|
input = $("#js-comment-form-#{id} form textarea")
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ feature 'Comments' do
|
|||||||
expect(page).to have_content 'It will be done next week.'
|
expect(page).to have_content 'It will be done next week.'
|
||||||
end
|
end
|
||||||
|
|
||||||
expect(page).to have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
|
expect(page).to_not have_selector("#js-comment-form-comment_#{comment.id}", visible: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
scenario "N replies", :js do
|
scenario "N replies", :js do
|
||||||
|
|||||||
Reference in New Issue
Block a user