From 70227a4005c69a9a87390a0abdc4cf83fa0da0a5 Mon Sep 17 00:00:00 2001 From: sebv Date: Wed, 21 May 2014 13:04:55 +0800 Subject: [PATCH 1/2] fixing tests --- test/functional/common/webview/cookies-base.js | 2 +- test/functional/ios/uicatalog/move-specs.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/functional/common/webview/cookies-base.js b/test/functional/common/webview/cookies-base.js index ed2196546..d186f85c9 100644 --- a/test/functional/common/webview/cookies-base.js +++ b/test/functional/common/webview/cookies-base.js @@ -23,7 +23,7 @@ module.exports = function (desired) { }); describe('within webview', function () { function _ignoreEncodingBug(value) { - if (isChrome) { + if (isChrome(desired)) { console.warn('Going round android bug: whitespace in cookies.'); return encodeURI(value); } else return value; diff --git a/test/functional/ios/uicatalog/move-specs.js b/test/functional/ios/uicatalog/move-specs.js index 76b8c5c6e..12c406b76 100644 --- a/test/functional/ios/uicatalog/move-specs.js +++ b/test/functional/ios/uicatalog/move-specs.js @@ -11,9 +11,9 @@ describe('uicatalog - move', function () { it('should be able to click on arbitrary x-y elements', function (done) { driver - .elementByClassName('UIATableCell').moveTo(10, 10).click() - .elementByXPath("//UIAButton[@name='Rounded']") - .should.eventually.exist + .elementByXPath("//UIAStaticText[contains(@name, 'Buttons')]").moveTo(10, 10).click() + .elementByXPath("//UIAElement['SYSTEM (CONTACT ADD)']") + .should.eventually.exist .should.eventually.exist .nodeify(done); }); }); From 191963a485fcde549e26425d0cf8fc48cef21eed Mon Sep 17 00:00:00 2001 From: sebv Date: Wed, 21 May 2014 15:42:05 +0800 Subject: [PATCH 2/2] mitigating against redundant/late session closing --- lib/appium.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/appium.js b/lib/appium.js index 55ca2c295..462ad7484 100644 --- a/lib/appium.js +++ b/lib/appium.js @@ -290,7 +290,7 @@ Appium.prototype.invoke = function (cb) { cb(null, this.device); }.bind(this); - this.device.start(onStart, this.cleanupSession.bind(this)); + this.device.start(onStart, _.once(this.cleanupSession.bind(this))); } };