<p></p>
<p dir="auto">Capybara has "intelligent waiting" by default, where it doesn't fail assertions immediately after a click, it retries until it detects the content on the page and then runs the assertions. So I wonder if it's not that the next page is taking 2+ seconds to render (and that would be a problem in itself) but rather that the turbo has just started to run, but capybara thinks the content is already present and so immediately tests it, before turbo is finished (which might be only a few ms later).</p>
<p dir="auto">So it might not be related to timeouts (and there's no timeout information in the error) but rather that capybara's running too quickly. In which case extending the (maximum) wait time might not help.</p>
<p dir="auto">It's perhaps notable that this particular assertion isn't checking that a specific thing will appear (e.g. specific text, or html with a specific id, from the second page of results) that capybara would normally intelligently wait for. Instead it's checking for html that's also on the original page (just in a different count). Could that be interfering with the intelligent waiting?</p>
<p dir="auto"><a href="https://github.com/teamcapybara/capybara#asynchronous-javascript-ajax-and-friends">https://github.com/teamcapybara/capybara#asynchronous-javascript-ajax-and-friends</a></p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/5127#issuecomment-2317325974">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMMSNTX2X5NTBXVOBDZT35NHAVCNFSM6AAAAABNIZQIDSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJXGMZDKOJXGQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIV3HN32TOAGJPNEKTZT35NHA5CNFSM6AAAAABNIZQIDSWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUKD6LJM.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/issues/5127/2317325974</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/5127#issuecomment-2317325974",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/5127#issuecomment-2317325974",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>