Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Jun 20, 2018
1 parent 4eb7080 commit 6c78619
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/dropdown-menu-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,16 @@
expect(menu.items[0].textContent.trim()).to.equal('foo');
});

it('dropdown-menu should update selected item on host property changes', done => {
container.message = 'foo';
menu.selected = 0;
container.message = 'bar';
setTimeout(() => {
expect(dropdown._inputElement.querySelector('mock-item').textContent.trim()).to.equal('bar');
done();
});
});

it('dropdown-menu should support two-way data binding', () => {
const input = menu.items[1].querySelector('input');
input.value = 'bar';
Expand Down

0 comments on commit 6c78619

Please sign in to comment.