1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-04-30 00:02:36 -04:00
parent 78e572f2fc
commit 038bf83aef
20 changed files with 160 additions and 25 deletions

View file

@ -154,6 +154,35 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
expect(s2.items.length).to.be.equal(6);
});
suite('`select()` and `selectIndex()`', function() {
test('`select()` selects an item with the given value', function() {
s2.select('item1');
assert.equal(s2.selected, 'item1');
s2.select('item3');
assert.equal(s2.selected, 'item3');
s2.select('item2');
assert.equal(s2.selected, 'item2');
});
test('`selectIndex()` selects an item with the given index', function() {
assert.equal(s2.selectedItem, undefined);
s2.selectIndex(1);
assert.equal(s2.selected, 'item1');
assert.equal(s2.selectedItem, s2.items[1]);
s2.selectIndex(3);
assert.equal(s2.selected, 'item3');
assert.equal(s2.selectedItem, s2.items[3]);
s2.selectIndex(4);
assert.equal(s2.selected, 'item4');
assert.equal(s2.selectedItem, s2.items[4]);
});
});
suite('items changing', function() {
var s1;