mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-07 09:36:05 -08:00
Update AdminLTE
- from 2.4.5 to 2.4.18 (cannot detect any issues) - set default scancycle for Apple Devices to 1
This commit is contained in:
@@ -3,6 +3,16 @@ module('Data adapters - Array');
|
||||
var ArrayData = require('select2/data/array');
|
||||
var $ = require('jquery');
|
||||
var Options = require('select2/options');
|
||||
var Utils = require('select2/utils');
|
||||
|
||||
var UserDefinedType = function (id, text) {
|
||||
var self = this;
|
||||
|
||||
self.id = id;
|
||||
self.text = text;
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
var arrayOptions = new Options({
|
||||
data: [
|
||||
@@ -17,7 +27,8 @@ var arrayOptions = new Options({
|
||||
{
|
||||
id: '2',
|
||||
text: '2'
|
||||
}
|
||||
},
|
||||
new UserDefinedType(1, 'aaaaaa')
|
||||
]
|
||||
});
|
||||
|
||||
@@ -182,7 +193,10 @@ test('multiple sets the value', function (assert) {
|
||||
|
||||
var data = new ArrayData($select, arrayOptions);
|
||||
|
||||
assert.equal($select.val(), null);
|
||||
assert.ok(
|
||||
$select.val() == null || $select.val().length == 0,
|
||||
'nothing should be selected'
|
||||
);
|
||||
|
||||
data.select({
|
||||
id: 'default',
|
||||
@@ -216,7 +230,7 @@ test('option tags are automatically generated', function (assert) {
|
||||
|
||||
assert.equal(
|
||||
$select.find('option').length,
|
||||
3,
|
||||
4,
|
||||
'An <option> element should be created for each object'
|
||||
);
|
||||
});
|
||||
@@ -237,7 +251,7 @@ test('option tags can receive new data', function(assert) {
|
||||
});
|
||||
|
||||
assert.ok(
|
||||
$select.find(':selected').data('data').extra,
|
||||
Utils.GetData($select.find(':selected')[0], 'data').extra,
|
||||
'<option> default should have new data'
|
||||
);
|
||||
|
||||
@@ -246,7 +260,7 @@ test('option tags can receive new data', function(assert) {
|
||||
});
|
||||
|
||||
assert.ok(
|
||||
$select.find(':selected').data('data').extra,
|
||||
Utils.GetData($select.find(':selected')[0], 'data').extra,
|
||||
'<option> One should have new data'
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user