aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIconsTest.java
blob: 97a9455d635d98a3e11b7e1ca2ab1d3c750607c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.vaadin.tests.components.combobox;

import java.io.IOException;

import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;

import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;

public class ComboBoxVaadinIconsTest extends MultiBrowserTest {

    @Test
    public void testComboBoxIconRendering() throws IOException {
        openTestURL();
        ComboBoxElement comboBox = $(ComboBoxElement.class).first();
        waitForElementPresent(By.id("value-label"));
        Assert.assertEquals(findElement(By.id("value-label")).getText(),
                "Test");

        comboBox.openPopup();
        comboBox.sendKeys(Keys.ARROW_DOWN, Keys.ARROW_DOWN, Keys.ENTER);
        Assert.assertEquals(findElement(By.id("value-label")).getText(),
                "PAPERPLANE");

    }
}