From cd01a5a01425874d098276bebb33b31ed47e780f Mon Sep 17 00:00:00 2001 From: Jonathan Lipps Date: Thu, 5 Sep 2013 14:44:39 -0700 Subject: [PATCH] fix tests for use of api level 18 emulator --- test/functional/apidemos/findElement.js | 10 +--------- test/functional/apidemos/source.js | 4 ++-- test/functional/selendroid/web_view.js | 7 +++++++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/test/functional/apidemos/findElement.js b/test/functional/apidemos/findElement.js index 27b8db2eb..88d3c3ea5 100644 --- a/test/functional/apidemos/findElement.js +++ b/test/functional/apidemos/findElement.js @@ -132,7 +132,7 @@ describeWd('find element(s)', function(h) { it('should find multiple elements by resource-id', function(done) { h.driver.elementsById('android:id/text1', function(err, els) { should.not.exist(err); - els.length.should.equal(11); + els.length.should.equal(10); done(); }); }); @@ -261,11 +261,3 @@ describeWd('unallowed tag names', function(h) { }); }); -describeWd('mobile xmlKeyContains', function(h) { - it('should not error on xmlKeyContains', function(done) { - h.driver.execute("mobile: xmlKeyContains", [''], function(err, el) { - should.not.exist(err); - done(); - }); - }); -}); diff --git a/test/functional/apidemos/source.js b/test/functional/apidemos/source.js index 653060260..4b1620461 100644 --- a/test/functional/apidemos/source.js +++ b/test/functional/apidemos/source.js @@ -16,7 +16,7 @@ describeWd('get source', function(h) { should.not.exist(err); should.ok(obj); obj.hierarchy.node['@class'].should.equal("android.widget.FrameLayout"); - obj.hierarchy.node.node.node[0].node['@class'].should.equal("android.view.View"); + obj.hierarchy.node.node.node[0].node['@class'].should.equal("android.widget.FrameLayout"); done(); }); }); @@ -28,7 +28,7 @@ describeWd('get source', function(h) { should.not.exist(err); should.ok(obj); obj.hierarchy.node['@class'].should.equal("android.widget.FrameLayout"); - obj.hierarchy.node.node.node[0].node['@class'].should.equal("android.view.View"); + obj.hierarchy.node.node.node[0].node['@class'].should.equal("android.widget.FrameLayout"); h.driver.execute("mobile: find", [[[[7, "Animation"]]]], function(err, el) { should.not.exist(err); done(); diff --git a/test/functional/selendroid/web_view.js b/test/functional/selendroid/web_view.js index b9fee6a15..fe269aec4 100644 --- a/test/functional/selendroid/web_view.js +++ b/test/functional/selendroid/web_view.js @@ -92,4 +92,11 @@ describeWd('web view', function(h) { done(); }); }); + it('should get web source', function(done) { + h.driver.source(function(err, source) { + should.not.exist(err); + source.should.include("body"); + done(); + }); + }); });