mirror of
https://github.com/appium/appium.git
synced 2026-01-28 05:09:10 -06:00
Fixed broken unit tests related to having page_source return all windows (not just the main window).
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user