Run specs on multiple browsers
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
# - "sh -e /etc/init.d/xvfb start"
|
||||
before_install:
|
||||
- "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"
|
||||
|
||||
rvm:
|
||||
@@ -11,5 +12,4 @@ rvm:
|
||||
env:
|
||||
- JASMINE_BROWSER=firefox
|
||||
- JASMINE_BROWSER=chrome
|
||||
- JASMINE_BROWSER=safari
|
||||
- JASMINE_BROWSER=phantomjs
|
||||
|
||||
@@ -5,7 +5,7 @@ require 'jasmine'
|
||||
Jasmine.load_configuration_from_yaml(File.join(Dir.pwd, 'spec', 'jasmine.yml'))
|
||||
config = Jasmine.config
|
||||
Jasmine.configure do |config|
|
||||
config.browser = ENV.fetch('JASMINE_BROWSER', 'firefox')
|
||||
config.browser = ENV['JASMINE_BROWSER'] || 'firefox'
|
||||
end
|
||||
server = Jasmine::Server.new(config.port, Jasmine::Application.app(config))
|
||||
driver = Jasmine::SeleniumDriver.new(config.browser, "#{config.host}:#{config.port}/")
|
||||
|
||||
7
travis-chromium-script.sh
Normal file
7
travis-chromium-script.sh
Normal file
@@ -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