Update old usages of investments JSON data

We aren't using these properties since commit 3fa3c90db. An old test was
failing when checking for Axe accessibility issues because of this.
This commit is contained in:
Javi Martín
2025-11-17 03:19:31 +01:00
parent 288f62cdd2
commit 5a432da498
3 changed files with 4 additions and 14 deletions

View File

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

View File

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

View File

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