Fix specs
This commit is contained in:
parent
cad685e70b
commit
10f45cf33a
|
@ -72,16 +72,14 @@ describe 'Comments' do
|
|||
|
||||
it "should show the note edit form and hide the note body" do
|
||||
within("#note_#{note.id}") do
|
||||
find(".current-note-edit-form", visible: true).should be_visible
|
||||
find(".note-edit-form", visible: true).should be_visible
|
||||
find(".note-text", visible: false).should_not be_visible
|
||||
find(:css, ".note-text", visible: false).should_not be_visible
|
||||
end
|
||||
end
|
||||
|
||||
it "should reset the edit note form textarea with the original content of the note if cancelled" do
|
||||
find('.note').hover
|
||||
find(".js-note-edit").click
|
||||
|
||||
within(".note-edit-form") do
|
||||
within(".current-note-edit-form") do
|
||||
fill_in "note[note]", with: "Some new content"
|
||||
find(".btn-cancel").click
|
||||
find(".js-note-text", visible: false).text.should == note.note
|
||||
|
@ -89,10 +87,7 @@ describe 'Comments' do
|
|||
end
|
||||
|
||||
it "appends the edited at time to the note" do
|
||||
find('.note').hover
|
||||
find(".js-note-edit").click
|
||||
|
||||
within(".note-edit-form") do
|
||||
within(".current-note-edit-form") do
|
||||
fill_in "note[note]", with: "Some new content"
|
||||
find(".btn-save").click
|
||||
end
|
||||
|
@ -119,7 +114,7 @@ describe 'Comments' do
|
|||
it "removes the attachment div and resets the edit form" do
|
||||
find(".js-note-attachment-delete").click
|
||||
should_not have_css(".note-attachment")
|
||||
find(".note-edit-form", visible: false).should_not be_visible
|
||||
find(".current-note-edit-form", visible: false).should_not be_visible
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue