mirror of
https://github.com/appium/appium.git
synced 2026-05-05 01:39:51 -05:00
148336fc04
Every entry in `Capabilities.capabilityConversions` is now used to convert capabilities into the args array. Change version to versionVersion. Change device to platformName Stop aliasing platformVersion to version in Capabilities.js
28 lines
776 B
JavaScript
28 lines
776 B
JavaScript
"use strict";
|
|
|
|
var Device = require('../../lib/devices/device.js')
|
|
, capConversion = require('../../lib/server/capabilities.js').capabilityConversions
|
|
, chai = require('chai')
|
|
, should = chai.should()
|
|
, _ = require('underscore');
|
|
|
|
var Test = function () {
|
|
this.init();
|
|
};
|
|
|
|
_.extend(Test.prototype, Device.prototype);
|
|
|
|
describe("device.js", function () {
|
|
describe("#configure", function () {
|
|
_.each(capConversion, function (newCap, cap) {
|
|
var name = "should store the " + cap + " capability as the " + newCap + " arg";
|
|
it(name, function () {
|
|
var caps = {};
|
|
caps[cap] = 'iOS';
|
|
var testDevice = new Test();
|
|
testDevice.configure({}, caps);
|
|
testDevice.args[newCap].should.equal('iOS');
|
|
});
|
|
});
|
|
});
|
|
}); |