use of com.vaadin.flow.component.html.testbench.DivElement in project flow by vaadin.
the class ElementInnerHtmlIT method setInnerHtmlAfterChangeVisibility.
@Test
public void setInnerHtmlAfterChangeVisibility() {
open();
DivElement innerHtml = $(DivElement.class).id("inner-html-field");
$(NativeButtonElement.class).id("set-foo").click();
Assert.assertEquals("<p>Foo</p>", innerHtml.getPropertyString("innerHTML"));
$(NativeButtonElement.class).id("toggle-visibility").click();
$(NativeButtonElement.class).id("set-boo").click();
$(NativeButtonElement.class).id("set-foo").click();
$(NativeButtonElement.class).id("toggle-visibility").click();
Assert.assertEquals("<p>Foo</p>", innerHtml.getPropertyString("innerHTML"));
}
use of com.vaadin.flow.component.html.testbench.DivElement in project flow by vaadin.
the class ElementStyleIT method customPropertiesWork.
@Test
public void customPropertiesWork() {
open();
DivElement red = $(DivElement.class).id("red-border");
DivElement green = $(DivElement.class).id("green-border");
Assert.assertEquals(ElementStyleView.RED_BORDER, executeScript("return getComputedStyle(arguments[0]).border", red));
Assert.assertEquals(ElementStyleView.GREEN_BORDER, executeScript("return getComputedStyle(arguments[0]).border", green));
}
Aggregations