#   Copyright (c) 2010-2011, Diaspora Inc.  This file is
#   licensed under the Affero General Public License version 3 or later.  See
#   the COPYRIGHT file.

common: &common
  # Try to kill mongrel after suite if tmp/pids/mongrel_selenium.pid exists
  # kill_mongrel_after_suite: true

local: &local
  <<: *common
  test_framework: webrat
  selenium_server_address: "127.0.0.1"
  selenium_server_port: "4444"
  selenium_browser_key: "*chrome /usr/bin/firefox"
  application_address: "127.0.0.1"
  application_port: "4000"

local_jsunit:
  <<: *local
  application_port: "8080"

# Possible Sauce Labs configurations as of 2009/11/19
# From: http://saucelabs.com/products/docs/sauce-ondemand/browsers
#
# saucelabs_browser_os  saucelabs_browser   saucelabs_browser_version (pick one)
#
# "Windows 2003"        "iexplore"          "6.", "7.", "8."
#                       "firefox"           "2.", "3.0", "3.5"
#                       "safari"            "3.", "4."
#                       "opera"             "9."
#                       "googlechrome"      ""
# "Linux"               "firefox"           "3."
saucelabs: &saucelabs
  <<: *common
  test_framework: webrat
  # URL of Selenium RC server:
  selenium_server_address: "saucelabs.com"
  selenium_server_port: "4444"
  # Saucelabs credentials / Browser to drive
  saucelabs_username: "YOUR-SAUCELABS-USERNAME"
  saucelabs_access_key: "YOUR-SAUCELABS-ACCESS-KEY"
  saucelabs_browser_os: "Linux"
  saucelabs_browser: "firefox"
  saucelabs_browser_version: "3."
  saucelabs_max_duration_seconds: 1800
  # Selenium RC browser connects to and tests the app at this URL:
  application_address: "testhost.com" # this will be ovewritten if tunnel_method == :saucetunnel
  application_port: 80
  # App host can actually be a tunnel that tunnels from <application_address>:<application_port> to localhost:<tunnel_to_localhost_port>
  # There are 3 kinds of tunnels:
  #
  # tunnel_method: :saucetunnel
  # tunnel_to_localhost_port: 4000 # Warning: application_port and tunnel_to_localhost_port must be identical if you are using Webrat
  # tunnel_startup_timeout: 240
  #
  # tunnel_method: :sshtunnel
  # application_address: proxy.mycompany.com
  # application_port: 12345 # or can be a range XXXX-YYYY
  # tunnel_to_localhost_port: 4000 # Warning: application_port and tunnel_to_localhost_port must be identical if you are using Webrat
  # tunnel_username: fred
  # tunnel_keyfile: "/Users/<%= ENV['USER'] %>/.ssh/id_rsa"  # or tunnel_password: "password"
  #
  # tunnel_method: :othertunnel        You're managing your tunnel independently

saucelabs_jsunit: &saucelabs_jsunit
  <<: *saucelabs
  # We are using the Jetty server for Saucelabs JsUnit selenium testing.
  localhost_app_server_port: "8080"

saucelabs_jsunit_firefox:
  <<: *saucelabs_jsunit

saucelabs_jsunit_ie:
  <<: *saucelabs_jsunit
  saucelabs_browser_os: "Windows 2003"
  saucelabs_browser: "iexplore"
  saucelabs_browser_version: "7."
  jsunit_polling_interval_seconds: 300

saucelabs_jsunit_safari:
  <<: *saucelabs_jsunit
  saucelabs_browser_os: "Windows 2003"
  saucelabs_browser: "safari"
  saucelabs_browser_version: "4."

saucelabs_jsunit_chrome:
  <<: *saucelabs_jsunit
  saucelabs_browser_os: "Windows 2003"
  saucelabs_browser: "googlechrome"
  saucelabs_browser_version: ""
