You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ComboboxPageLengthZeroFilterTest.java 833B

12345678910111213141516171819202122232425262728
  1. package com.vaadin.v7.tests.components.combobox;
  2. import java.util.List;
  3. import org.junit.Assert;
  4. import org.junit.Test;
  5. import com.vaadin.testbench.By;
  6. import com.vaadin.testbench.elements.ComboBoxElement;
  7. import com.vaadin.tests.tb3.MultiBrowserTest;
  8. public class ComboboxPageLengthZeroFilterTest extends MultiBrowserTest {
  9. @Test
  10. public void testOptionsNotEmpty() {
  11. openTestURL();
  12. List<String> suggestions = getFilterSuggestions("T");
  13. Assert.assertEquals("All items should be presented!", 12,
  14. suggestions.size());
  15. }
  16. private List<String> getFilterSuggestions(String string) {
  17. ComboBoxElement comboBox = $(ComboBoxElement.class).first();
  18. comboBox.findElement(By.vaadin("#textbox")).sendKeys(string);
  19. return comboBox.getPopupSuggestions();
  20. }
  21. }