aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxSuggestionPopupWidthPixels.java
blob: 34144aba1f6ad03843f9ba141fdc56940c2abc05 (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
38
package com.vaadin.tests.components.combobox;

import java.util.Arrays;
import java.util.List;

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

public class ComboBoxSuggestionPopupWidthPixels extends AbstractReindeerTestUI {

    private static List<String> items = Arrays.asList("abc", "cde", "efg",
            "ghi", "ijk", "more items 1", "more items 2", "more items 3",
            "Ridicilously long item caption so we can see how the ComboBox displays ridicilously long captions in the suggestion pop-up",
            "more items 4", "more items 5", "more items 6", "more items 7");

    @Override
    protected void setup(VaadinRequest request) {
        ComboBox<String> pixels = new ComboBox<>(
                "200px wide ComboBox with 300px wide suggestion popup", items);
        pixels.addStyleName("pixels");
        pixels.setWidth("200px");
        pixels.setPopupWidth("300px");
        addComponent(pixels);

    }

    @Override
    protected String getTestDescription() {
        return "Suggestion pop-up's width should 300px";
    }

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

}