Always use map image from admin site customization images
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
</div>
|
||||
|
||||
<div class="medium-5 column show-for-medium text-center">
|
||||
<%= image_tag "map.jpg" %>
|
||||
<%= image_tag(image_path_for("map.jpg")) %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
<h2 class="sidebar-title"><%= t("shared.tags_cloud.districts") %></h2>
|
||||
<br>
|
||||
<%= 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 %>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
|
||||
<div class="show-for-medium medium-9 column text-center">
|
||||
<%= image_tag("map.jpg", usemap: "#map") %>
|
||||
<%= image_tag(image_path_for("map.jpg"), usemap: "#map") %>
|
||||
</div>
|
||||
|
||||
<map name="map" id="html_map">
|
||||
|
||||
@@ -39,7 +39,9 @@ feature "Admin custom images" do
|
||||
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 @@ feature "Admin custom images" do
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user