From: Tom Hughes Date: Thu, 6 Oct 2022 07:13:32 +0000 (+0100) Subject: Merge remote-tracking branch 'upstream/pull/3739' X-Git-Tag: live~2026 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d1dba97ac4f2a018b4ee93b4ec160c6a2df108b1?hp=a419f8890a66e584501b831aba9d1fdcbc6894bc Merge remote-tracking branch 'upstream/pull/3739' --- diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6f88614ab..5f0f0f078 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,7 +3,7 @@ on: - push - pull_request concurrency: - group: ${{ github.workflow }}-{{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: test: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5b6668a84..11a4c322f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,7 +3,7 @@ on: - push - pull_request concurrency: - group: ${{ github.workflow }}-{{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true env: os: ubuntu-20.04 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1fa68072..79811c612 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ on: - push - pull_request concurrency: - group: ${{ github.workflow }}-{{ github.head_ref || github.ref }} + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} cancel-in-progress: true jobs: test: 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/app/assets/javascripts/leaflet.map.js b/app/assets/javascripts/leaflet.map.js index 75396fd73..b2d4abcb7 100644 --- a/app/assets/javascripts/leaflet.map.js +++ b/app/assets/javascripts/leaflet.map.js @@ -258,15 +258,15 @@ L.OSM.Map = L.Map.extend({ this._object = object; this._objectLayer = L.featureGroup().addTo(this); - + L.circleMarker(object.latLng, haloStyle).addTo(this._objectLayer); - + L.marker(object.latLng, { icon: object.icon, opacity: 1, interactive: true }).addTo(this._objectLayer); - + if (callback) callback(this._objectLayer.getBounds()); } else { // element or changeset handled by L.OSM.DataLayer var map = this; 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