mirror of
https://github.com/appium/appium.git
synced 2026-05-05 01:39:51 -05:00
Update to handle iOS 8.2
This commit is contained in:
@@ -7,6 +7,7 @@ ios7_only=false
|
||||
ios71_only=false
|
||||
ios8_only=false
|
||||
ios81_only=false
|
||||
ios82_only=false
|
||||
android_only=false
|
||||
android_chrome=false
|
||||
selendroid_only=false
|
||||
@@ -51,6 +52,9 @@ for arg in "$@"; do
|
||||
elif [ "$arg" = "--ios81" ]; then
|
||||
ios81_only=true
|
||||
all_tests=false
|
||||
elif [ "$arg" = "--ios82" ]; then
|
||||
ios82_only=true
|
||||
all_tests=false
|
||||
elif [ "$arg" = "--no-xcode-switch" ]; then
|
||||
xcode_switch=false
|
||||
elif [ "$arg" = "--real-device" ]; then
|
||||
@@ -103,6 +107,10 @@ if $ios81_only || $all_tests; then
|
||||
run_ios_tests "8.1" "ios81" "@skip-ios81|@skip-ios8|@skip-ios-all|@skip-ios7up"
|
||||
fi
|
||||
|
||||
if $ios82_only || $all_tests; then
|
||||
run_ios_tests "8.2" "ios82" "@skip-ios82|@skip-ios81|@skip-ios8|@skip-ios-all|@skip-ios7up"
|
||||
fi
|
||||
|
||||
if $did_switch_xcode; then
|
||||
echo "Switching back to default Xcode ($xcode_path)"
|
||||
sudo xcode-select -switch $xcode_path
|
||||
|
||||
@@ -996,7 +996,9 @@ IOS.getDeviceStringFromOpts = function (opts) {
|
||||
'iOS 7.1',
|
||||
'iPad Simulator (8.0 Simulator)': 'iPad 2 (8.0 Simulator)',
|
||||
'iPad Simulator (8.1 Simulator)': 'iPad 2 (8.1 Simulator)',
|
||||
'iPad Simulator (8.2 Simulator)': 'iPad 2 (8.2 Simulator)',
|
||||
'iPad Simulator (7.1 Simulator)': 'iPad 2 (7.1 Simulator)',
|
||||
'iPhone Simulator (8.2 Simulator)': 'iPhone 6 (8.2 Simulator)',
|
||||
'iPhone Simulator (8.1 Simulator)': 'iPhone 6 (8.1 Simulator)',
|
||||
'iPhone Simulator (8.0 Simulator)': 'iPhone 6 (8.0 Simulator)',
|
||||
'iPhone Simulator (7.1 Simulator)': 'iPhone 5s (7.1 Simulator)'
|
||||
|
||||
@@ -18,8 +18,8 @@ describe("prefs @skip-ios6", function () {
|
||||
setup(this, desired).then(function (d) { driver = d; });
|
||||
|
||||
it('should turn off autocomplete', function (done) {
|
||||
var ios7up = _.contains(["ios7", "ios71", "ios8", "ios81"], env.DEVICE);
|
||||
var ios8 = _.contains(["ios8", "ios81"], env.DEVICE);
|
||||
var ios7up = _.contains(["ios7", "ios71", "ios8", "ios81", "ios82"], env.DEVICE);
|
||||
var ios8 = _.contains(["ios8", "ios81", "ios82"], env.DEVICE);
|
||||
var switchEl;
|
||||
driver
|
||||
.elementsByClassName("UIATableCell").at(ios7up ? 0 : 1).click()
|
||||
|
||||
@@ -78,7 +78,7 @@ describe('uicatalog - find - basics @skip-ios6', function () {
|
||||
|
||||
describe('no mix up', function () {
|
||||
after(function (done) {
|
||||
if (!env.IOS81) {
|
||||
if (!env.IOS81 && !env.IOS82) {
|
||||
driver
|
||||
.clickButton('UICatalog')
|
||||
.nodeify(done);
|
||||
@@ -129,7 +129,7 @@ describe('uicatalog - find - basics @skip-ios6', function () {
|
||||
|
||||
describe('findElementsByClassName textfield case', function () {
|
||||
after(function (done) {
|
||||
if (!env.IOS81) {
|
||||
if (!env.IOS81 && !env.IOS82) {
|
||||
driver
|
||||
.clickButton('UICatalog')
|
||||
.nodeify(done);
|
||||
|
||||
@@ -67,6 +67,8 @@ function iphoneOrIpadSimulator(device, version) {
|
||||
return isIpad ? 'iPad 2' : 'iPhone 6';
|
||||
case '8.1':
|
||||
return isIpad ? 'iPad 2' : 'iPhone 6';
|
||||
case '8.2':
|
||||
return isIpad ? 'iPad 2' : 'iPhone 6';
|
||||
default:
|
||||
throw new Error("invalid version");
|
||||
}
|
||||
@@ -119,6 +121,15 @@ switch (env.DEVICE) {
|
||||
, app: process.env.APP ? path.resolve(__dirname, "../../sample-code/apps/" + process.env.APP + "/build/Release-iphonesimulator/" + process.env.APP + ".app") : ''
|
||||
};
|
||||
break;
|
||||
case 'ios82':
|
||||
case 'ios82_iphone':
|
||||
case 'ios82_ipad':
|
||||
env.CAPS = {
|
||||
browserName: ''
|
||||
, deviceName: iphoneOrIpadSimulator(env.DEVICE, "8.2")
|
||||
, app: process.env.APP ? path.resolve(__dirname, "../../sample-code/apps/" + process.env.APP + "/build/Release-iphonesimulator/" + process.env.APP + ".app") : ''
|
||||
};
|
||||
break;
|
||||
case 'android':
|
||||
env.CAPS = {
|
||||
browserName: ''
|
||||
@@ -154,6 +165,7 @@ env.IOS7 = env.DEVICE.match(/ios7/i);
|
||||
env.IOS71 = env.DEVICE.match(/ios71/i);
|
||||
env.IOS8 = env.DEVICE.match(/ios8/i);
|
||||
env.IOS81 = env.DEVICE.match(/ios81/i);
|
||||
env.IOS82 = env.DEVICE.match(/ios82/i);
|
||||
env.ANDROID = env.DEVICE.match(/android/i);
|
||||
env.SELENDROID = env.DEVICE.match(/selendroid/i);
|
||||
|
||||
@@ -181,6 +193,8 @@ if (env.VERSION) {
|
||||
env.CAPS.platformVersion = "7.0";
|
||||
} else if (env.IOS81) {
|
||||
env.CAPS.platformVersion = "8.1";
|
||||
} else if (env.IOS82) {
|
||||
env.CAPS.platformVersion = "8.2";
|
||||
} else if (env.IOS8) {
|
||||
env.CAPS.platformVersion = "8.0";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user