derby-webdriverio
Advanced tools
Comparing version 3.1.0 to 3.2.0
// Generated by CoffeeScript 1.10.0 | ||
(function() { | ||
var Bluebird; | ||
var Bluebird, natural, nounInflector; | ||
Bluebird = require('bluebird'); | ||
natural = require('natural'); | ||
nounInflector = new natural.NounInflector(); | ||
module.exports = function(webdriverConf, customAfter) { | ||
@@ -11,3 +15,16 @@ return function(failures, pid) { | ||
return Bluebird.mapSeries(Object.keys(webdriverConf.browsers), function(groupName) { | ||
return global[groupName].end(); | ||
var amount, j, results, singularName; | ||
amount = webdriverConf.browsers[groupName]; | ||
if (amount === 1 || amount === true) { | ||
return global[groupName].end(); | ||
} else { | ||
singularName = nounInflector.singularize(groupName); | ||
return Bluebird.mapSeries((function() { | ||
results = []; | ||
for (var j = 0; 0 <= amount ? j < amount : j > amount; 0 <= amount ? j++ : j--){ results.push(j); } | ||
return results; | ||
}).apply(this), function(i) { | ||
return global[groupName].select(singularName + i).end(); | ||
}); | ||
} | ||
}); | ||
@@ -14,0 +31,0 @@ }).then(function() { |
@@ -102,3 +102,16 @@ // Generated by CoffeeScript 1.10.0 | ||
return Bluebird.mapSeries(Object.keys(webdriverConf.browsers), function(groupName) { | ||
return global[groupName].init().timeoutsAsyncScript(webdriverConf.waitforTimeout); | ||
var amount, j, results, singularName; | ||
amount = webdriverConf.browsers[groupName]; | ||
if (amount === 1 || amount === true) { | ||
return global[groupName].init().timeoutsAsyncScript(webdriverConf.waitforTimeout); | ||
} else { | ||
singularName = nounInflector.singularize(groupName); | ||
return Bluebird.mapSeries((function() { | ||
results = []; | ||
for (var j = 0; 0 <= amount ? j < amount : j > amount; 0 <= amount ? j++ : j--){ results.push(j); } | ||
return results; | ||
}).apply(this), function(i) { | ||
return global[groupName].select(singularName + i).init().timeoutsAsyncScript(webdriverConf.waitforTimeout); | ||
}); | ||
} | ||
}); | ||
@@ -105,0 +118,0 @@ }); |
{ | ||
"name": "derby-webdriverio", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "Webdriver.io for Derby.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35566
513