aboutsummaryrefslogtreecommitdiffstats
path: root/testbench-api/src
diff options
context:
space:
mode:
authorIlia Motornyi <elmot@vaadin.com>2018-05-08 15:11:34 +0300
committerTeemu Suo-Anttila <tsuoanttila@users.noreply.github.com>2018-05-08 15:11:34 +0300
commit7d9d37b6dd705f2de9f1c6a005b8cf3b54e7242b (patch)
tree35880a4bc5d21f0b1a365c5567a6bf985e216d45 /testbench-api/src
parent5b5792364a41ab8de28d90e26f42bbbe01ac1dac (diff)
downloadvaadin-framework-7d9d37b6dd705f2de9f1c6a005b8cf3b54e7242b.tar.gz
vaadin-framework-7d9d37b6dd705f2de9f1c6a005b8cf3b54e7242b.zip
Fix ColorPickerElement and ColorPicker test (#10903)
Diffstat (limited to 'testbench-api/src')
-rw-r--r--testbench-api/src/main/java/com/vaadin/testbench/elements/ColorPickerPreviewElement.java5
1 files changed, 2 insertions, 3 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();
}