mirror of
https://github.com/appium/appium.git
synced 2026-02-09 03:09:02 -06:00
Merge pull request #3403 from moizjv/samplecode-update
Updating sample-code and adding test for selendroid contactmanager test
This commit is contained in:
Submodule submodules/sample-code updated: 54281146b1...ded951dd19
@@ -5,14 +5,15 @@ require('../../helpers/setup-chai');
|
||||
var env = require('../../helpers/env')
|
||||
, initSession = require('../../helpers/session').initSession
|
||||
, _ = require('underscore')
|
||||
, desired = require('./desired');
|
||||
, desired = require('./desired')
|
||||
, path = require('path');
|
||||
|
||||
describe('should not launch app without internet permission', function () {
|
||||
this.timeout(env.MOCHA_INIT_TIMEOUT);
|
||||
var session;
|
||||
var name = this.title;
|
||||
it('should not launch app', function (done) {
|
||||
var newDesired = _.defaults({'app': 'sample-code/apps/ContactManager/ContactManager.apk'}, desired);
|
||||
it('should not launch ContactManager app', function (done) {
|
||||
var newDesired = _.defaults({'app': path.resolve(__dirname, '..', '..', '..', 'sample-code', 'apps', 'ContactManager', 'ContactManager.apk')}, desired);
|
||||
afterEach(function (done) {
|
||||
session
|
||||
.tearDown(this.currentTest.state === 'failed')
|
||||
@@ -27,3 +28,21 @@ describe('should not launch app without internet permission', function () {
|
||||
.nodeify(done);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
describe('should launch app with internet permission', function () {
|
||||
this.timeout(env.MOCHA_INIT_TIMEOUT);
|
||||
var session = null
|
||||
, name = this.title;
|
||||
afterEach(function (done) {
|
||||
session
|
||||
.tearDown(this.currentTest.state === 'passed')
|
||||
.nodeify(done);
|
||||
});
|
||||
it('should launch ContactManager-selendroid app', function (done) {
|
||||
var newDesired = _.defaults({'app': path.resolve(__dirname, '..', '..', '..', 'sample-code', 'apps', 'ContactManager', 'ContactManager-selendroid.apk')}, desired);
|
||||
session = initSession(newDesired);
|
||||
session.setUp(name)
|
||||
.nodeify(done);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user