diff --git a/app/views/budgets/groups/show.html.erb b/app/views/budgets/groups/show.html.erb index 25cb7f260fb..6d8b8eebb5a 100644 --- a/app/views/budgets/groups/show.html.erb +++ b/app/views/budgets/groups/show.html.erb @@ -49,7 +49,7 @@
- <%= image_tag "map.jpg" %> + <%= image_tag(image_path_for("map.jpg")) %>
diff --git a/app/views/legislation/proposals/_geozones.html.erb b/app/views/legislation/proposals/_geozones.html.erb index 5878ef1786a..064f819dda3 100644 --- a/app/views/legislation/proposals/_geozones.html.erb +++ b/app/views/legislation/proposals/_geozones.html.erb @@ -2,5 +2,5 @@
<%= link_to map_proposals_path, id: "map", title: t("shared.tags_cloud.districts_list") do %> - <%= image_tag("map.jpg", alt: t("shared.tags_cloud.districts_list")) %> + <%= image_tag(image_path_for("map.jpg", alt: t("shared.tags_cloud.districts_list")) %> <% end %> diff --git a/app/views/shared/_map.html.erb b/app/views/shared/_map.html.erb index 9a666851570..8ab1cf3ec0a 100644 --- a/app/views/shared/_map.html.erb +++ b/app/views/shared/_map.html.erb @@ -13,7 +13,7 @@
- <%= image_tag("map.jpg", usemap: "#html_map", alt: "Mapa de distritos de Madrid") %> + <%= image_tag(image_path_for("map.jpg"), usemap: "#html_map", alt: t("map.alt")) %>
diff --git a/config/locales/custom/en/custom.yml b/config/locales/custom/en/custom.yml index 4dccfe90e7e..069a5efcaf6 100644 --- a/config/locales/custom/en/custom.yml +++ b/config/locales/custom/en/custom.yml @@ -348,3 +348,5 @@ en: meta: title: Change your city with Decide Madrid description: Decide Madrid is a website where you can make decisions to make Madrid more yours, better. Make your proposals for the City Hall to carry them out. + map: + alt: "Map of Madrid districts" diff --git a/config/locales/custom/es/custom.yml b/config/locales/custom/es/custom.yml index c2b9a7dbeae..6038a657939 100644 --- a/config/locales/custom/es/custom.yml +++ b/config/locales/custom/es/custom.yml @@ -348,3 +348,5 @@ es: meta: title: Cambia tu ciudad con Decide Madrid description: Decide Madrid es una web donde puedes tomar decisiones para hacer Madrid más tuyo, mejor. Presenta tus propuestas para que el Ayuntamiento las lleve a cabo. + map: + alt: "Mapa de distritos de Madrid" diff --git a/spec/features/admin/site_customization/images_spec.rb b/spec/features/admin/site_customization/images_spec.rb index 0dedab3daf2..630166b01ad 100644 --- a/spec/features/admin/site_customization/images_spec.rb +++ b/spec/features/admin/site_customization/images_spec.rb @@ -39,7 +39,9 @@ expect(page).to have_css("img[src*='custom_map.jpg']", count: 1) end - scenario "Image is replaced on front view" do + scenario "Image is replaced on front views" do + budget = create(:budget) + group = create(:budget_group, budget: budget) visit admin_root_path within("#side_menu") do @@ -56,6 +58,18 @@ within("#map") do expect(page).to have_css("img[src*='custom_map.jpg']") end + + visit map_proposals_path + + within(".show-for-medium") do + expect(page).to have_css("img[src*='custom_map.jpg']") + end + + visit budget_group_path(budget, group) + + within(".show-for-medium") do + expect(page).to have_css("img[src*='custom_map.jpg']") + end end scenario "Upload invalid image" do