From c608c123ee594fa39504fb0d0b4e0c79954d771e Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Sun, 22 Jun 2025 21:03:40 +0300 Subject: [PATCH] Move element and history links to breadcrumbs --- app/views/elements/show.html.erb | 26 +++-- app/views/old_elements/_actions.html.erb | 20 ++-- app/views/old_elements/index.html.erb | 34 +++++-- config/locales/en.yml | 9 +- test/system/element_current_version_test.rb | 60 +++++------ test/system/element_history_test.rb | 104 ++++++++++---------- test/system/element_old_version_test.rb | 84 ++++++++-------- 7 files changed, 185 insertions(+), 152 deletions(-) diff --git a/app/views/elements/show.html.erb b/app/views/elements/show.html.erb index 29f911f79..b76cb6ab0 100644 --- a/app/views/elements/show.html.erb +++ b/app/views/elements/show.html.erb @@ -5,10 +5,26 @@ <%= render :partial => "browse/#{@type}", :object => @feature %> <% if @feature.visible? %> -
+
<%= link_to(t("browse.download_xml"), :controller => "api/#{@type.pluralize}", :action => :show) %>
<% end %> + + +
<% if @feature.version > 1 %> <%= link_to({ :controller => "old_#{@type.pluralize}", :action => :show, :version => 1 }, :class => "icon-link") do %> @@ -16,14 +32,6 @@ <%= "#{t('browse.version')} #1" %> <% end %> · - <% end %> - <%= link_to t("browse.view_history"), :controller => "old_#{@type.pluralize}" %> - <% if current_user&.moderator? %> - · - <%= link_to(t("browse.view_unredacted_history"), :controller => "old_#{@type.pluralize}", :params => { :show_redactions => true }) %> - <% end %> - <% if @feature.version > 1 %> - · <%= link_to({ :controller => "old_#{@type.pluralize}", :action => :show, :version => @feature.version }, :class => "icon-link") do %> <%= "#{t('browse.version')} ##{@feature.version}" %> <%= next_page_svg_tag :height => 11, :count => 2 %> diff --git a/app/views/old_elements/_actions.html.erb b/app/views/old_elements/_actions.html.erb index b4d28123c..ec1999976 100644 --- a/app/views/old_elements/_actions.html.erb +++ b/app/views/old_elements/_actions.html.erb @@ -1,10 +1,7 @@ -
- <%= link_to t("browse.view_details"), :controller => @type.pluralize, :action => :show %> +
<% if !@feature.redacted? %> - · <%= link_to t("browse.download_xml"), send(:"api_#{@type}_version_path", *@feature.id) %> <% elsif current_user&.moderator? %> - · <% if !params[:show_redactions] %> <%= link_to t(".view_redacted_data"), :params => { :show_redactions => true } %> <% else %> @@ -13,17 +10,28 @@ <% end %>
+ +
<% if @feature.version > 1 %> <%= link_to({ :version => @feature.version - 1 }, { :class => "icon-link" }) do %> <%= previous_page_svg_tag :height => 11 %> <%= "#{t('browse.version')} ##{@feature.version - 1}" %> <% end %> + <% end %> + <% if @feature.version > 1 && !@feature.latest_version? %> · <% end %> - <%= link_to t("browse.view_history"), :action => :index %> <% unless @feature.latest_version? %> - · <%= link_to({ :version => @feature.version + 1 }, { :class => "icon-link" }) do %> <%= "#{t('browse.version')} ##{@feature.version + 1}" %> <%= next_page_svg_tag :height => 11 %> diff --git a/app/views/old_elements/index.html.erb b/app/views/old_elements/index.html.erb index a3db93746..fce5954b4 100644 --- a/app/views/old_elements/index.html.erb +++ b/app/views/old_elements/index.html.erb @@ -28,15 +28,29 @@ <% end %> -
+
<%= link_to t("browse.download_xml"), send(:"api_#{@type}_versions_path", @feature.id) %> - · - <%= link_to t("browse.view_details"), :controller => @type.pluralize, :action => :show %> - <% if params[:show_redactions] %> - · - <%= link_to t("browse.view_history"), params.permit(:before, :after) %> - <% elsif current_user&.moderator? %> - · - <%= link_to t("browse.view_unredacted_history"), params.permit(:before, :after).merge(:show_redactions => true) %> - <% end %>
+ + diff --git a/config/locales/en.yml b/config/locales/en.yml index 6b6904afa..3aea3afd2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -357,9 +357,6 @@ en: one: "%{count} way" other: "%{count} ways" download_xml: "Download XML" - view_history: "View History" - view_unredacted_history: "View Unredacted History" - view_details: "View Details" location: "Location:" common_details: coordinates_html: "%{latitude}, %{longitude}" @@ -423,6 +420,12 @@ en: telephone_link: "Call %{phone_number}" colour_preview: "Colour %{colour_value} preview" email_link: "Email %{email}" + versions_navigation: + node: "Node" + way: "Way" + relation: "Relation" + history: "History" + unredacted_history: "Unredacted History" feature_queries: show: title: "Query Features" diff --git a/test/system/element_current_version_test.rb b/test/system/element_current_version_test.rb index 908b30cd3..5d77d3711 100644 --- a/test/system/element_current_version_test.rb +++ b/test/system/element_current_version_test.rb @@ -15,8 +15,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_no_text "Deleted" assert_link "Download XML", :href => api_node_path(node) - assert_link "View History", :href => node_history_path(node) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => node_history_path(node) + assert_no_link "Unredacted History" end end @@ -33,8 +33,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_no_text "Deleted" assert_link "Download XML", :href => api_way_path(way) - assert_link "View History", :href => way_history_path(way) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => way_history_path(way) + assert_no_link "Unredacted History" end end @@ -51,8 +51,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_no_text "Deleted" assert_link "Download XML", :href => api_relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => relation_history_path(relation) + assert_no_link "Unredacted History" end end @@ -70,8 +70,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_no_text "Deleted" assert_link "Download XML", :href => api_node_path(node) - assert_link "View History", :href => node_history_path(node) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => node_history_path(node) + assert_no_link "Unredacted History" assert_link "Version #1", :href => old_node_path(node, 1) assert_link "Version #2", :href => old_node_path(node, 2) end @@ -90,8 +90,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_no_text "Deleted" assert_link "Download XML", :href => api_way_path(way) - assert_link "View History", :href => way_history_path(way) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => way_history_path(way) + assert_no_link "Unredacted History" assert_link "Version #1", :href => old_way_path(way, 1) assert_link "Version #2", :href => old_way_path(way, 2) end @@ -110,8 +110,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_no_text "Deleted" assert_link "Download XML", :href => api_relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => relation_history_path(relation) + assert_no_link "Unredacted History" assert_link "Version #1", :href => old_relation_path(relation, 1) assert_link "Version #2", :href => old_relation_path(relation, 2) end @@ -131,8 +131,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_text "Deleted" assert_no_link "Download XML" - assert_link "View History", :href => node_history_path(node) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => node_history_path(node) + assert_no_link "Unredacted History" end end @@ -149,8 +149,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_text "Deleted" assert_no_link "Download XML" - assert_link "View History", :href => way_history_path(way) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => way_history_path(way) + assert_no_link "Unredacted History" end end @@ -167,8 +167,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase assert_text "Deleted" assert_no_link "Download XML" - assert_link "View History", :href => relation_history_path(relation) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => relation_history_path(relation) + assert_no_link "Unredacted History" end end @@ -179,8 +179,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase visit node_path(node) within_sidebar do - assert_link "View History", :href => node_history_path(node) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => node_history_path(node) + assert_no_link "Unredacted History" end end @@ -191,8 +191,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase visit way_path(way) within_sidebar do - assert_link "View History", :href => way_history_path(way) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => way_history_path(way) + assert_no_link "Unredacted History" end end @@ -203,8 +203,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase visit relation_path(relation) within_sidebar do - assert_link "View History", :href => relation_history_path(relation) - assert_no_link "View Unredacted History" + assert_link "History", :exact => true, :href => relation_history_path(relation) + assert_no_link "Unredacted History" end end @@ -215,8 +215,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase visit node_path(node) within_sidebar do - assert_link "View History", :href => node_history_path(node) - assert_link "View Unredacted History", :href => node_history_path(node, :show_redactions => true) + assert_link "History", :exact => true, :href => node_history_path(node) + assert_link "Unredacted History", :href => node_history_path(node, :show_redactions => true) end end @@ -227,8 +227,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase visit way_path(way) within_sidebar do - assert_link "View History", :href => way_history_path(way) - assert_link "View Unredacted History", :href => way_history_path(way, :show_redactions => true) + assert_link "History", :exact => true, :href => way_history_path(way) + assert_link "Unredacted History", :href => way_history_path(way, :show_redactions => true) end end @@ -239,8 +239,8 @@ class ElementCurrentVersionTest < ApplicationSystemTestCase visit relation_path(relation) within_sidebar do - assert_link "View History", :href => relation_history_path(relation) - assert_link "View Unredacted History", :href => relation_history_path(relation, :show_redactions => true) + assert_link "History", :exact => true, :href => relation_history_path(relation) + assert_link "Unredacted History", :href => relation_history_path(relation, :show_redactions => true) end end diff --git a/test/system/element_history_test.rb b/test/system/element_history_test.rb index 36e523c1e..9b2c0d9b7 100644 --- a/test/system/element_history_test.rb +++ b/test/system/element_history_test.rb @@ -20,9 +20,9 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_text(/Location: 60\.\d+, 30\.\d+/) assert_text(/Location: 59\.\d+, 29\.\d+/) - assert_link "View Details", :href => node_path(node) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Node", :href => node_path(node) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -42,9 +42,9 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_css "td", :text => "VALUE-TWO", :below => v2_heading, :above => v1_heading assert_css "td", :text => "VALUE-ONE", :below => v1_heading - assert_link "View Details", :href => way_path(way) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Way", :href => way_path(way) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -64,9 +64,9 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_css "td", :text => "VALUE-TWO", :below => v2_heading, :above => v1_heading assert_css "td", :text => "VALUE-ONE", :below => v1_heading - assert_link "View Details", :href => relation_path(relation) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Relation", :href => relation_path(relation) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -76,9 +76,9 @@ class ElementHistoryTest < ApplicationSystemTestCase visit node_history_path(node) within_sidebar do - assert_link "View Details", :href => node_path(node) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Node", :href => node_path(node) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -88,9 +88,9 @@ class ElementHistoryTest < ApplicationSystemTestCase visit way_history_path(way) within_sidebar do - assert_link "View Details", :href => way_path(way) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Way", :href => way_path(way) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -100,9 +100,9 @@ class ElementHistoryTest < ApplicationSystemTestCase visit relation_history_path(relation) within_sidebar do - assert_link "View Details", :href => relation_path(relation) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Relation", :href => relation_path(relation) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -125,9 +125,9 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_no_text(/Location: 59\.\d+, 29\.\d+/) assert_text "Version 1 of this node cannot be shown" - assert_link "View Details", :href => node_path(node) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Node", :href => node_path(node) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -147,9 +147,9 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_no_css "td", :text => "VALUE-ONE" assert_text "Version 1 of this way cannot be shown" - assert_link "View Details", :href => way_path(way) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Way", :href => way_path(way) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -169,9 +169,9 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_no_css "td", :text => "VALUE-ONE" assert_text "Version 1 of this relation cannot be shown" - assert_link "View Details", :href => relation_path(relation) - assert_no_link "View History" - assert_no_link "View Unredacted History" + assert_link "Relation", :href => relation_path(relation) + assert_no_link "History", :exact => true + assert_no_link "Unredacted History" end end @@ -194,11 +194,11 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_no_text(/Location: 59\.\d+, 29\.\d+/) assert_text "Version 1 of this node cannot be shown" - assert_link "View Details", :href => node_path(node) - assert_no_link "View History" - assert_link "View Unredacted History" + assert_link "Node", :href => node_path(node) + assert_no_link "History", :exact => true + assert_link "Unredacted History" - click_on "View Unredacted History" + click_on "Unredacted History" assert_css "td", :text => "VALUE-TWO" assert_css "td", :text => "VALUE-ONE" @@ -206,11 +206,11 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_text(/Location: 59\.\d+, 29\.\d+/) assert_no_text "Version 1 of this node cannot be shown" - assert_link "View Details", :href => node_path(node) - assert_link "View History" - assert_no_link "View Unredacted History" + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true + assert_no_link "Unredacted History" - click_on "View History" + click_on "History", :exact => true assert_text "Version 1 of this node cannot be shown" end @@ -232,21 +232,21 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_no_css "td", :text => "VALUE-ONE" assert_text "Version 1 of this way cannot be shown" - assert_link "View Details", :href => way_path(way) - assert_no_link "View History" - assert_link "View Unredacted History" + assert_link "Way", :href => way_path(way) + assert_no_link "History", :exact => true + assert_link "Unredacted History" - click_on "View Unredacted History" + click_on "Unredacted History" assert_css "td", :text => "VALUE-TWO" assert_css "td", :text => "VALUE-ONE" assert_no_text "Version 1 of this way cannot be shown" - assert_link "View Details", :href => way_path(way) - assert_link "View History" - assert_no_link "View Unredacted History" + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true + assert_no_link "Unredacted History" - click_on "View History" + click_on "History", :exact => true assert_text "Version 1 of this way cannot be shown" end @@ -268,21 +268,21 @@ class ElementHistoryTest < ApplicationSystemTestCase assert_no_css "td", :text => "VALUE-ONE" assert_text "Version 1 of this relation cannot be shown" - assert_link "View Details", :href => relation_path(relation) - assert_no_link "View History" - assert_link "View Unredacted History" + assert_link "Relation", :href => relation_path(relation) + assert_no_link "History", :exact => true + assert_link "Unredacted History" - click_on "View Unredacted History" + click_on "Unredacted History" assert_css "td", :text => "VALUE-TWO" assert_css "td", :text => "VALUE-ONE" assert_no_text "Version 1 of this relation cannot be shown" - assert_link "View Details", :href => relation_path(relation) - assert_link "View History" - assert_no_link "View Unredacted History" + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true + assert_no_link "Unredacted History" - click_on "View History" + click_on "History", :exact => true assert_text "Version 1 of this relation cannot be shown" end @@ -316,7 +316,7 @@ class ElementHistoryTest < ApplicationSystemTestCase def check_element_history_pages(get_path) within_sidebar do - click_on "View History" + click_on "History", :exact => true 41.downto(22) do |v| assert_link v.to_s, :href => get_path.call(v) diff --git a/test/system/element_old_version_test.rb b/test/system/element_old_version_test.rb index c68418e8a..e02ae62ac 100644 --- a/test/system/element_old_version_test.rb +++ b/test/system/element_old_version_test.rb @@ -12,8 +12,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_text(/Location: 60\.\d+, 30\.\d+/) assert_link "Download XML", :href => api_node_version_path(node, 1) - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) end end @@ -27,8 +27,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_css "h4", :text => "Version #1" assert_link "Download XML", :href => api_way_version_path(way, 1) - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) end end @@ -42,8 +42,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_css "h4", :text => "Version #1" assert_link "Download XML", :href => api_relation_version_path(relation, 1) - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) end end @@ -59,8 +59,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_text(/Location: 59\.\d+, 29\.\d+/) assert_link "Download XML", :href => api_node_version_path(node, 1) - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) click_on "Version #2" @@ -69,8 +69,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_text(/Location: 60\.\d+, 30\.\d+/) assert_link "Download XML", :href => api_node_version_path(node, 2) - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) end end @@ -84,8 +84,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_css "h4", :text => "Version #1" assert_link "Download XML", :href => api_way_version_path(way, 1) - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) click_on "Version #2" @@ -93,8 +93,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_css "h4", :text => "Version #2" assert_link "Download XML", :href => api_way_version_path(way, 2) - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) end end @@ -108,8 +108,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_css "h4", :text => "Version #1" assert_link "Download XML", :href => api_relation_version_path(relation, 1) - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) click_on "Version #2" @@ -117,8 +117,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_css "h4", :text => "Version #2" assert_link "Download XML", :href => api_relation_version_path(relation, 2) - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) end end @@ -135,8 +135,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) end end @@ -153,8 +153,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) end end @@ -171,8 +171,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) end end @@ -190,8 +190,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) end end @@ -209,8 +209,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) end end @@ -228,8 +228,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) end end @@ -248,8 +248,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_link "View Redacted Data" assert_no_link "View Redaction Message" - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) click_on "View Redacted Data" @@ -261,8 +261,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" assert_link "View Redaction Message" - assert_link "View Details", :href => node_path(node) - assert_link "View History", :href => node_history_path(node) + assert_link "Node", :href => node_path(node) + assert_link "History", :exact => true, :href => node_history_path(node) click_on "View Redaction Message" @@ -285,8 +285,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_link "View Redacted Data" assert_no_link "View Redaction Message" - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) click_on "View Redacted Data" @@ -297,8 +297,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" assert_link "View Redaction Message" - assert_link "View Details", :href => way_path(way) - assert_link "View History", :href => way_history_path(way) + assert_link "Way", :href => way_path(way) + assert_link "History", :exact => true, :href => way_history_path(way) click_on "View Redaction Message" @@ -321,8 +321,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_link "View Redacted Data" assert_no_link "View Redaction Message" - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) click_on "View Redacted Data" @@ -333,8 +333,8 @@ class ElementOldVersionTest < ApplicationSystemTestCase assert_no_link "Download XML" assert_no_link "View Redacted Data" assert_link "View Redaction Message" - assert_link "View Details", :href => relation_path(relation) - assert_link "View History", :href => relation_history_path(relation) + assert_link "Relation", :href => relation_path(relation) + assert_link "History", :exact => true, :href => relation_history_path(relation) click_on "View Redaction Message" -- 2.39.5