Fixed broken unit tests related to having page_source return all windows (not just the main window).

This commit is contained in:
Henry Stratmann
2013-06-12 13:58:32 -05:00
parent c033542a9a
commit 73e64bcf81
2 changed files with 11 additions and 6 deletions

View File

@@ -92,9 +92,10 @@ describeWd('calc app', function(h) {
it('should return app source', function(done){
h.driver.source(function(err, source) {
var obj = JSON.parse(source);
assert.equal(obj.type, "UIAWindow");
assert.equal(obj.children[0].label, "TextField1");
assert.equal(obj.children[3].name, "SumLabel");
assert.equal(obj.type, "UIAApplication");
assert.equal(obj.children[0].type, "UIAWindow");
assert.equal(obj.children[0].children[0].label, "TextField1");
assert.equal(obj.children[0].children[3].name, "SumLabel");
done();
});
});

View File

@@ -11,10 +11,14 @@ describeWd('get source', function(h) {
var obj = JSON.parse(source);
should.not.exist(err);
should.ok(obj);
obj.children[2].name.should.equal("ComputeSumButton");
obj.children[3].rect.origin.x.should.equal(129);
should.ok(obj.children[4].visible);
obj.type.should.equal("UIAApplication");
obj.children[0].type.should.equal("UIAWindow");
obj.children[0].children[2].name.should.equal("ComputeSumButton");
obj.children[0].children[3].rect.origin.x.should.equal(129);
should.ok(obj.children[0].children[4].visible);
done();
});
});
});