[openstreetmap/openstreetmap-website] Add documentation for running system specs on Ubuntu (Issue #5488)

Andy Allan notifications at github.com
Thu Jan 9 14:00:53 UTC 2025


Our system specs (and our teaspoon specs) don't work on Ubuntu, due to incompatibilities with firefox snap. We should document that they don't work, or we should document how to make them work, or (ideally) figure out if there's a way to get them to work automatically.

The root of the problem is that on Ubuntu, firefox is distributed as a snap package, and so the path returned by `which firefox` is not actually a firefox binary, it's just a bit of snap-related code. 

My personal not-quite-working-workarounds are, in `test/application_system_test_case.rb`:

```diff
 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
   driven_by :selenium, :using => :headless_firefox do |options|
     options.add_preference("intl.accept_languages", "en")
+    options.binary = "/snap/firefox/current/usr/lib/firefox/firefox"
   end
```

I've still found problems with some javascript stuff that I haven't yet resolved.

For `/test/teaspoon_env.rb`:

```diff
   config.driver_options = {
     :client_driver => :firefox,
     :selenium_options => {
-      :options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"])
+      :options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"], :binary => "/snap/firefox/current/usr/lib/firefox/firefox")
     }
   }
```

I'm not sure whether documenting that they don't work is easier than documenting the workarounds!

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

Message ID: <openstreetmap/openstreetmap-website/issues/5488 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250109/05418a9a/attachment.htm>


More information about the rails-dev mailing list