diff --git a/app/assets/javascripts/map.js b/app/assets/javascripts/map.js index ff4ce0dd0..0684b654f 100644 --- a/app/assets/javascripts/map.js +++ b/app/assets/javascripts/map.js @@ -193,7 +193,6 @@ if (App.Map.validCoordinates(coordinates)) { marker = createMarker(coordinates.lat, coordinates.long, coordinates.title); - marker.options.id = coordinates.investment_id; marker.bindPopup(App.Map.getPopupContent(coordinates)); } }); diff --git a/app/models/map_location.rb b/app/models/map_location.rb index e44bfd0a4..2573a08fb 100644 --- a/app/models/map_location.rb +++ b/app/models/map_location.rb @@ -16,15 +16,6 @@ class MapLocation < ApplicationRecord mappable&.title end - def json_data - { - investment_id: investment_id, - proposal_id: proposal_id, - lat: latitude, - long: longitude - } - end - def self.from_heading(heading) new( zoom: Budget::Heading::OSM_DISTRICT_LEVEL_ZOOM, diff --git a/spec/system/budgets/budgets_spec.rb b/spec/system/budgets/budgets_spec.rb index b21d9a4aa..e272a931b 100644 --- a/spec/system/budgets/budgets_spec.rb +++ b/spec/system/budgets/budgets_spec.rb @@ -305,9 +305,8 @@ describe "Budgets" do { lat: map_location[:latitude], long: map_location[:longitude], - investment_title: investment.title, - investment_id: investment.id, - budget_id: budget.id + title: investment.title, + link: "/budgets/#{budget.id}/investments/#{investment.id}" } end @@ -316,7 +315,8 @@ describe "Budgets" do visit budgets_path within ".map-location" do - expect(page).to have_css(".map-icon", count: 1, visible: :all) + expect(page).to have_css ".map-icon", count: 1, visible: :all + expect(page).to have_css ".map-icon[aria-label='#{investment.title}']", visible: :all end end