Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test
Browse files Browse the repository at this point in the history
yuriy-fix committed Feb 27, 2018
1 parent 2cea2a1 commit 47cf2df
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/filtering.html
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@
expect(comboBox.opened).to.equal(true);
});

it('should open the popup when input field is cleared', () => {
it('should open the popup when the value of the input field is set to none', () => {
comboBox.value = 'foo';
comboBox.close();
expect(comboBox.opened).to.equal(false);
9 changes: 9 additions & 0 deletions test/vaadin-combo-box.html
Original file line number Diff line number Diff line change
@@ -233,6 +233,15 @@

expect(comboBox.selectedItem).to.be.null;
});

it('should not open the overlay after clearing the value', () => {
const overlayElement = comboBox.$.overlay.$.dropdown.$.overlay;
comboBox.value = 'foo';

comboBox._clear();

expect(overlayElement.opened).not.to.be.true;
});
});

describe('focus API', () => {

0 comments on commit 47cf2df

Please sign in to comment.