aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/select/TwinColSelectCaptionStyles.java
blob: 84d73bf0922a684b92208850cf2dbf138d0bf84e (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.components.select;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.TwinColSelect;

public class TwinColSelectCaptionStyles extends TestBase {

    @Override
    protected void setup() {
        setTheme("tests-tickets");
        final TwinColSelect<String> sel = new TwinColSelect<>(
                "Component caption");
        sel.setLeftColumnCaption("Left caption");
        sel.setRightColumnCaption("Right caption");
        sel.setStyleName("styled-twincol-captions");
        sel.setWidth("300px");
        addComponent(sel);

        Button b = new Button("Set height and width to 500px", event -> {
            sel.setHeight("500px");
            sel.setWidth("500px");
        });
        addComponent(b);
    }

    @Override
    protected String getDescription() {
        return "Tests that caption styling for TwinColSelect captions work properly. The left caption should be red and the right caption blue and larger than the left one.";
    }

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

}