Always use map image from admin site customization images
This commit is contained in:
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="medium-5 column show-for-medium text-center">
|
<div class="medium-5 column show-for-medium text-center">
|
||||||
<%= image_tag "map.jpg" %>
|
<%= image_tag(image_path_for("map.jpg")) %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<h2 class="sidebar-title"><%= t("shared.tags_cloud.districts") %></h2>
|
<h2 class="sidebar-title"><%= t("shared.tags_cloud.districts") %></h2>
|
||||||
<br>
|
<br>
|
||||||
<%= link_to map_proposals_path, id: "map", title: t("shared.tags_cloud.districts_list") do %>
|
<%= 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 %>
|
<% end %>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="show-for-medium medium-9 column text-center">
|
<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>
|
</div>
|
||||||
|
|
||||||
<map name="map" id="html_map">
|
<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)
|
expect(page).to have_css("img[src*='custom_map.jpg']", count: 1)
|
||||||
end
|
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
|
visit admin_root_path
|
||||||
|
|
||||||
within("#side_menu") do
|
within("#side_menu") do
|
||||||
@@ -56,6 +58,18 @@ feature "Admin custom images" do
|
|||||||
within("#map") do
|
within("#map") do
|
||||||
expect(page).to have_css("img[src*='custom_map.jpg']")
|
expect(page).to have_css("img[src*='custom_map.jpg']")
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
scenario "Upload invalid image" do
|
scenario "Upload invalid image" do
|
||||||
|
|||||||
Reference in New Issue
Block a user