<p dir="auto">I noticed that one test fails sometimes:</p>
<pre class="notranslate"><code class="notranslate">Failure:
ChangesetsControllerTest#test_show_paginated_element_links [test/controllers/changesets_controller_test.rb:312]:
Expected exactly 1 element matching "a[href='/way/109']", found 0.
Expected: 1
Actual: 0
bin/rails test test/controllers/changesets_controller_test.rb:301
</code></pre>
<p dir="auto">That's probably because I assumed that on the changeset page the elements will be shown in the same order as they were created. But actually they are not sorted, so sometimes the order may be different.</p>
<p dir="auto">Here I remove the ordering assumption and check the next page for an element that was missing from the first page.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/4571'>https://github.com/openstreetmap/openstreetmap-website/pull/4571</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/4571/commits/d2788690e9ce0bcf015baf0d941eafe5c7139b18" class="commit-link">d278869</a> Don't assume order when testing links to changeset elements</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4571/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/4571/files#diff-6cdb8b8fa44e422834c4815943a8e4933d6d09e4687f338d007daeff1a90daa9">test/controllers/changesets_controller_test.rb</a>
(60)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4571.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/4571.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/4571.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/4571.diff</a></li>
</ul>
<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/pull/4571">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLOFOR6IGKPXMTFRBKDYX6JZPAVCNFSM6AAAAABETFILZSVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE4DEOBXGMZDQMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIWAOP4ZDIBILLWCE3YX6JZPA5CNFSM6AAAAABETFILZSWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHIEHAAYA.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/pull/4571</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/pull/4571",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4571",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>