зеркало из https://github.com/microsoft/appium.git
add real-device flag for ios test script
This commit is contained in:
Родитель
cc173a9cfa
Коммит
62aed52387
15
bin/test.sh
15
bin/test.sh
|
@ -72,10 +72,19 @@ run_ios_tests() {
|
|||
echo "RUNNING IOS $1 TESTS"
|
||||
echo "---------------------"
|
||||
|
||||
tag_regex=$3
|
||||
if $real_device; then
|
||||
tag_regex="$3|@skip-real-device"
|
||||
fi
|
||||
|
||||
DEVICE=$2 time $appium_mocha -g $3 -i \
|
||||
test/functional/common \
|
||||
test/functional/ios
|
||||
if $real_device; then
|
||||
DEVICE=$2 REAL_DEVICE=true time $appium_mocha -g $tag_regex -i \
|
||||
test/functional/ios
|
||||
else
|
||||
DEVICE=$2 time $appium_mocha -g $3 -i \
|
||||
test/functional/common \
|
||||
test/functional/ios
|
||||
fi
|
||||
}
|
||||
|
||||
if $ios6_only || $ios_only || $all_tests; then
|
||||
|
|
|
@ -1587,8 +1587,11 @@ IOS.prototype.useNewSafari = function () {
|
|||
|
||||
IOS.prototype.navToInitialWebview = function (cb) {
|
||||
var timeout = 0;
|
||||
if (this.args.udid) timeout = parseInt(this.iOSSDKVersion, 10) >= 8 ? 4000 : 6000;
|
||||
if (timeout > 0) logger.debug('Waiting for ' + timeout + ' ms before navigating to view.');
|
||||
if (this.args.udid) {
|
||||
timeout = 3000;
|
||||
logger.debug('Waiting for ' + timeout + ' ms before navigating to view.');
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
if (this.useNewSafari()) {
|
||||
return this.typeAndNavToUrl(cb);
|
||||
|
|
|
@ -12,7 +12,7 @@ var setup = require("../common/setup-base")
|
|||
, getSimUdid = require('../../helpers/sim-udid.js').getSimUdid
|
||||
, Unzip = require('unzip');
|
||||
|
||||
describe('file movements - pullFile and pushFile', function () {
|
||||
describe('file movements - pullFile and pushFile @skip-real-device', function () {
|
||||
var driver;
|
||||
var desired = {
|
||||
app: getAppPath('TestApp')
|
||||
|
|
|
@ -10,7 +10,7 @@ var desired = {
|
|||
app: 'settings'
|
||||
};
|
||||
|
||||
describe("prefs @skip-ios6", function () {
|
||||
describe("prefs @skip-ios6 @skip-real-device", function () {
|
||||
// TODO: cannot install settings app on ios6
|
||||
describe('settings app', function () {
|
||||
var driver;
|
||||
|
@ -33,4 +33,3 @@ describe("prefs @skip-ios6", function () {
|
|||
});
|
||||
|
||||
});
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ var desired = {
|
|||
bundleId: 'com.apple.Preferences'
|
||||
};
|
||||
|
||||
describe('settings app @skip-ios6 @skip-ios7', function () {
|
||||
describe('settings app @skip-ios6 @skip-ios7 @skip-real-device', function () {
|
||||
var driver;
|
||||
setup(this, desired).then(function (d) { driver = d; });
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ var desired = {
|
|||
app: 'settings'
|
||||
};
|
||||
|
||||
describe("prefs @skip-ios6", function () {
|
||||
describe("prefs @skip-ios6 @skip-real-device", function () {
|
||||
// TODO: cannot install settings app on ios6
|
||||
|
||||
var checkLocServ = function (driver, expected, cb) {
|
||||
|
@ -44,4 +44,3 @@ describe("prefs @skip-ios6", function () {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
var env = require('../../../helpers/env'),
|
||||
setup = require("../../common/setup-base");
|
||||
|
||||
describe('safari - basics @skip-ios6', function () {
|
||||
describe('safari - basics @skip-ios6 @skip-real-device', function () {
|
||||
if (env.IOS8 && !env.IOS80) {
|
||||
describe('default init' ,function () {
|
||||
var driver;
|
||||
|
@ -28,7 +28,7 @@ describe('safari - basics @skip-ios6', function () {
|
|||
describe('default init' ,function () {
|
||||
var driver;
|
||||
setup(this, {browserName: 'safari'}).then(function (d) { driver = d; });
|
||||
it('it should use appium default init page', function (done) {
|
||||
it('it should use safari default init page', function (done) {
|
||||
driver
|
||||
.source().should.eventually.include('Apple')
|
||||
.nodeify(done);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
"use strict";
|
||||
var desired = require('./desired');
|
||||
|
||||
describe("safari - webview @skip-ios6", function () {
|
||||
describe("safari - webview @skip-ios6 @skip-real-device", function () {
|
||||
require('../../../common/webview/alerts-base')(desired);
|
||||
});
|
||||
|
|
|
@ -265,7 +265,11 @@ env.localIP = function () {
|
|||
};
|
||||
|
||||
env.LOCAL_APPIUM_PORT = env.SAUCE ? 4443 : env.APPIUM_PORT;
|
||||
env.TEST_END_POINT = 'http://localhost:' + env.LOCAL_APPIUM_PORT + '/test/';
|
||||
if (env.REAL_DEVICE) {
|
||||
env.TEST_END_POINT = 'http://' + env.localIP() + ':' + env.LOCAL_APPIUM_PORT + '/test/';
|
||||
} else {
|
||||
env.TEST_END_POINT = 'http://localhost:' + env.LOCAL_APPIUM_PORT + '/test/';
|
||||
}
|
||||
env.GUINEA_TEST_END_POINT = env.TEST_END_POINT + 'guinea-pig';
|
||||
if (env.REAL_DEVICE) {
|
||||
env.CHROME_TEST_END_POINT = 'http://' + env.localIP() + ':' + env.LOCAL_APPIUM_PORT + '/test/';
|
||||
|
|
Загрузка…
Ссылка в новой задаче