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:
@@ -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));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user