diaspora/spec/javascripts/support/jasmine_helper.rb
Benjamin Neff 11107ee637
Fix chrome parameters for running jasmine
Yes, I know this is a very ugly workaround, but it works ...

Chrome now requires to add `about:blank` as parameter to open and be
able to use remote debugging. The jasmine-gem isn't supported anymore,
and we need to switch to the `jasmine-browser-runner`, I was working on
that a few months ago, but ran into problems.

As the jasmine-gem doesn't allow to add parameters without `--` infront
of it, lets just add a dummy parameter and add the required
`about:blank` with a space after that. This is ugly, but works for now,
until we can upgrade to the new jasmine version. We could also just
replace the `nil` of the last parameter with that value, but I think
that way it's clearer that this is a workaround and how it works.
2023-06-04 17:10:51 +02:00

12 lines
534 B
Ruby

# frozen_string_literal: true
Jasmine.configure do |config|
config.prevent_phantom_js_auto_install = true
config.runner_browser = :chromeheadless
config.chrome_startup_timeout = 20
config.chrome_cli_options["autoplay-policy"] = "no-user-gesture-required"
config.chrome_cli_options["disable-gpu"] = nil
config.chrome_cli_options["disable-software-rasterizer"] = nil
config.chrome_cli_options["disable-dev-shm-usage"] = nil
config.chrome_cli_options["last-parameter-to-open-blank-page-workaround"] = " about:blank"
end