Merge pull request #4114 from rockandror/map_fix

Get map center longitude from correct place
This commit is contained in:
Javi Martín
2020-09-15 12:30:53 +02:00
committed by GitHub
2 changed files with 5 additions and 3 deletions

View File

@@ -49,7 +49,7 @@
markerLatitude = dataCoordinates.lat;
markerLongitude = dataCoordinates.long;
mapCenterLatitude = dataCoordinates.lat;
mapCenterLongitude = dataCoordinates.lat;
mapCenterLongitude = dataCoordinates.long;
} else {
mapCenterLatitude = $(element).data("map-center-latitude");
mapCenterLongitude = $(element).data("map-center-longitude");

View File

@@ -283,12 +283,14 @@ shared_examples "mappable" do |mappable_factory_name, mappable_association_name,
do_login_for(user) if management
end
scenario "Should display map on #{mappable_factory_name} show page", :js do
scenario "Should display map and marker on #{mappable_factory_name} show page", :js do
arguments[:id] = mappable.id
visit send(mappable_show_path, arguments)
expect(page).to have_css(".map_location")
within ".map_location" do
expect(page).to have_css(".map-icon")
end
end
scenario "Should not display map on #{mappable_factory_name} show when marker is not defined", :js do