add critic rating column

This commit is contained in:
Luke Pulverenti 2016-03-24 22:54:38 -04:00
parent ef206ec9a5
commit fbd1d13138
12 changed files with 92 additions and 60 deletions

View file

@ -69,57 +69,52 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
test('first item gets focus when menubar is focused', function(done) {
var menubar = fixture('basic');
MockInteractions.focus(menubar);
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.firstElementChild, 'document.activeElement is first item')
done();
// wait for async in _onFocus
}, 200);
});
});
test('selected item gets focus when menubar is focused', function(done) {
var menubar = fixture('basic');
menubar.selected = 1;
MockInteractions.focus(menubar);
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.selectedItem, 'document.activeElement is selected item');
done();
// wait for async in _onFocus
}, 200);
});
});
test('focusing non-item content does not auto-focus an item', function(done) {
var menubar = fixture('basic');
menubar.extraContent.focus();
setTimeout(function() {
Polymer.Base.async(function() {
var ownerRoot = Polymer.dom(menubar.extraContent).getOwnerRoot() || document;
var activeElement = Polymer.dom(ownerRoot).activeElement;
assert.equal(activeElement, menubar.extraContent, 'menubar.extraContent is focused');
assert.equal(Polymer.dom(document).activeElement, menubar, 'menubar is document.activeElement');
done();
// wait for async in _onFocus
}, 200);
});
});
test('last activated item in a multi select menubar is focused', function(done) {
var menubar = fixture('multi');
menubar.selected = 0;
menubar.items[1].click();
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.items[1], 'document.activeElement is last activated item');
done();
// wait for async in _onFocus
}, 200);
});
});
test('deselection in a multi select menubar focuses deselected item', function(done) {
var menubar = fixture('multi');
menubar.selected = 0;
menubar.items[0].click();
setTimeout(function() {
Polymer.Base.async(function() {
assert.equal(Polymer.dom(document).activeElement, menubar.items[0], 'document.activeElement is last activated item');
done();
// wait for async in _onFocus
}, 200);
});
});
suite('left / right keys are reversed when the menubar has RTL directionality', function() {