_tests/lib/e2e_test_options.rb
#
# Checks that the user has supplied us with a valid supported browser
#
Checks that the user has supplied us with a valid supported browser
Checks that the user has supplied us with a valid supported browser
def check_supported_browser(browser)
    return if supported_browsers.include?(browser)
    if browser.include?('bs_')
      browserstack_browsers = '_tests/e2e/config/remote_browsers.json'
      json = File.read(browserstack_browsers)
      config = JSON.parse(json)
      Kernel.abort("Invalid remote browser specified! Browser '#{browser}' \n See available browserstack options here: '#{browserstack_browsers}' \n Set desired stack using --browser=bs_ie_11") unless config.include?(browser)
    else
      driver_config_file = '_tests/e2e/config/chromium_devices.json'
      json = File.read(driver_config_file)
      config = JSON.parse(json)
      Kernel.abort("Invalid device specified! Device '#{browser}' was not found. \nSee available test devices here: '#{driver_config_file}'") unless config.include?(browser)
    end
  end
def check_supported_browser ( browser ) return if supported_browsers . include? ( browser ) if browser . include? ( 'bs_' ) browserstack_browsers = '_tests/e2e/config/remote_browsers.json' json = File . read ( browserstack_browsers ) config = JSON . parse ( json ) Kernel . abort ( "Invalid remote browser specified! Browser '#{browser}' \n See available browserstack options here: '#{browserstack_browsers}' \n Set desired stack using --browser=bs_ie_11" ) unless config . include? ( browser ) else driver_config_file = '_tests/e2e/config/chromium_devices.json' json = File . read ( driver_config_file ) config = JSON . parse ( json ) Kernel . abort ( "Invalid device specified! Device '#{browser}' was not found. \nSee available test devices here: '#{driver_config_file}'" ) unless config . include? ( browser ) end end
Checks that the user has supplied us with a valid supported browser
Checks that the user has supplied us with a valid supported browser
# Check that the device being used for emulation is supported by chrome
browser
<not_specific>