diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-11 09:12:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2024-01-11 09:12:48 +0300 |
commit | 826d6628ca045013b9d19ec5cb4d02ac81b76c68 (patch) | |
tree | 176fe063a69cce5534d72558c505fd943d243935 /qa | |
parent | 988f8190b39847793faba06375973f8d4a024426 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r-- | qa/qa/runtime/browser.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb index 1fad0b76645..a0949a0daf4 100644 --- a/qa/qa/runtime/browser.rb +++ b/qa/qa/runtime/browser.rb @@ -69,17 +69,18 @@ module QA chrome_options = { args: %w[no-sandbox] } # Run headless by default unless WEBDRIVER_HEADLESS is false - if QA::Runtime::Env.webdriver_headless? - chrome_options[:args] << 'headless' - - # Chrome documentation says this flag is needed for now - # https://developers.google.com/web/updates/2017/04/headless-chrome#cli - chrome_options[:args] << 'disable-gpu' - end + chrome_options[:args] << 'headless=new' if QA::Runtime::Env.webdriver_headless? # Disable /dev/shm use in CI. See https://gitlab.com/gitlab-org/gitlab/issues/4252 chrome_options[:args] << 'disable-dev-shm-usage' if QA::Runtime::Env.disable_dev_shm? + # Allows chrome to consider all actions as secure when no ssl is used + Runtime::Scenario.attributes[:gitlab_address].tap do |address| + next unless address.start_with?('http://') + + chrome_options[:args] << "unsafely-treat-insecure-origin-as-secure=#{address}" + end + # Set chrome default download path # TODO: Set for remote grid as well once Sauce Labs tests are deprecated and Options.chrome is added # See https://gitlab.com/gitlab-org/gitlab/-/merge_requests/112258 |