_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 bind_browser_environment_variables(run_in_docker, browser, test_configuration)
    chromium_devices = File.read('_tests/e2e/config/chromium_devices.json')
    available_mobile_devices = JSON.parse(chromium_devices)
    remote_browsers = File.read('_tests/e2e/config/remote_browsers.json')
    if available_mobile_devices.include?(browser)
      test_configuration[:docker_node] = 'chrome' if run_in_docker
      bind_environment_variable('RHD_JS_DRIVER', available_mobile_devices[browser]['device']['name'])
    elsif remote_browsers.include?(browser)
      test_configuration[:docker_node] = 'chrome' if run_in_docker
      bind_environment_variable('RHD_JS_DRIVER', browser)
    else
      test_configuration[:docker_node] = browser if run_in_docker
      bind_environment_variable('RHD_JS_DRIVER', browser)
    end
  end
def bind_browser_environment_variables ( run_in_docker , browser , test_configuration ) chromium_devices = File . read ( '_tests/e2e/config/chromium_devices.json' ) available_mobile_devices = JSON . parse ( chromium_devices ) remote_browsers = File . read ( '_tests/e2e/config/remote_browsers.json' ) if available_mobile_devices . include? ( browser ) test_configuration [ :docker_node ] = 'chrome' if run_in_docker bind_environment_variable ( 'RHD_JS_DRIVER' , available_mobile_devices [ browser ] [ 'device' ] [ 'name' ] ) elsif remote_browsers . include? ( browser ) test_configuration [ :docker_node ] = 'chrome' if run_in_docker bind_environment_variable ( 'RHD_JS_DRIVER' , browser ) else test_configuration [ :docker_node ] = browser if run_in_docker bind_environment_variable ( 'RHD_JS_DRIVER' , 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
# return mobile device name, for example iPhone 6 # set browser environment variable, and docker node to chrome
run_in_docker
<not_specific>
browser
<not_specific>
test_configuration
<not_specific>