[openstreetmap/openstreetmap-website] Fix flaky UnknownLanguageEmbedTest (PR #7378)

Kai Michael Poppe notifications at github.com
Thu Sep 10 05:32:05 UTC 2026


### Description
unknown_language_embed_test failed intermittently only in GH actions, not locally.

#### Cause
The embed is a MapLibre GL (WebGL) map, and the "Report a problem" link is added client-side by the attribution control after the map initializes (`app/assets/javascripts/maplibre/attribution.js`). 
`assert_link` only auto-waits up to `Capybara.default_max_wait_time` (2 s). Locally this control appears in ~0.3 s, so the test always passes. In CI (parallel workers, slower runners, headless Firefox with software WebGL) the map/control init occasionally takes longer than 2 s, so the assertion times out. 
It is a timing race against WebGL init, not a logic error, confirmed by lowering `default_max_wait_time` to 0.1 s locally, which reproduces the failure.

#### Fix
Give this WebGL-dependent assertion a larger, explicit wait instead of relying on the 2 s 

### How has this been tested?
Local DEVCONTAINER instance, passed the test when running on the default value, but lowering the timeout to a ridiciously low value resulted in the same error. Maximum wait time (now 30 s) is up for debate.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/7378

-- Commit Summary --

  * Fix flaky UnknownLanguageEmbedTest

-- File Changes --

    M test/system/unknown_language_embed_test.rb (2)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/7378.patch
https://github.com/openstreetmap/openstreetmap-website/pull/7378.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/7378 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260909/6f79991f/attachment.htm>


More information about the rails-dev mailing list