]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/3739'
authorTom Hughes <tom@compton.nu>
Thu, 6 Oct 2022 07:13:32 +0000 (08:13 +0100)
committerTom Hughes <tom@compton.nu>
Thu, 6 Oct 2022 07:13:32 +0000 (08:13 +0100)
.github/workflows/docker.yml
.github/workflows/lint.yml
.github/workflows/tests.yml
app/assets/javascripts/application.js
app/assets/javascripts/leaflet.map.js
test/system/index_test.rb [new file with mode: 0644]

index 6f88614ab3cd93eda11c4e4edabb07524285c046..5f0f0f0786138ac2ae169affd5f31288129f3469 100644 (file)
@@ -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:
index 5b6668a840d95a261f8d171735ebf6c377ee736d..11a4c322ff65bff1434e8ef509eb3a282ffc626e 100644 (file)
@@ -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
index c1fa68072d2a39beefd6474c93557b6d7855c43e..79811c61242361c9517a7d9ed307b46ab8f9ddee 100644 (file)
@@ -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:
index 89f60847fb9261f2432051e5c2441b32b96744e9..4f53a0493ceda2ff2e1f812540e636df76d467e5 100644 (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;
index 75396fd73013fefd67d63f634d7aad34ae8c9b9b..b2d4abcb72719fd4b93f4bd218c29e48ebaee441 100644 (file)
@@ -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 (file)
index 0000000..bb23cee
--- /dev/null
@@ -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