aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/nativeselect/NativeSelectVisibleItemCountTest.java
blob: 4825497dca381013e6793392c92b3e3d4d2d94e1 (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
package com.vaadin.tests.components.nativeselect;

import static org.junit.Assert.assertEquals;

import org.junit.Test;
import org.openqa.selenium.WebElement;

import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.NativeSelectElement;
import com.vaadin.tests.tb3.SingleBrowserTest;

public class NativeSelectVisibleItemCountTest extends SingleBrowserTest {

    @Test
    public void changeItemCount() {
        openTestURL();
        WebElement select = $(NativeSelectElement.class).first()
                .findElement(By.xpath("select"));
        assertEquals("1", select.getAttribute("size"));
        selectMenuPath("Component", "Size", "Visible item count", "5");
        assertEquals("5", select.getAttribute("size"));
    }

    @Override
    protected Class<?> getUIClass() {
        return NativeSelects.class;
    }
}