Skip to content

Commit

Permalink
Queue webdriver tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasvh committed May 18, 2014
1 parent ce1c4c8 commit 73a3449
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/selenium.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@
}

function runWebDriver(cases) {
var availableBrowsers = new Bacon.Bus();
var browsers = [
{
browserName: "chrome",
Expand Down Expand Up @@ -228,10 +229,16 @@
version: "34"
}
];
return Bacon.combineTemplate({
capabilities: Bacon.sequentially(1000, browsers),
var result = Bacon.combineTemplate({
capabilities: Bacon.fromArray(browsers).zip(availableBrowsers.take(browsers.length), function(first) { return first; }),
cases: cases
}).flatMap(webdriverStream);
}).flatMap(webdriverStream).doAction(function() {
availableBrowsers.push("ready");
});

Bacon.fromArray([1, 2, 3, 4]).onValue(availableBrowsers.push);

return result.fold([], pushToArray);
}

exports.tests = function() {
Expand Down

0 comments on commit 73a3449

Please sign in to comment.