diff options
author | Anastasia Smirnova <anasmi@utu.fi> | 2018-04-10 13:51:51 +0300 |
---|---|---|
committer | Ilia Motornyi <elmot@vaadin.com> | 2018-04-10 13:51:51 +0300 |
commit | a2bd03aaf44ae0b335aa9ddcb592c81a9647cc70 (patch) | |
tree | 71984e007a7ef06e494c8e827cb7617012c1abba /uitest/src/main/java | |
parent | 1121d795b6356baad0f7eba2a78fc4918ed93a01 (diff) | |
download | vaadin-framework-a2bd03aaf44ae0b335aa9ddcb592c81a9647cc70.tar.gz vaadin-framework-a2bd03aaf44ae0b335aa9ddcb592c81a9647cc70.zip |
Added support for getValue and setValue into TestBench RichTextAreaElement (#10659)
Diffstat (limited to 'uitest/src/main/java')
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java | 15 | ||||
-rw-r--r-- | uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractTextElementSetValue.java | 8 |
2 files changed, 19 insertions, 4 deletions
diff --git a/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java b/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java index 3c06ae4c11..2b00ca7d1d 100644 --- a/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java +++ b/uitest/src/main/java/com/vaadin/tests/elements/ComponentElementGetValue.java @@ -22,11 +22,13 @@ import com.vaadin.ui.Slider; import com.vaadin.ui.TextArea; import com.vaadin.ui.TextField; import com.vaadin.ui.TwinColSelect; +import com.vaadin.ui.RichTextArea; + /** * UI test for getValue() method of components: TextField, TextArea, * PasswordField, ComboBox, ListSelect, NativeSelect, OptionGroup, CheckBox, - * DateField, TwinColSelect + * DateField, TwinColSelect, RichTextArea * * @author Vaadin Ltd */ @@ -34,9 +36,8 @@ public class ComponentElementGetValue extends AbstractTestUI { public static final String TEST_STRING_VALUE = "item 2"; public static final int TEST_SLIDER_VALUE = 42; - public static final float TEST_FLOAT_VALUE = 0.42f; public static final LocalDate TEST_DATE_VALUE = LocalDate.now(); - DateField df; + public static final String TESTGET_STRING_VALUE_RICHTEXTAREA = "value 4"; final Label valueChangeLabel = new Label("Initial value"); // These constants are used to check that change value event was @@ -105,7 +106,7 @@ public class ComponentElementGetValue extends AbstractTestUI { event -> valueChangeLabel.setValue(value)); addComponent(field); } - + addComponent(createRichTextArea()); addComponent(createCheckBox()); addComponent(createSlider()); addComponent(createDateField()); @@ -137,6 +138,12 @@ public class ComponentElementGetValue extends AbstractTestUI { return cb; } + private RichTextArea createRichTextArea() { + RichTextArea rta = new RichTextArea(); + rta.setValue(TESTGET_STRING_VALUE_RICHTEXTAREA); + return rta; + } + @Override protected String getTestDescription() { return "Field elements getValue() should return test value"; diff --git a/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractTextElementSetValue.java b/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractTextElementSetValue.java index 97abfd1be6..8d724f4bfb 100644 --- a/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractTextElementSetValue.java +++ b/uitest/src/main/java/com/vaadin/tests/elements/abstracttextfield/AbstractTextElementSetValue.java @@ -11,6 +11,7 @@ import com.vaadin.ui.Label; import com.vaadin.ui.PasswordField; import com.vaadin.ui.TextArea; import com.vaadin.ui.TextField; +import com.vaadin.ui.RichTextArea; public class AbstractTextElementSetValue extends AbstractTestUI { @@ -33,6 +34,7 @@ public class AbstractTextElementSetValue extends AbstractTestUI { addValueChangeListener(comps[i], i); addComponent(comps[i]); addComponent(eventCountLabels[i]); + addComponent(createRichTextArea()); } @@ -61,6 +63,12 @@ public class AbstractTextElementSetValue extends AbstractTestUI { return df; } + private RichTextArea createRichTextArea() { + RichTextArea rta = new RichTextArea(); + rta.setValue(INITIAL_VALUE); + return rta; + } + @Override protected String getTestDescription() { return "Test type method of AbstractTextField components"; |