Run specs on multiple browsers
This commit is contained in:
+2
-2
@@ -2,7 +2,8 @@
|
|||||||
# - "sh -e /etc/init.d/xvfb start"
|
# - "sh -e /etc/init.d/xvfb start"
|
||||||
before_install:
|
before_install:
|
||||||
- "export DISPLAY=:99.0"
|
- "export DISPLAY=:99.0"
|
||||||
- "sh -e /etc/init.d/xvfb start"#
|
- "sh -e /etc/init.d/xvfb start"
|
||||||
|
- "sh -e travis-chromium-script.sh"
|
||||||
script: "DISPLAY=:99.0 bundle exec rake core_spec"
|
script: "DISPLAY=:99.0 bundle exec rake core_spec"
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
@@ -11,5 +12,4 @@ rvm:
|
|||||||
env:
|
env:
|
||||||
- JASMINE_BROWSER=firefox
|
- JASMINE_BROWSER=firefox
|
||||||
- JASMINE_BROWSER=chrome
|
- JASMINE_BROWSER=chrome
|
||||||
- JASMINE_BROWSER=safari
|
|
||||||
- JASMINE_BROWSER=phantomjs
|
- JASMINE_BROWSER=phantomjs
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ require 'jasmine'
|
|||||||
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
|
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
|
||||||
config = Jasmine.config
|
config = Jasmine.config
|
||||||
Jasmine.configure do |config|
|
Jasmine.configure do |config|
|
||||||
config.browser = ENV.fetch('JASMINE_BROWSER', 'firefox')
|
config.browser = ENV['JASMINE_BROWSER'] || 'firefox'
|
||||||
end
|
end
|
||||||
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
|
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
|
||||||
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")
|
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install chromium-browser
|
||||||
|
wget https://chromedriver.googlecode.com/files/chromedriver_linux64_2.1.zip
|
||||||
|
unzip chromedriver_linux64_2.1.zip
|
||||||
|
sudo mv chromedriver /usr/local/bin/
|
||||||
Reference in New Issue
Block a user