X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8cef62cd2cec4a297e46b4f2a86c9afeadb3b283..bad03267c13c82dbe33a64410fbf0fc9356f4fbf:/test/system/history_test.rb?ds=sidebyside diff --git a/test/system/history_test.rb b/test/system/history_test.rb index 335063db9..679f711b3 100644 --- a/test/system/history_test.rb +++ b/test/system/history_test.rb @@ -28,27 +28,29 @@ class HistoryTest < ApplicationSystemTestCase create_visible_changeset(user, "next-changeset") end - visit "#{user_path(user)}/history" - changesets = find "div.changesets" - changesets.assert_text "bottom-changeset-in-batch-1" - changesets.assert_no_text "bottom-changeset-in-batch-2" - changesets.assert_no_text "first-changeset-in-history" - changesets.assert_selector "ol", :count => 1 - changesets.assert_selector "li", :count => PAGE_SIZE - - changesets.find(".changeset_more a.btn").click - changesets.assert_text "bottom-changeset-in-batch-1" - changesets.assert_text "bottom-changeset-in-batch-2" - changesets.assert_no_text "first-changeset-in-history" - changesets.assert_selector "ol", :count => 1 - changesets.assert_selector "li", :count => 2 * PAGE_SIZE - - changesets.find(".changeset_more a.btn").click - changesets.assert_text "bottom-changeset-in-batch-1" - changesets.assert_text "bottom-changeset-in-batch-2" - changesets.assert_text "first-changeset-in-history" - changesets.assert_selector "ol", :count => 1 - changesets.assert_selector "li", :count => (2 * PAGE_SIZE) + 1 + assert_nothing_raised do + visit "#{user_path(user)}/history" + changesets = find "div.changesets" + changesets.assert_text "bottom-changeset-in-batch-1" + changesets.assert_no_text "bottom-changeset-in-batch-2" + changesets.assert_no_text "first-changeset-in-history" + changesets.assert_selector "ol", :count => 1 + changesets.assert_selector "li", :count => PAGE_SIZE + + changesets.find(".changeset_more a.btn").click + changesets.assert_text "bottom-changeset-in-batch-1" + changesets.assert_text "bottom-changeset-in-batch-2" + changesets.assert_no_text "first-changeset-in-history" + changesets.assert_selector "ol", :count => 1 + changesets.assert_selector "li", :count => 2 * PAGE_SIZE + + changesets.find(".changeset_more a.btn").click + changesets.assert_text "bottom-changeset-in-batch-1" + changesets.assert_text "bottom-changeset-in-batch-2" + changesets.assert_text "first-changeset-in-history" + changesets.assert_selector "ol", :count => 1 + changesets.assert_selector "li", :count => (2 * PAGE_SIZE) + 1 + end end def create_visible_changeset(user, comment)