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.

ComboBoxVaadinIconsTest.java 891B

123456789101112131415161718192021222324252627282930
  1. package com.vaadin.tests.components.combobox;
  2. import java.io.IOException;
  3. import org.junit.Assert;
  4. import org.junit.Test;
  5. import org.openqa.selenium.By;
  6. import org.openqa.selenium.Keys;
  7. import com.vaadin.testbench.elements.ComboBoxElement;
  8. import com.vaadin.tests.tb3.MultiBrowserTest;
  9. public class ComboBoxVaadinIconsTest extends MultiBrowserTest {
  10. @Test
  11. public void testComboBoxIconRendering() throws IOException {
  12. openTestURL();
  13. ComboBoxElement comboBox = $(ComboBoxElement.class).first();
  14. waitForElementPresent(By.id("value-label"));
  15. Assert.assertEquals(findElement(By.id("value-label")).getText(),
  16. "Test");
  17. comboBox.openPopup();
  18. comboBox.sendKeys(Keys.ARROW_DOWN, Keys.ARROW_DOWN, Keys.ENTER);
  19. Assert.assertEquals(findElement(By.id("value-label")).getText(),
  20. "PAPERPLANE");
  21. }
  22. }