aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetMinimal.java
blob: 9a843ffed3fdb6f826c70964120e75e69797e764 (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.tabsheet;

import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Label;
import com.vaadin.ui.TabSheet;

public class TabSheetMinimal extends TestBase {

    int index = 1;
    TabSheet ts = new TabSheet();

    @Override
    protected void setup() {
        ts.setStyleName("minimal");
        Button b = new Button("Add a tab", event -> {
            ts.addTab(new Label("" + index), "Tab " + index, null);
            index++;
        });
        addComponent(ts);
        addComponent(b);
    }

    @Override
    protected String getDescription() {
        return "Adding tabs to a 'minimal' style TabSheet work properly even if the TabSheet is initially empty";
    }

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

}