From: Anton Khorev Date: Tue, 24 Dec 2024 03:44:00 +0000 (+0300) Subject: Test active nav tabs on blocks_on/by pages X-Git-Tag: live~11^2~5 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/1d31573b0387958b0181b6c5c69543b440d55dd1 Test active nav tabs on blocks_on/by pages --- diff --git a/test/controllers/user_blocks_controller_test.rb b/test/controllers/user_blocks_controller_test.rb index 183bc9b7b..fee8f4cb3 100644 --- a/test/controllers/user_blocks_controller_test.rb +++ b/test/controllers/user_blocks_controller_test.rb @@ -834,6 +834,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest get user_blocks_on_path(blocked_user) assert_response :success assert_select "h1 a[href='#{user_path blocked_user}']", :text => blocked_user.display_name + assert_select "a.active[href='#{user_blocks_on_path blocked_user}']" assert_select "table#block_list tbody", :count => 1 do assert_select "tr", 2 assert_select "a[href='#{user_block_path(active_block)}']", 1 @@ -844,6 +845,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest get user_blocks_on_path(unblocked_user) assert_response :success assert_select "h1 a[href='#{user_path unblocked_user}']", :text => unblocked_user.display_name + assert_select "a.active[href='#{user_blocks_on_path unblocked_user}']" assert_select "table#block_list tbody", :count => 1 do assert_select "tr", 1 assert_select "a[href='#{user_block_path(expired_block)}']", 1 @@ -910,6 +912,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest get user_blocks_by_path(moderator_user) assert_response :success assert_select "h1 a[href='#{user_path moderator_user}']", :text => moderator_user.display_name + assert_select "a.active[href='#{user_blocks_by_path moderator_user}']" assert_select "table#block_list tbody", :count => 1 do assert_select "tr", 1 assert_select "a[href='#{user_block_path(active_block)}']", 1 @@ -919,6 +922,7 @@ class UserBlocksControllerTest < ActionDispatch::IntegrationTest get user_blocks_by_path(second_moderator_user) assert_response :success assert_select "h1 a[href='#{user_path second_moderator_user}']", :text => second_moderator_user.display_name + assert_select "a.active[href='#{user_blocks_by_path second_moderator_user}']" assert_select "table#block_list tbody", :count => 1 do assert_select "tr", 2 assert_select "a[href='#{user_block_path(expired_block)}']", 1