Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Ensure ComboBox is focusable (#58)
Browse files Browse the repository at this point in the history
* Ensure ComboBox is focusable
  • Loading branch information
SomeoneToIgnore authored and ZheSun88 committed Mar 1, 2018
1 parent 46128a5 commit b22ac6f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.junit.Test;
import org.junit.rules.ExpectedException;

import com.vaadin.flow.component.Focusable;
import com.vaadin.flow.component.HasValue.ValueChangeListener;
import com.vaadin.flow.component.UI;
import com.vaadin.flow.data.binder.Binder;
Expand Down Expand Up @@ -158,6 +159,13 @@ public void setValue_selectionPropertySet_listenersAreNotified() {
Assert.assertEquals(Category.CATEGORY_2, selected.get());
}

// Ensure https://github.com/vaadin/vaadin-combo-box-flow/issues/36 does not reoccur
@Test
public void ensureComboBoxIsFocusable() {
Assert.assertTrue("ComboBox should be focusable",
Focusable.class.isAssignableFrom(ComboBox.class));
}

private void assertItem(TestComboBox comboBox, int index, String caption) {
String value1 = comboBox.items.get(index);
Assert.assertEquals(caption, value1);
Expand Down

0 comments on commit b22ac6f

Please sign in to comment.