aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxClickIcon.java
blob: 0a9b010e8efba9fc9f06c72cec6645d25b37c621 (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
package com.vaadin.tests.components.combobox;

import com.vaadin.icons.VaadinIcons;
import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractReindeerTestUI;
import com.vaadin.ui.ComboBox;

/**
 * Test UI to check click on icon in the combobox.
 *
 * @author Vaadin Ltd
 */
public class ComboBoxClickIcon extends AbstractReindeerTestUI {

    @Override
    protected void setup(VaadinRequest request) {
        final ComboBox<String> combo = new ComboBox<>();
        combo.setItems("A", "B", "C");
        combo.setItemIconGenerator(item -> VaadinIcons.ALIGN_CENTER);
        combo.setTextInputAllowed(false);
        addComponent(combo);
    }

    @Override
    protected String getTestDescription() {
        return "Combobox icon should handle click events";
    }

    @Override
    protected Integer getTicketNumber() {
        return 14624;
    }

}