Commit 10f45cf3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix specs

parent cad685e7
...@@ -72,16 +72,14 @@ describe 'Comments' do ...@@ -72,16 +72,14 @@ describe 'Comments' do
it "should show the note edit form and hide the note body" do it "should show the note edit form and hide the note body" do
within("#note_#{note.id}") 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-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
end end
it "should reset the edit note form textarea with the original content of the note if cancelled" do it "should reset the edit note form textarea with the original content of the note if cancelled" do
find('.note').hover within(".current-note-edit-form") do
find(".js-note-edit").click
within(".note-edit-form") do
fill_in "note[note]", with: "Some new content" fill_in "note[note]", with: "Some new content"
find(".btn-cancel").click find(".btn-cancel").click
find(".js-note-text", visible: false).text.should == note.note find(".js-note-text", visible: false).text.should == note.note
...@@ -89,10 +87,7 @@ describe 'Comments' do ...@@ -89,10 +87,7 @@ describe 'Comments' do
end end
it "appends the edited at time to the note" do it "appends the edited at time to the note" do
find('.note').hover within(".current-note-edit-form") do
find(".js-note-edit").click
within(".note-edit-form") do
fill_in "note[note]", with: "Some new content" fill_in "note[note]", with: "Some new content"
find(".btn-save").click find(".btn-save").click
end end
...@@ -119,7 +114,7 @@ describe 'Comments' do ...@@ -119,7 +114,7 @@ describe 'Comments' do
it "removes the attachment div and resets the edit form" do it "removes the attachment div and resets the edit form" do
find(".js-note-attachment-delete").click find(".js-note-attachment-delete").click
should_not have_css(".note-attachment") 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment