From: Tom Hughes Date: Thu, 6 Oct 2022 06:59:57 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/3736' X-Git-Tag: live~2019 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/31d27da6bc667825df754438985a56f4b593df80?hp=c054e8fa6589aec01e31d5166272bb5c3f48512b Merge remote-tracking branch 'upstream/pull/3736' --- diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 89f60847f..4f53a0493 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -33,6 +33,7 @@ window.updateLinks = function (loc, zoom, layers, object) { delete args.way; delete args.relation; delete args.changeset; + delete args.note; if (object && editlink) { args[object.type] = object.id; diff --git a/test/system/index_test.rb b/test/system/index_test.rb new file mode 100644 index 000000000..bb23cee60 --- /dev/null +++ b/test/system/index_test.rb @@ -0,0 +1,21 @@ +require "application_system_test_case" + +class IndexTest < ApplicationSystemTestCase + test "node included in edit link" do + node = create(:node) + visit node_path(node) + assert_selector "#editanchor[href*='?node=#{node.id}#']" + + find("#sidebar .btn-close").click + assert_no_selector "#editanchor[href*='?node=#{node.id}#']" + end + + test "note included in edit link" do + note = create(:note_with_comments) + visit browse_note_path(note) + assert_selector "#editanchor[href*='?note=#{note.id}#']" + + find("#sidebar .btn-close").click + assert_no_selector "#editanchor[href*='?note=#{note.id}#']" + end +end