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
697257670c
commit
02ae9ec81e
123 changed files with 13600 additions and 531 deletions
|
@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
|
||||
<script src="../../iron-test-helpers/test-helpers.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="../paper-textarea.html">
|
||||
|
@ -140,23 +141,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
test('focus/blur events fired on host element', function(done) {
|
||||
var nFocusEvents = 0;
|
||||
var nBlurEvents = 0;
|
||||
input.addEventListener('focus', function() {
|
||||
input.addEventListener('focus', function(event) {
|
||||
nFocusEvents += 1;
|
||||
// setTimeout to wait for potentially more, erroneous events
|
||||
setTimeout(function() {
|
||||
assert.equal(nFocusEvents, 1, 'one focus event fired');
|
||||
input.inputElement.textarea.blur();
|
||||
});
|
||||
MockInteractions.blur(input.inputElement.textarea);
|
||||
});
|
||||
input.addEventListener('blur', function() {
|
||||
nBlurEvents += 1;
|
||||
// setTimeout to wait for potentially more, erroneous events
|
||||
setTimeout(function() {
|
||||
assert.equal(nBlurEvents, 1, 'one blur event fired');
|
||||
done();
|
||||
});
|
||||
assert.isTrue(nFocusEvents >= 1, 'focus event fired');
|
||||
assert.isTrue(nBlurEvents >= 1, 'blur event fired');
|
||||
done();
|
||||
});
|
||||
input.inputElement.textarea.focus();
|
||||
MockInteractions.focus(input.inputElement.textarea);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue