aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/select/StylingPopupOpener.java
blob: b97231ae8eb627355a65f85abbeb41bdaf65a250 (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
39
package com.vaadin.tests.components.select;

import com.vaadin.tests.components.TestBase;
import com.vaadin.tests.util.TestUtils;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Select;

public class StylingPopupOpener extends TestBase {

    @Override
    protected void setup() {
        TestUtils
                .injectCSS(
                        getMainWindow(),
                        ".v-filterselect-mystyle .v-filterselect-button { width: 50px; background-color: red; } ");

        final Select select = new Select();
        addComponent(select);

        addComponent(new Button("Update style", new Button.ClickListener() {
            @Override
            public void buttonClick(ClickEvent event) {
                select.setStyleName("mystyle");
            }
        }));
    }

    @Override
    protected String getDescription() {
        return "VFilterSelect popup opener width is not updated when the style or theme changes";
    }

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

}