From d716210509e927d29ec19361d11efa57dfcec32d Mon Sep 17 00:00:00 2001 From: Niklas von Hertzen Date: Sun, 18 May 2014 21:17:59 +0300 Subject: [PATCH] Update travis webdriver settings --- tests/selenium.js | 2 +- tests/test.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/selenium.js b/tests/selenium.js index 365b6b2..dd148fe 100644 --- a/tests/selenium.js +++ b/tests/selenium.js @@ -126,7 +126,7 @@ var browser = wd.remote("localhost", 4445, process.env.SAUCE_USERNAME, process.env.SAUCE_ACCESS_KEY); var browserStream = new Bacon.Bus(); test.capabilities["tunnel-identifier"] = process.env.TRAVIS_JOB_NUMBER; - test.capabilities["name"] = process.env.TRAVIS_BUILD_NUMBER; + test.capabilities["name"] = process.env.TRAVIS_COMMIT + " #" + process.env.TRAVIS_BUILD_NUMBER; var resultStream = Bacon.fromNodeCallback(browser, "init", test.capabilities) .flatMap(Bacon.fromNodeCallback(browser, "setImplicitWaitTimeout", 15000) diff --git a/tests/test.js b/tests/test.js index 0a09a33..c7be748 100644 --- a/tests/test.js +++ b/tests/test.js @@ -13,9 +13,14 @@ var h2cSelector, h2cOptions; document.write(srcStart + '/tests/assets/jquery.plugin.html2canvas.js' + scrEnd); var html2canvas = ['log', 'nodecontainer', 'stackingcontext', 'textcontainer', 'support', 'imagecontainer', 'dummyimagecontainer', 'proxyimagecontainer', 'gradientcontainer', 'lineargradientcontainer', 'webkitgradientcontainer', 'imageloader', 'nodeparser', 'font', 'fontmetrics', 'core', 'renderer', 'promise', 'renderers/canvas'], i; - for (i = 0; i < html2canvas.length; ++i) { - document.write(srcStart + '/src/' + html2canvas[i] + '.js?' + Math.random() + scrEnd); + if (window.location.search === "?selenium") { + document.write(srcStart + '/build/html2canvas.js' + scrEnd); + } else { + for (i = 0; i < html2canvas.length; ++i) { + document.write(srcStart + '/src/' + html2canvas[i] + '.js?' + Math.random() + scrEnd); + } } + window.onload = function() { h2cSelector = [document.documentElement];