aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboboxReadOnlyPasteTest.java
blob: 07e73bd95c6f46f9c8a98d1e1727f6888baf9dd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package com.vaadin.tests.components.combobox;

import com.vaadin.testbench.elements.ComboBoxElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
import org.junit.Test;
import org.openqa.selenium.Keys;

import static org.junit.Assert.assertFalse;

public class ComboboxReadOnlyPasteTest extends MultiBrowserTest {

    @Test
    public void popupNotOpened() {
        openTestURL();
        ComboBoxElement cb = $(ComboBoxElement.class).first();
        cb.click();
        String paste = Keys.chord(Keys.CONTROL, "v");
        cb.sendKeys(paste);
        assertFalse("Pop-up should not be opened in read-only mode",
                cb.isPopupOpen());
    }
}