update polymer components

This commit is contained in:
Luke Pulverenti 2015-10-28 16:56:25 -04:00
parent 0320ad7256
commit 3c08769c6c
29 changed files with 961 additions and 844 deletions

View file

@ -31,6 +31,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="ActivePaperSpinner">
<template>
<paper-spinner active></paper-spinner>
</template>
</test-fixture>
<script>
'use strict';
@ -38,9 +44,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
suite('an accessible paper spinner', function() {
var spinner;
var activeSpinner;
setup(function() {
spinner = fixture('PaperSpinner');
activeSpinner = fixture('ActivePaperSpinner');
});
test('adds an ARIA label when `alt` is supplied', function() {
@ -54,6 +62,21 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
spinner.active = false;
expect(spinner.getAttribute('aria-hidden')).to.be.eql('true');
});
test('toggle during cooldown', function(done) {
activeSpinner.active = false;
// Set active to true before cooldown animation completes.
setTimeout(function() {
activeSpinner.active = true;
// Wait for cooldown animation to complete.
setTimeout(function() {
expect(activeSpinner.active).to.equal(true);
done();
}, 500);
}, 100);
});
});
});