@@ -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(); | |||
} | |||
@@ -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 |