[fix:test] Use promise chain instead of chain (is deprecated) (#3419)
Fix warning when running tests: "chain api has been deprecated, use promise chain instead."pull/3420/head
parent
ad898b701a
commit
7729e5a1a9
|
@ -12,14 +12,13 @@ var config = {
|
|||
var allTestsPassed = true;
|
||||
|
||||
var sauceTestWorker = async.queue(function (testSettings, callback) {
|
||||
var browser = wd.remote(config.host, config.port, config.username, config.accessKey);
|
||||
var browserChain = browser.chain();
|
||||
var browser = wd.promiseChainRemote(config.host, config.port, config.username, config.accessKey);
|
||||
var name = process.env.GIT_HASH + " - " + testSettings.browserName + " " + testSettings.version + ", " + testSettings.platform;
|
||||
testSettings.name = name;
|
||||
testSettings["public"] = true;
|
||||
testSettings["build"] = process.env.GIT_HASH;
|
||||
|
||||
browserChain.init(testSettings).get("http://localhost:9001/tests/frontend/", function(){
|
||||
browser.init(testSettings).get("http://localhost:9001/tests/frontend/", function(){
|
||||
var url = "https://saucelabs.com/jobs/" + browser.sessionID;
|
||||
console.log("Remote sauce test '" + name + "' started! " + url);
|
||||
|
||||
|
@ -28,7 +27,7 @@ var sauceTestWorker = async.queue(function (testSettings, callback) {
|
|||
getStatusInterval && clearInterval(getStatusInterval);
|
||||
clearTimeout(timeout);
|
||||
|
||||
browserChain.quit();
|
||||
browser.quit();
|
||||
|
||||
if(!success){
|
||||
allTestsPassed = false;
|
||||
|
@ -53,7 +52,7 @@ var sauceTestWorker = async.queue(function (testSettings, callback) {
|
|||
|
||||
var knownConsoleText = "";
|
||||
var getStatusInterval = setInterval(function(){
|
||||
browserChain.eval("$('#console').text()", function(err, consoleText){
|
||||
browser.eval("$('#console').text()", function(err, consoleText){
|
||||
if(!consoleText || err){
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue