|
@@ -120,11 +120,13 @@ class RunSauceLabs {
|
|
|
console.log('${caps.browserName} ${caps.version} on ${caps.platform}:');
|
|
|
browser.init(caps, function(err) {
|
|
|
if (!handleError(err)) return;
|
|
|
- browser.setAsyncScriptTimeout(30000); //30s timeout
|
|
|
+ browser.setAsyncScriptTimeout(10000); //10s timeout
|
|
|
browser.get("http://localhost:2000/unit-js.html", function(err) {
|
|
|
if (!handleError(err)) return;
|
|
|
|
|
|
- browser.waitForConditionInBrowser("try { typeof unit.Test.success === 'boolean'; } catch(e) { false; }", 30000); //30s timeout
|
|
|
+ console.log("[debug] waiting for test exit");
|
|
|
+ browser.waitForConditionInBrowser("try { typeof unit.Test.success === 'boolean'; } catch(e) { false; }", 3000); //3s timeout
|
|
|
+ console.log("[debug] test exited");
|
|
|
|
|
|
browser.text("body", function(err, re) {
|
|
|
if (!handleError(err)) return;
|
|
@@ -139,14 +141,14 @@ class RunSauceLabs {
|
|
|
}
|
|
|
}
|
|
|
success = success && test;
|
|
|
- console.log("[debug] success: " + success);
|
|
|
+ console.log("[debug] all SauceLabs tests success: " + success);
|
|
|
|
|
|
//let saucelabs knows the result
|
|
|
browser.sauceJobUpdate({ passed: test }, function(err) {
|
|
|
- console.log("[debug] job update: " + err);
|
|
|
+ console.log("[debug] job update: " + (err == null ? "ok" : err));
|
|
|
if (!handleError(err)) return;
|
|
|
browser.quit(function(err) {
|
|
|
- console.log("[debug] browser quit: " + err);
|
|
|
+ console.log("[debug] browser quit: " + (err == null ? "ok" : err));
|
|
|
if (!handleError(err)) return;
|
|
|
testBrowsers(browsers);
|
|
|
});
|