diff options
author | Ilia Motornyi <elmot@vaadin.com> | 2018-05-08 15:11:34 +0300 |
---|---|---|
committer | Teemu Suo-Anttila <tsuoanttila@users.noreply.github.com> | 2018-05-08 15:11:34 +0300 |
commit | 7d9d37b6dd705f2de9f1c6a005b8cf3b54e7242b (patch) | |
tree | 35880a4bc5d21f0b1a365c5567a6bf985e216d45 | |
parent | 5b5792364a41ab8de28d90e26f42bbbe01ac1dac (diff) | |
download | vaadin-framework-7d9d37b6dd705f2de9f1c6a005b8cf3b54e7242b.tar.gz vaadin-framework-7d9d37b6dd705f2de9f1c6a005b8cf3b54e7242b.zip |
Fix ColorPickerElement and ColorPicker test (#10903)
2 files changed, 3 insertions, 4 deletions
diff --git a/testbench-api/src/main/java/com/vaadin/testbench/elements/ColorPickerPreviewElement.java b/testbench-api/src/main/java/com/vaadin/testbench/elements/ColorPickerPreviewElement.java index 632052e632..42f162fe11 100644 --- a/testbench-api/src/main/java/com/vaadin/testbench/elements/ColorPickerPreviewElement.java +++ b/testbench-api/src/main/java/com/vaadin/testbench/elements/ColorPickerPreviewElement.java @@ -36,9 +36,8 @@ public class ColorPickerPreviewElement extends CssLayoutElement { public boolean getColorFieldContainsErrors() { List<WebElement> caption = findElements( By.className("v-caption-v-colorpicker-preview-textfield")); - boolean noCaption = caption.isEmpty(); - return noCaption ? noCaption - : caption.get(0).findElements(By.className("v-errorindicator")) + return !caption.isEmpty() && + !caption.get(0).findElements(By.className("v-errorindicator")) .isEmpty(); } diff --git a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java index e2dda5a87e..5c4207ddc4 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java @@ -77,7 +77,7 @@ public class ValoColorPickerInputFormatsTest extends MultiBrowserTest { public void testHSLAValue() { setColorpickerValue("hsla(120, 0, 50%, 0.3)"); - assertEquals("#00ff00", previewElement.getColorFieldValue()); + assertEquals("#808080", previewElement.getColorFieldValue()); } @Test |