mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
78e572f2fc
commit
038bf83aef
20 changed files with 160 additions and 25 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.2.57",
|
"version": "1.2.58",
|
||||||
"_release": "1.2.57",
|
"_release": "1.2.58",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.2.57",
|
"tag": "1.2.58",
|
||||||
"commit": "f0449d2fac7a883179fdeefdac1807a41c47dfd5"
|
"commit": "523cb074208c7350bb68554c6fcde613142117f4"
|
||||||
},
|
},
|
||||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "^1.2.0",
|
"_target": "^1.2.0",
|
||||||
|
|
|
@ -77,11 +77,18 @@ define(['browser'], function (browser) {
|
||||||
// Unfortunately there's no real way to detect mkv support
|
// Unfortunately there's no real way to detect mkv support
|
||||||
if (browser.chrome) {
|
if (browser.chrome) {
|
||||||
|
|
||||||
|
var userAgent = navigator.userAgent.toLowerCase();
|
||||||
|
|
||||||
// Not supported on opera tv
|
// Not supported on opera tv
|
||||||
if (browser.operaTv) {
|
if (browser.operaTv) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Filter out browsers based on chromium that don't support mkv
|
||||||
|
if (userAgent.indexOf('vivaldi') != -1 || userAgent.indexOf('opera') != -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-behaviors",
|
"name": "iron-behaviors",
|
||||||
"version": "1.0.13",
|
"version": "1.0.14",
|
||||||
"description": "Provides a set of behaviors for the iron elements",
|
"description": "Provides a set of behaviors for the iron elements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@ -30,11 +30,11 @@
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||||
"_release": "1.0.13",
|
"_release": "1.0.14",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.13",
|
"tag": "v1.0.14",
|
||||||
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
"commit": "c1d38a26219cf2e83b31a71a2bd8ae35ebee7ed7"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
|
|
33
dashboard-ui/bower_components/iron-behaviors/.github/ISSUE_TEMPLATE.md
vendored
Normal file
33
dashboard-ui/bower_components/iron-behaviors/.github/ISSUE_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
<!-- Instructions: https://github.com/PolymerElements/iron-behaviors/CONTRIBUTING.md#filing-issues -->
|
||||||
|
### Description
|
||||||
|
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
|
||||||
|
|
||||||
|
### Expected outcome
|
||||||
|
|
||||||
|
<!-- Example: The page stays the same color. -->
|
||||||
|
|
||||||
|
### Actual outcome
|
||||||
|
|
||||||
|
<!-- Example: The page turns pink. -->
|
||||||
|
|
||||||
|
### Live Demo
|
||||||
|
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
|
||||||
|
|
||||||
|
### Steps to reproduce
|
||||||
|
|
||||||
|
<!-- Example
|
||||||
|
1. Put a `paper-foo` element in the page.
|
||||||
|
2. Open the page in a web browser.
|
||||||
|
3. Click the `paper-foo` element.
|
||||||
|
-->
|
||||||
|
|
||||||
|
### Browsers Affected
|
||||||
|
<!-- Check all that apply -->
|
||||||
|
- [ ] Chrome
|
||||||
|
- [ ] Firefox
|
||||||
|
- [ ] Safari 9
|
||||||
|
- [ ] Safari 8
|
||||||
|
- [ ] Safari 7
|
||||||
|
- [ ] Edge
|
||||||
|
- [ ] IE 11
|
||||||
|
- [ ] IE 10
|
|
@ -1,5 +1,5 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
sudo: false
|
sudo: required
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g bower polylint web-component-tester
|
- npm install -g bower polylint web-component-tester
|
||||||
- bower install
|
- bower install
|
||||||
|
@ -8,18 +8,16 @@ env:
|
||||||
global:
|
global:
|
||||||
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
|
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
|
||||||
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
|
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
|
||||||
- CXX=g++-4.8
|
|
||||||
node_js: stable
|
node_js: stable
|
||||||
addons:
|
addons:
|
||||||
firefox: latest
|
firefox: latest
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- google-chrome
|
- google-chrome
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
packages:
|
||||||
- google-chrome-stable
|
- google-chrome-stable
|
||||||
- g++-4.8
|
|
||||||
sauce_connect: true
|
sauce_connect: true
|
||||||
script:
|
script:
|
||||||
- xvfb-run wct
|
- xvfb-run wct
|
||||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||||
|
dist: trusty
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-behaviors",
|
"name": "iron-behaviors",
|
||||||
"version": "1.0.13",
|
"version": "1.0.14",
|
||||||
"description": "Provides a set of behaviors for the iron elements",
|
"description": "Provides a set of behaviors for the iron elements",
|
||||||
"private": true,
|
"private": true,
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -87,7 +87,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
this.style.pointerEvents = disabled ? 'none' : '';
|
this.style.pointerEvents = disabled ? 'none' : '';
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
this._oldTabIndex = this.tabIndex;
|
this._oldTabIndex = this.tabIndex;
|
||||||
this.focused = false;
|
this._setFocused(false);
|
||||||
this.tabIndex = -1;
|
this.tabIndex = -1;
|
||||||
this.blur();
|
this.blur();
|
||||||
} else if (this._oldTabIndex !== undefined) {
|
} else if (this._oldTabIndex !== undefined) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<!DOCTYPE html><!--
|
<!DOCTYPE html><!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<!--
|
<!--
|
||||||
|
@license
|
||||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-selector",
|
"name": "iron-selector",
|
||||||
"version": "1.4.0",
|
"version": "1.5.0",
|
||||||
"description": "Manages a set of elements that can be selected",
|
"description": "Manages a set of elements that can be selected",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
|
@ -30,13 +30,13 @@
|
||||||
"web-component-tester": "^4.0.0",
|
"web-component-tester": "^4.0.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.4.0",
|
"_release": "1.5.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.4.0",
|
"tag": "v1.5.0",
|
||||||
"commit": "554f7418fdbd97688eb21518b5f8172167d53a95"
|
"commit": "c7402274efa2e3b2a905ffa25d70c2ff3309dc59"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
"_source": "git://github.com/polymerelements/iron-selector.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/iron-selector"
|
"_originalSource": "polymerelements/iron-selector"
|
||||||
}
|
}
|
|
@ -1,5 +1,5 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
sudo: false
|
sudo: required
|
||||||
before_script:
|
before_script:
|
||||||
- npm install -g bower polylint web-component-tester
|
- npm install -g bower polylint web-component-tester
|
||||||
- bower install
|
- bower install
|
||||||
|
@ -8,18 +8,16 @@ env:
|
||||||
global:
|
global:
|
||||||
- secure: ltCkwJM0nkTS9WjikyjqBsB5J2hQon4UnVVrINk4y+Vq4v9PQJH3+83nya0jnxilKaeAJs4d2/OS02F9GkqYpsSmDz7OgXPfk0hrHA8UksvvpSALfnukleIAN2YTOcxXJKeNHcfpqCKPk1dGeNQOEM61H+QgTBIyFB3sMugygqs=
|
- secure: ltCkwJM0nkTS9WjikyjqBsB5J2hQon4UnVVrINk4y+Vq4v9PQJH3+83nya0jnxilKaeAJs4d2/OS02F9GkqYpsSmDz7OgXPfk0hrHA8UksvvpSALfnukleIAN2YTOcxXJKeNHcfpqCKPk1dGeNQOEM61H+QgTBIyFB3sMugygqs=
|
||||||
- secure: TJuu1WdpFLTaBN/prBafm8Pld/BQCySNuuG1nATbF3fqiOpgehXu8Z5URAz5syUhqZAyEmuRMxvXpEVD/t1jrtaXVwkdCFkkQ4ckkP4gTIeSGA/Puw8sveB2q7QAqXyTmeFkocNlh8fxV+B07o0SPWdhcvdZnDVU9VrpSqL+92M=
|
- secure: TJuu1WdpFLTaBN/prBafm8Pld/BQCySNuuG1nATbF3fqiOpgehXu8Z5URAz5syUhqZAyEmuRMxvXpEVD/t1jrtaXVwkdCFkkQ4ckkP4gTIeSGA/Puw8sveB2q7QAqXyTmeFkocNlh8fxV+B07o0SPWdhcvdZnDVU9VrpSqL+92M=
|
||||||
- CXX=g++-4.8
|
|
||||||
node_js: stable
|
node_js: stable
|
||||||
addons:
|
addons:
|
||||||
firefox: latest
|
firefox: latest
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- google-chrome
|
- google-chrome
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
packages:
|
||||||
- google-chrome-stable
|
- google-chrome-stable
|
||||||
- g++-4.8
|
|
||||||
sauce_connect: true
|
sauce_connect: true
|
||||||
script:
|
script:
|
||||||
- xvfb-run wct
|
- xvfb-run wct
|
||||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||||
|
dist: trusty
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iron-selector",
|
"name": "iron-selector",
|
||||||
"version": "1.4.0",
|
"version": "1.5.0",
|
||||||
"description": "Manages a set of elements that can be selected",
|
"description": "Manages a set of elements that can be selected",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "http://polymer.github.io/LICENSE.txt",
|
"license": "http://polymer.github.io/LICENSE.txt",
|
||||||
|
|
|
@ -220,6 +220,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
this.selected = this._indexToValue(index);
|
this.selected = this._indexToValue(index);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Selects the item at the given index.
|
||||||
|
*
|
||||||
|
* @method selectIndex
|
||||||
|
*/
|
||||||
|
selectIndex: function(index) {
|
||||||
|
this.select(this._indexToValue(index));
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Force a synchronous update of the `items` property.
|
* Force a synchronous update of the `items` property.
|
||||||
*
|
*
|
||||||
|
|
|
@ -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);
|
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() {
|
suite('items changing', function() {
|
||||||
var s1;
|
var s1;
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
</template>
|
</template>
|
||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
|
<test-fixture id="valueById">
|
||||||
|
<template>
|
||||||
|
<iron-selector multi attr-for-selected="id">
|
||||||
|
<div id="item0">Item 0</div>
|
||||||
|
<div id="item1">Item 1</div>
|
||||||
|
<div id="item2">Item 2</div>
|
||||||
|
<div id="item3">Item 3</div>
|
||||||
|
<div id="item4">Item 4</div>
|
||||||
|
</iron-selector>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
NOTE(cdata): Enable test-fixture when polymer/polymer#2495 is resolved
|
NOTE(cdata): Enable test-fixture when polymer/polymer#2495 is resolved
|
||||||
-->
|
-->
|
||||||
|
@ -301,6 +313,48 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
suite('`select()` and `selectIndex()`', function() {
|
||||||
|
var selector;
|
||||||
|
|
||||||
|
setup(function() {
|
||||||
|
selector = fixture('valueById');
|
||||||
|
});
|
||||||
|
|
||||||
|
test('`select()` selects an item with the given value', function() {
|
||||||
|
selector.select('item1');
|
||||||
|
assert.equal(selector.selectedValues.length, 1);
|
||||||
|
assert.equal(selector.selectedValues.indexOf('item1'), 0);
|
||||||
|
|
||||||
|
selector.select('item3');
|
||||||
|
assert.equal(selector.selectedValues.length, 2);
|
||||||
|
assert.isTrue(selector.selectedValues.indexOf('item3') >= 0);
|
||||||
|
|
||||||
|
selector.select('item2');
|
||||||
|
assert.equal(selector.selectedValues.length, 3);
|
||||||
|
assert.isTrue(selector.selectedValues.indexOf('item2') >= 0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('`selectIndex()` selects an item with the given index', function() {
|
||||||
|
selector.selectIndex(1);
|
||||||
|
assert.equal(selector.selectedValues.length, 1);
|
||||||
|
assert.isTrue(selector.selectedValues.indexOf('item1') >= 0);
|
||||||
|
assert.equal(selector.selectedItems.length, 1);
|
||||||
|
assert.isTrue(selector.selectedItems.indexOf(selector.items[1]) >= 0);
|
||||||
|
|
||||||
|
selector.selectIndex(3);
|
||||||
|
assert.equal(selector.selectedValues.length, 2);
|
||||||
|
assert.isTrue(selector.selectedValues.indexOf('item3') >= 0);
|
||||||
|
assert.equal(selector.selectedItems.length, 2);
|
||||||
|
assert.isTrue(selector.selectedItems.indexOf(selector.items[3]) >= 0);
|
||||||
|
|
||||||
|
selector.selectIndex(0);
|
||||||
|
assert.equal(selector.selectedValues.length, 3);
|
||||||
|
assert.isTrue(selector.selectedValues.indexOf('item0') >= 0);
|
||||||
|
assert.equal(selector.selectedItems.length, 3);
|
||||||
|
assert.isTrue(selector.selectedItems.indexOf(selector.items[0]) >= 0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
/* test('toggle multi from true to false', function() {
|
/* test('toggle multi from true to false', function() {
|
||||||
// set selected
|
// set selected
|
||||||
s.selected = [0, 2];
|
s.selected = [0, 2];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue