diff options
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 |