Merge remote-tracking branch 'upstream/pull/3736'

This commit is contained in:
Tom Hughes 2022-10-06 07:59:57 +01:00
commit 31d27da6bc
2 changed files with 22 additions and 0 deletions

View file

@ -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;

21
test/system/index_test.rb Normal file
View file

@ -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