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

merge from dev

This commit is contained in:
Luke Pulverenti 2015-12-14 10:43:03 -05:00
parent 1c8f02ce0f
commit 33b01d778c
911 changed files with 34157 additions and 57125 deletions

View file

@ -104,10 +104,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
s2 = fixture('basic');
});
test('honors the attrForSelected attribute', function() {
assert.equal(s2.attrForSelected, 'id');
assert.equal(s2.selected, 'item2');
assert.equal(s2.selectedItem, document.querySelector('#item2'));
test('honors the attrForSelected attribute', function(done) {
Polymer.Base.async(function() {
assert.equal(s2.attrForSelected, 'id');
assert.equal(s2.selected, 'item2');
assert.equal(s2.selectedItem, document.querySelector('#item2'));
done();
});
});
test('allows assignment to selected', function() {
@ -153,10 +156,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
changeCount++;
});
s2.appendChild(newItem);
Polymer.dom(s2).appendChild(newItem);
Polymer.Base.async(function() {
s2.removeChild(newItem);
Polymer.dom(s2).removeChild(newItem);
Polymer.Base.async(function() {
expect(changeCount).to.be.equal(2);

View file

@ -70,17 +70,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
test('items', function() {
test('items', function(done) {
test1._excludedLocalNames.span = 1;
test2._excludedLocalNames.div = 1;
test1._updateItems();
test2._updateItems();
Polymer.Base.async(function() {
var NOT_FOUND = -1;
var items1 = test1.items.map(function(el) { return el.localName; });
var items2 = test2.items.map(function(el) { return el.localName; });
assert.equal(items1.indexOf('span'), NOT_FOUND);
assert.equal(items2.indexOf('div'), NOT_FOUND);
done();
});
});
});

View file

@ -66,6 +66,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
setup(function () {
s = fixture('test');
t = Polymer.dom(s).querySelector('[is="dom-repeat"]');
});
test('honors the multi attribute', function() {
@ -163,6 +164,30 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
});
test('updates selection when dom changes', function(done) {
var selectEventCounter = 0;
s = fixture('test');
Polymer.Base.async(function() {
var firstChild = Polymer.dom(s).querySelector(':first-child');
var lastChild = Polymer.dom(s).querySelector(':last-child');
MockInteractions.tap(firstChild);
MockInteractions.tap(lastChild);
expect(s.selectedItems.length).to.be.equal(2);
Polymer.dom(s).removeChild(lastChild);
Polymer.Base.async(function() {
expect(s.selectedItems.length).to.be.equal(1);
done();
});
});
});
/* test('toggle multi from true to false', function() {
// set selected
s.selected = [0, 2];