aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/elements/combobox/ComboBoxPopupTest.java
blob: 8dde197067e4306b855e183d696204d3ec882b3e (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
30
31
32
33
34
35
36
37
package com.vaadin.tests.elements.combobox;

import static org.junit.Assert.assertNotNull;

import org.junit.Before;
import org.junit.Test;

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

public class ComboBoxPopupTest extends MultiBrowserTest {

    private ComboBoxElement comboBoxElement;

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

    @Before
    public void init() {
        openTestURL();
        comboBoxElement = $(ComboBoxElement.class).first();
    }

    @Test
    public void comboBoxPopup_popupOpen_popupFetchedSuccessfully() {
        comboBoxElement.openPopup();

        assertNotNull(comboBoxElement.getSuggestionPopup());
    }

    @Test
    public void comboBoxPopup_popupClosed_popupFetchedSuccessfully() {
        assertNotNull(comboBoxElement.getSuggestionPopup());
    }
}