]> git.openstreetmap.org Git - rails.git/commitdiff
Remove the userinformation ids from headings
authorAndy Allan <git@gravitystorm.co.uk>
Thu, 11 Nov 2021 14:53:36 +0000 (14:53 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Thu, 11 Nov 2021 14:53:36 +0000 (14:53 +0000)
The style rule was removed in 3f8cf322723750aa4c8d062d4a727f9107ceccb4
and they were otherwise only used in the tests.

app/views/diary_entries/index.html.erb
app/views/diary_entries/show.html.erb
app/views/users/show.html.erb
test/controllers/users_controller_test.rb

index b08bf05a4261a27315d1c39ecf0910ba0adb8d0d..9c0112cd0b62afb0949c38f868983373f38ae880 100644 (file)
@@ -1,6 +1,6 @@
 <% content_for :head, tag.meta(:name => :robots, :content => :noindex) %>
 <% content_for :heading do %>
-  <div <% if @user %> id="userinformation"<% end %> class="row">
+  <div class="row">
     <% if @user %>
         <div class="col-auto">
           <%= user_image @user %>
index 23b2dc783dd6ce31ac5299fd5e0a1f5b775e88ec..e281743f6577fb263d53c14875f8d3782736e82d 100644 (file)
@@ -1,5 +1,5 @@
 <% content_for :heading do %>
-  <div id="userinformation" class="row">
+  <div class="row">
     <div class="col-sm-auto">
       <%= user_image @entry.user %>
     </div>
index 9e078ce74bda7b8bec69be985b2a1b5795d6ac87..2a195ca60d40d659569d84bbb73010de47addf5c 100644 (file)
@@ -1,5 +1,5 @@
 <% content_for :heading do %>
-  <div id="userinformation" class="row">
+  <div class="row">
     <div class="col-sm-auto">
       <%= user_image @user %>
     </div>
index 6e156375b289fea99221627758aaf72e028eb0c7..23c67794a4d6465bbffff988203f1bdea78d056e 100644 (file)
@@ -560,7 +560,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
 
     get user_path(user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "a[href^='/user/#{ERB::Util.u(user.display_name)}/history']", 1
       assert_select "a[href='/user/#{ERB::Util.u(user.display_name)}/traces']", 1
       assert_select "a[href='/user/#{ERB::Util.u(user.display_name)}/diary']", 1
@@ -579,7 +579,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
     create(:user_block, :user => blocked_user)
     get user_path(blocked_user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "a[href^='/user/#{ERB::Util.u(blocked_user.display_name)}/history']", 1
       assert_select "a[href='/user/#{ERB::Util.u(blocked_user.display_name)}/traces']", 1
       assert_select "a[href='/user/#{ERB::Util.u(blocked_user.display_name)}/diary']", 1
@@ -595,7 +595,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
     create(:user_block, :creator => moderator_user)
     get user_path(moderator_user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "a[href^='/user/#{ERB::Util.u(moderator_user.display_name)}/history']", 1
       assert_select "a[href='/user/#{ERB::Util.u(moderator_user.display_name)}/traces']", 1
       assert_select "a[href='/user/#{ERB::Util.u(moderator_user.display_name)}/diary']", 1
@@ -612,7 +612,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
     # Test the normal user
     get user_path(user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "a[href^='/user/#{ERB::Util.u(user.display_name)}/history']", 1
       assert_select "a[href='/traces/mine']", 1
       assert_select "a[href='/user/#{ERB::Util.u(user.display_name)}/diary']", 1
@@ -629,7 +629,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
     # Test the normal user
     get user_path(user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "a[href^='/user/#{ERB::Util.u(user.display_name)}/history']", 1
       assert_select "a[href='/user/#{ERB::Util.u(user.display_name)}/traces']", 1
       assert_select "a[href='/user/#{ERB::Util.u(user.display_name)}/diary']", 1
@@ -649,21 +649,21 @@ class UsersControllerTest < ActionDispatch::IntegrationTest
 
     get user_path(agreed_user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "dt", :count => 0, :text => /Contributor terms/
     end
 
     get user_path(seen_user)
     assert_response :success
     # put @response.body
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "dt", :count => 1, :text => /Contributor terms/
       assert_select "dd", /Declined/
     end
 
     get user_path(not_seen_user)
     assert_response :success
-    assert_select "div#userinformation" do
+    assert_select "div.content-heading" do
       assert_select "dt", :count => 1, :text => /Contributor terms/
       assert_select "dd", /Undecided/
     end