update components
This commit is contained in:
parent
b4e32e14d4
commit
91127df6f0
21 changed files with 65 additions and 35 deletions
|
@ -36,6 +36,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="single-item">
|
||||
<template>
|
||||
<test-menu>
|
||||
<div>item 1</div>
|
||||
</test-menu>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="disabled">
|
||||
<template>
|
||||
<test-menu>
|
||||
|
@ -101,6 +109,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
});
|
||||
|
||||
test('first item gets focus when menu is focused in a single item menu', function(done) {
|
||||
var menu = fixture('single-item');
|
||||
MockInteractions.focus(menu);
|
||||
Polymer.Base.async(function() {
|
||||
var ownerRoot = Polymer.dom(menu.firstElementChild).getOwnerRoot() || document;
|
||||
var activeElement = Polymer.dom(ownerRoot).activeElement;
|
||||
assert.equal(activeElement, menu.firstElementChild, 'menu.firstElementChild is focused');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('selected item gets focus when menu is focused', function(done) {
|
||||
var menu = fixture('basic');
|
||||
menu.selected = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue