fix selendroid/android spaces-in-app-path bugs

by upgrading adb
fix #3461
This commit is contained in:
Jonathan Lipps
2014-09-15 16:26:24 -07:00
parent 08e4b8e407
commit a3873bb7c6
5 changed files with 49 additions and 2 deletions
+1 -1
View File
@@ -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",
@@ -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 () {
+37
View File
@@ -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);
});
};
@@ -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));