]> git.openstreetmap.org Git - rails.git/blob - config/initializers/selenium.rb
Switch to dynamic allocation for the Firefox bidi port
[rails.git] / config / initializers / selenium.rb
1 if Rails.env.test?
2   require "active_support/testing/parallelization"
3
4   module OpenStreetMap
5     module Selenium
6       module BidiPort
7         def initialize(config)
8           super
9
10           @extra_args = Array(@extra_args) << "--websocket-port=0"
11         end
12       end
13     end
14   end
15
16   Selenium::WebDriver::ServiceManager.prepend(OpenStreetMap::Selenium::BidiPort)
17 end