aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/components/richtextarea/RichTextAreas.java
blob: 8585d19bc25258d463871989aaf920e7415e6525 (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
40
package com.vaadin.tests.components.richtextarea;

import com.vaadin.tests.components.ComponentTestCase;
import com.vaadin.ui.RichTextArea;

public class RichTextAreas extends ComponentTestCase<RichTextArea> {

    @Override
    protected Class<RichTextArea> getTestClass() {
        return RichTextArea.class;
    }

    @Override
    protected void initializeComponents() {
        RichTextArea rta;

        rta = createRichTextArea("TextField 100% wide, 100px high");
        rta.setWidth("100%");
        rta.setHeight("100px");
        addTestComponent(rta);

        rta = createRichTextArea("TextField auto width, auto height");
        addTestComponent(rta);

        rta = createRichTextArea(null, "500px wide, 120px high textfield");
        rta.setWidth("500px");
        rta.setHeight("120px");
        addTestComponent(rta);

    }

    private RichTextArea createRichTextArea(String caption, String value) {
        return new RichTextArea(caption, value);
    }

    private RichTextArea createRichTextArea(String caption) {
        return new RichTextArea(caption);
    }

}