Commit b5cde6ca authored by Sam Saccone's avatar Sam Saccone

Merge pull request #1366 from samccone/sjs/drop-sauce

 bye sauce hello travis
parents 1106261b 980cf54d
......@@ -8,13 +8,8 @@ node_js:
- '0.12'
notifications:
irc: 'irc.freenode.org#tastejs'
addons:
sauce_connect: true
env:
# add in tokens for sauce labs
global:
- secure: gd7Y1sZyUc4+eck+c4cZ19WdVkmvvfE16fegUMZ9/BMRVYaaEfLZ/805+mOPccAebu5nuGKX0dAjXBwDGcAk2T9YvXpgl8GHu5sAHT3ax0XTibwW7Je2ayf8dJqTO9eRelY616v2mYUlj9QMmbWCB2zESsscY3hi2DQAPeueMdo=
- secure: av1hgfvD9UpQr59Q2qcyC0WmiUvRivJHzdcrwj3uYiIJLxxpXv00EC4PzqMZAVREOaQEK1s9FwFVSYn8FbvtvWp5TnWNvSXUXCSjc+I0MYhxbtvcAuKlDzayHSfp17bt0BY3pxB/1BdwMdPwDYumEULphKOmsLr4ocsJCfng2Ds=
# GH_OAUTH_TOKEN is the oauth token generated as described at
# https://help.github.com/articles/creating-an-oauth-token-for-command-line-use
#
......@@ -29,7 +24,12 @@ env:
- secure: 'fHgfjMpYuliwMr2QLnjYZExIViNrxprf9dhXRBLZ6P9Hz7P6m1BMYrI/xEG8X+fFbCi0+n3AXh8SEMHi9ou/Pty/cx12z4w/z3B2BHMxh4XBwpZHs+AB4IXkLiwwWoP4QFy4vTipgYnMDMq9CRhlRbhZEpenQBmaTEc472By1uM='
- GH_OWNER: tastejs
- GH_PROJECT_NAME: todomvc
- CHROME_PATH: '/home/travis/build/tastejs/todomvc/chrome-linux/chrome'
before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- curl -Lo chrome.zip https://download-chromium.appspot.com/dl/Linux_x64 && unzip chrome.zip
- curl -Lo chromedriver.zip http://chromedriver.storage.googleapis.com/2.16/chromedriver_linux64.zip && unzip chromedriver.zip
before_script:
# install dependencies
- npm install -g gulp
......
......@@ -2,18 +2,5 @@
args="$@"
run_tests ()
{
npm i && \
eval "npm test -- $args"
}
if [ "$TRAVIS_PULL_REQUEST" == "true" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "true" ]
then
run_tests
elif [ "$TRAVIS_PULL_REQUEST" == "true" ] && [ "$TRAVIS_SECURE_ENV_VARS" == "false" ]
then
exit 0
else
run_tests
fi
npm i && \
eval "npm test -- $args"
'use strict';
var webdriver = require('selenium-webdriver');
var chrome = require('selenium-webdriver/chrome');
var test = require('selenium-webdriver/testing');
var Page = require('./page');
var PageLaxMode = require('./pageLaxMode');
......@@ -21,32 +22,20 @@ module.exports.todoMVCTest = function (frameworkName, baseUrl, speedMode, laxMod
}
function launchBrowser() {
var chromeOptions = new chrome.Options();
chromeOptions.addArguments('no-sandbox');
if (process.env.SAUCE_USERNAME !== undefined) {
browser = new webdriver.Builder()
.usingServer(
'http://' +
process.env.SAUCE_USERNAME +
':' +
process.env.SAUCE_ACCESS_KEY +
'@ondemand.saucelabs.com:80/wd/hub'
)
.withCapabilities({
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
build: process.env.TRAVIS_BUILD_NUMBER,
browserName: browserName,
username: process.env.SAUCE_USERNAME,
accessKey: process.env.SAUCE_ACCESS_KEY
})
.build();
} else {
browser = new webdriver.Builder()
.withCapabilities({
browserName: browserName
})
.build();
if (process.env.CHROME_PATH !== undefined) {
chromeOptions.setChromeBinaryPath(process.env.CHROME_PATH);
}
browser = new webdriver.Builder()
.withCapabilities({
browserName: browserName
})
.setChromeOptions(chromeOptions)
.build();
browser.get(baseUrl);
page = laxMode ? new PageLaxMode(browser) : new Page(browser);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment