--- /dev/null
+<% set_title(t(".title")) %>
+
+<%= render "sidebar_header", :title => t(".title") %>
+
+<div class="note">
+ <p class="alert alert-warning"><%= t(".warning") %></p>
+</div>
anonymous_warning_sign_up: "sign up"
advice: "Your note is public and may be used to update the map, so don't enter personal information, or information from copyrighted maps or directory listings."
add: Add Note
+ new_readonly:
+ title: "New Note"
+ warning: "New notes cannot be created because the OpenStreetMap API is currently in read-only mode."
notes_paging_nav:
showing_page: "Page %{page}"
next: "Next"
--- /dev/null
+require "application_system_test_case"
+
+class CreateNoteTest < ApplicationSystemTestCase
+ test "can create note" do
+ visit new_note_path(:anchor => "map=18/0/0")
+
+ assert_button "Add Note", :disabled => true
+
+ 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"
+ 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
+ end
+ end
+end