Skip to content

Commit

Permalink
Merge pull request #293 from jlipps/master
Browse files Browse the repository at this point in the history
misc fixes
  • Loading branch information
admc committed Mar 20, 2013
2 parents 21bf661 + f887ded commit 29c959d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/appium.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Appium.prototype.stop = function(cb) {

Appium.prototype.reset = function(cb) {
logger.info("Resetting app mid-session");
if (!this.fastReset) {
if (this.isIos() || !this.fastReset) {
var me = this
, oldId = this.sessionId;

Expand All @@ -390,7 +390,7 @@ Appium.prototype.reset = function(cb) {
});
});
} else { // fast reset
logger.info("Fast reset");
logger.info("Android fast reset");
this.device.fastReset(function(err){
if (err) {
cb(null, {status: status.codes.UnknownError.code, value: null});
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ module.exports.buildTests = function(webviewType) {
element.getSize(function(err, size) {
// we might be in landscape or portrait mode, iphone / ipad
[304, 464, 964].should.include(size.width);
size.height.should.eql(20);
[20, 30].should.include(size.height);
done();
});
});
Expand Down
12 changes: 9 additions & 3 deletions uiautomator/adb.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,14 +767,20 @@ ADB.prototype.installApp = function(cb) {
function(cb) {
if (installApp) {
me.debug("Installing app apk");
me.installApk(me.apkPath, function(err) { if (err) return cb(err); return cb(null); });
me.installApk(me.apkPath, function(err) {
if (err) return cb(err);
return cb(null);
});
} else { cb(null); }
},
function(cb) {
// App is already installed so reset it.
if (!installApp) {
me.runFastReset(function(err) { if (err) return cb(err); return cb(null); });
}
me.runFastReset(function(err) {
if (err) return cb(err);
return cb(null);
});
} else { cb(null); }
},
function(cb) {
if (installClean) {
Expand Down

0 comments on commit 29c959d

Please sign in to comment.