diff --git a/package.json b/package.json index c055c6834..377a8b826 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "dependencies": { "adm-zip": "~0.4.4", - "appium-adb": "~1.3.15", + "appium-adb": "~1.3.16", "appium-atoms": "~0.0.5", "appium-instruments": "~1.4.5", "appium-uiauto": "~1.7.7", diff --git a/submodules/appium-adb b/submodules/appium-adb index 556c4809f..ee34de466 160000 --- a/submodules/appium-adb +++ b/submodules/appium-adb @@ -1 +1 @@ -Subproject commit 556c4809f737138a2cf5eca1a1118d2eda54c51a +Subproject commit ee34de4660e2e85d03f73941043e7982c89f9b5c diff --git a/test/functional/android/apidemos/basic-specs.js b/test/functional/android/apidemos/basic-specs.js index 269acc731..c76b0644b 100644 --- a/test/functional/android/apidemos/basic-specs.js +++ b/test/functional/android/apidemos/basic-specs.js @@ -11,6 +11,7 @@ var env = require('../../../helpers/env') , chai = require('chai') , should = chai.should() , spawn = require('child_process').spawn + , appPathBase = require('../app-path-base.js') , _ = require('underscore') , ChaiAsserter = require('../../../helpers/asserter.js').ChaiAsserter , getAppPath = require('../../../helpers/app').getAppPath @@ -220,6 +221,8 @@ describe("apidemo - basic @skip-ci", function () { }).nodeify(done); }); }); + + describe('app path with spaces', _.partial(appPathBase.spacesTest, desired)); }); describe('pre-existing uiautomator session', function () { diff --git a/test/functional/android/app-path-base.js b/test/functional/android/app-path-base.js new file mode 100644 index 000000000..f36f42ebd --- /dev/null +++ b/test/functional/android/app-path-base.js @@ -0,0 +1,37 @@ +"use strict"; + +var initSession = require('../../helpers/session').initSession + , getTitle = require('../../helpers/title').getTitle + , _ = require('underscore') + , getAppPath = require('../../helpers/app').getAppPath + , tempdir = require('../../../lib/tempdir') + , ncp = require('ncp'); + +require('../../helpers/setup-chai.js'); + +module.exports.spacesTest = function (desired) { + var session; + var title = getTitle(this); + var oldAppPath = getAppPath('ApiDemos'); + var newAppPath = '/tmp/App With Spaces.apk'; + before(function (done) { + tempdir.open({prefix: 'app with spaces', suffix: '.apk'}, function (err, info) { + if (err) return done(err); + console.log("Copying '" + oldAppPath + "' to '" + info.path + "'"); + ncp(oldAppPath, info.path, function (err) { + if (err) return done(err); + newAppPath = info.path; + done(); + }); + }); + }); + + after(function () { return session.tearDown(this.currentTest.state === 'passed'); }); + + it('should work with spaces in app path', function (done) { + session = initSession(_.defaults({'app': newAppPath}, desired)); + return session.setUp(title) + .should.eventually.be.fulfilled + .nodeify(done); + }); +}; diff --git a/test/functional/selendroid/app-path-specs.js b/test/functional/selendroid/app-path-specs.js new file mode 100644 index 000000000..1576d6205 --- /dev/null +++ b/test/functional/selendroid/app-path-specs.js @@ -0,0 +1,7 @@ +"use strict"; + +var _ = require('underscore'), + appPathBase = require("../android/app-path-base.js"), + desired = require('./desired'); + +describe('app path', _.partial(appPathBase.spacesTest, desired));