X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/ca4ee6faa9378e7610356e36cbd4931a2657eeed..HEAD:/test/system/create_note_test.rb?ds=sidebyside diff --git a/test/system/create_note_test.rb b/test/system/create_note_test.rb index ccb2ed32f..435233cbe 100644 --- a/test/system/create_note_test.rb +++ b/test/system/create_note_test.rb @@ -4,20 +4,24 @@ class CreateNoteTest < ApplicationSystemTestCase test "can create note" do visit new_note_path(:anchor => "map=18/0/0") - assert_button "Add Note", :disabled => true + within_sidebar do + assert_button "Add Note", :disabled => true - fill_in "text", :with => "Some newly added note description" - click_on "Add Note" + fill_in "text", :with => "Some newly added note description" + click_on "Add Note" - assert_content "Unresolved note ##{Note.last.id}" - assert_content "Some newly added note description" + assert_content "Unresolved note ##{Note.last.id}" + assert_content "Some newly added note description" + end end test "cannot create note when api is readonly" do with_settings(:status => "api_readonly") do visit new_note_path(:anchor => "map=18/0/0") - assert_no_button "Add Note", :disabled => true + within_sidebar do + assert_no_button "Add Note", :disabled => true + end end end end