Browse Source

Fix ColorPickerElement and ColorPicker test (#10903)

tags/8.4.2
Ilia Motornyi 6 years ago
parent
commit
9873cf193b

+ 2
- 3
testbench-api/src/main/java/com/vaadin/testbench/elements/ColorPickerPreviewElement.java View File

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


+ 1
- 1
uitest/src/test/java/com/vaadin/tests/components/colorpicker/ValoColorPickerInputFormatsTest.java View File

@@ -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

Loading…
Cancel
Save