[openstreetmap/openstreetmap-website] Add pagination to Issues page (PR #5057)

Tom Hughes notifications at github.com
Mon Aug 26 22:00:30 UTC 2024


@tomhughes commented on this pull request.



> +    end
+
+    sign_in_as(create(:administrator_user))
+
+    visit issues_path
+
+    # First Page
+    assert_no_content I18n.t("issues.index.user_not_found")
+    assert_no_content I18n.t("issues.index.issues_not_found")
+    assert_css "tr", :count => 51
+
+    # Second Page
+    click_on I18n.t("issues.page.older_issues")
+    assert_no_content I18n.t("issues.index.user_not_found")
+    assert_no_content I18n.t("issues.index.issues_not_found")
+    assert_css "tr", :count => 31, :wait => 1.5

That doesn't really make any sense - a shorter timeout shouldn't fix it. I suspect it was actually just chance that you set a timeout and then that run happened to work within the timeout.

All of which is why I hat tests which rely on timeouts, because they're not deterministic and can fail arbitrarily on different machines or even on the same machine under different conditions.

It seems it's unavoidable with browser based testing like this though, so I suspect we should just increase the default to 5 or 10 or something.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5057#discussion_r1731872486
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/5057/review/2261722733 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240826/bfebb3a0/attachment.htm>


More information about the rails-dev mailing list