testarmada-nightwatch-extra
Advanced tools
Comparing version 1.2.0-beta1 to 1.2.0-beta2
@@ -29,2 +29,3 @@ var util = require("util"); | ||
// Keep a running count of how many times we've seen this element visible | ||
console.log(result) | ||
if (result.isVisible) { | ||
@@ -31,0 +32,0 @@ self.seenCount += 1; |
@@ -24,2 +24,3 @@ var fs = require("fs"); | ||
seens: 0, | ||
jsDuration: 0, | ||
isVisibleStrict: null, | ||
@@ -34,2 +35,3 @@ isVisible: false, | ||
}; | ||
var startTime = (new Date()).getTime(); | ||
@@ -61,2 +63,7 @@ var sizzleRef; | ||
var calculateElapseAndReturn = function () { | ||
var elapsed = (new Date()).getTime() - startTime; | ||
result.jsDuration = elapsed; | ||
done(result); | ||
} | ||
@@ -84,3 +91,3 @@ var count = function () { | ||
result.value.value = (new Function("$el", "sizzle", pInjectedJsCommand))($el, sizzleRef); | ||
done(result); | ||
calculateElapseAndReturn(); | ||
} else { | ||
@@ -90,6 +97,6 @@ setTimeout(count, waitInterval); | ||
} else { | ||
done(result); | ||
calculateElapseAndReturn(); | ||
} | ||
} catch (e) { | ||
done(result); | ||
calculateElapseAndReturn(); | ||
} | ||
@@ -96,0 +103,0 @@ }; |
{ | ||
"name": "testarmada-nightwatch-extra", | ||
"version": "1.2.0-beta1", | ||
"version": "1.2.0-beta2", | ||
"description": "extra useful nightwatch command and assertion", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
93536
40
1793