Tobias Gritschacher has submitted this change and it was merged.

Change subject: Run cucumber tests in different OS/browser combinations
......................................................................


Run cucumber tests in different OS/browser combinations

Change-Id: I3e0ee463f4b67cde3488fe78df48725f7e1a7211
---
A selenium_cuc/config/browsers.yml
M selenium_cuc/features/support/env.rb
2 files changed, 84 insertions(+), 3 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/selenium_cuc/config/browsers.yml b/selenium_cuc/config/browsers.yml
new file mode 100644
index 0000000..6e2eea0
--- /dev/null
+++ b/selenium_cuc/config/browsers.yml
@@ -0,0 +1,74 @@
+chrome_linux:
+  name: chrome
+  platform: Linux
+  version:
+
+chrome_win:
+  name: chrome
+  platform: Windows 7
+  version:
+
+chrome_mac:
+  name: chrome
+  platform: OS X 10.8
+  version:
+
+firefox_linux:
+  name: firefox
+  platform: Linux
+  version: 23
+
+firefox_win:
+  name: firefox
+  platform: Windows 7
+  version: 23
+
+firefox_mac:
+  name: firefox
+  platform: OS X 10.6
+  version: 21
+
+safari_5:
+  name: safari
+  platform: OS X 10.6
+  version: 5
+
+safari_6:
+  name: safari
+  platform: OS X 10.8
+  version: 6
+
+ie_6:
+  name: internet_explorer
+  platform: Windows XP
+  version: 6
+
+ie_7:
+  name: internet_explorer
+  platform: Windows XP
+  version: 7
+
+ie_8:
+  name: internet_explorer
+  platform: Windows 7
+  version: 8
+
+ie_9:
+  name: internet_explorer
+  platform: Windows 7
+  version: 9
+
+ie_10:
+  name: internet_explorer
+  platform: Windows 8
+  version: 10
+
+opera_linux:
+  name: opera
+  platform: Linux
+  version: 12
+
+opera_win:
+  name: opera
+  platform: Windows 7
+  version: 12
\ No newline at end of file
diff --git a/selenium_cuc/features/support/env.rb 
b/selenium_cuc/features/support/env.rb
index 2e4b2a5..4155059 100644
--- a/selenium_cuc/features/support/env.rb
+++ b/selenium_cuc/features/support/env.rb
@@ -46,9 +46,16 @@
 end
 
 def sauce_browser(test_name)
-  caps = Selenium::WebDriver::Remote::Capabilities.firefox
-  caps.version = "23"
-  caps.platform = "Windows 7"
+  browsers = YAML.load_file('config/browsers.yml')
+  if ENV['BROWSER_LABEL']
+    browser_label = browsers[ENV['BROWSER_LABEL']]
+  else
+    browser_label = browsers['firefox_linux']
+  end
+
+  caps = Selenium::WebDriver::Remote::Capabilities.send(browser_label['name'])
+  caps.platform = browser_label['platform']
+  caps.version = browser_label['version']
   caps[:name] = "#{test_name} #{ENV['JOB_NAME']}##{ENV['BUILD_NUMBER']}"
 
   require 'selenium/webdriver/remote/http/persistent' # http_client

-- 
To view, visit https://gerrit.wikimedia.org/r/81010
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e0ee463f4b67cde3488fe78df48725f7e1a7211
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: Tobias Gritschacher <tobias.gritschac...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to