Files
appium/test/unit/device-specs.js
T
Dylan Lacey 148336fc04 Use the new capabilities throughout the codebase.
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
2014-04-01 16:42:28 -07:00

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');
});
});
});
});