DEV: Run tests with new chrome headless (#21684)

New headless shares the same implementation as the chrome browser
instead of being a separate implementation of its own.

See https://developer.chrome.com/articles/new-headless/ for more
details

Co-authored-by: Rafael dos Santos Silva <xfalcox@gmail.com>
This commit is contained in:
Alan Guo Xiang Tan 2023-05-26 18:02:56 +09:00 committed by GitHub
parent 4676524094
commit dab37c1a5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ module.exports = {
Chrome: [ Chrome: [
// --no-sandbox is needed when running Chrome inside a container // --no-sandbox is needed when running Chrome inside a container
process.env.CI ? "--no-sandbox" : null, process.env.CI ? "--no-sandbox" : null,
"--headless", "--headless=new",
"--disable-dev-shm-usage", "--disable-dev-shm-usage",
"--disable-software-rasterizer", "--disable-software-rasterizer",
"--mute-audio", "--mute-audio",

View File

@ -297,7 +297,7 @@ RSpec.configure do |config|
end end
Capybara.register_driver :selenium_chrome_headless do |app| Capybara.register_driver :selenium_chrome_headless do |app|
chrome_browser_options.add_argument("--headless") chrome_browser_options.add_argument("--headless=new")
Capybara::Selenium::Driver.new(app, browser: :chrome, options: chrome_browser_options) Capybara::Selenium::Driver.new(app, browser: :chrome, options: chrome_browser_options)
end end
@ -319,7 +319,7 @@ RSpec.configure do |config|
end end
Capybara.register_driver :selenium_mobile_chrome_headless do |app| Capybara.register_driver :selenium_mobile_chrome_headless do |app|
mobile_chrome_browser_options.add_argument("--headless") mobile_chrome_browser_options.add_argument("--headless=new")
Capybara::Selenium::Driver.new(app, browser: :chrome, options: mobile_chrome_browser_options) Capybara::Selenium::Driver.new(app, browser: :chrome, options: mobile_chrome_browser_options)
end end

View File

@ -37,7 +37,7 @@ async function runAllTests() {
const options = { const options = {
chromeFlags: [ chromeFlags: [
"--disable-gpu", "--disable-gpu",
"--headless", "--headless=new",
"--no-sandbox", "--no-sandbox",
"--disable-dev-shm-usage", "--disable-dev-shm-usage",
"--mute-audio", "--mute-audio",