use of com.vaadin.testbench.TestBenchElement in project flow by vaadin.
the class AbstractUpdateDivIT method getUpdateCount.
private int getUpdateCount() {
TestBenchElement div = $(TestBenchElement.class).id("push-update");
String count = div.getText();
return Integer.parseInt(count);
}
use of com.vaadin.testbench.TestBenchElement in project flow by vaadin.
the class CompositeIT method htmlImportOfContentLoaded.
@Test
public void htmlImportOfContentLoaded() {
open();
waitForElementPresent(By.id(CompositeView.COMPOSITE_PAPER_SLIDER));
TestBenchElement paperSlider = (TestBenchElement) findElement(By.id(CompositeView.COMPOSITE_PAPER_SLIDER));
Assert.assertEquals("100", paperSlider.getPropertyString("max"));
}
use of com.vaadin.testbench.TestBenchElement in project flow by vaadin.
the class CustomCustomElementIT method clickOnButton_removeFromLayout.
@Test
public void clickOnButton_removeFromLayout() {
TestBenchElement customElement = $("custom-custom-element").first();
Assert.assertEquals("initial", customElement.getPropertyString("shadowRoot", "textContent"));
findElement(By.tagName("button")).click();
Assert.assertEquals("updated", customElement.getPropertyString("shadowRoot", "textContent"));
}
use of com.vaadin.testbench.TestBenchElement in project flow by vaadin.
the class DnDIT method testCopyEffectElement_droppedToDeactivatedLane_noDrop.
@Test
public void testCopyEffectElement_droppedToDeactivatedLane_noDrop() {
open();
TestBenchElement boxElement = getBoxElement("COPY");
dragBoxToLanes(boxElement, getLaneElement("COPY"), true);
dragBoxToLanes(boxElement, getLaneElement("deactivated"), false);
}
use of com.vaadin.testbench.TestBenchElement in project flow by vaadin.
the class DnDIT method testCopyEffectElement_disableElement_draggedNotPresent.
@Test
public void testCopyEffectElement_disableElement_draggedNotPresent() {
open();
TestBenchElement boxElement = getBoxElement("COPY");
clickElementWithJs("button-disable-enable-drag-sources");
Assert.assertTrue("Invalid enabled state found in drag source", boxElement.hasAttribute("disabled"));
clearEvents();
drag(boxElement);
Assert.assertFalse(boxElement.hasClassName("v-dragged"));
}
Aggregations