use of com.vaadin.flow.testutil.DevModeGizmoElement in project flow by vaadin.
the class JavaLiveReloadIT method splashMessageShownOnAutoReloadAndClosedOnBodyClick.
@Test
public void splashMessageShownOnAutoReloadAndClosedOnBodyClick() {
open();
WebElement liveReloadTrigger = findElement(By.id(JavaLiveReloadView.JAVA_LIVE_RELOAD_TRIGGER_BUTTON));
liveReloadTrigger.click();
waitForLiveReload();
DevModeGizmoElement liveReload = $(DevModeGizmoElement.class).waitForFirst();
WebElement gizmo1 = liveReload.$("*").attributeContains("class", "gizmo").first();
Assert.assertTrue(gizmo1.getAttribute("class").contains("active"));
findElement(By.tagName("body")).click();
DevModeGizmoElement liveReload2 = $(DevModeGizmoElement.class).waitForFirst();
Assert.assertNotNull(liveReload2);
WebElement gizmo2 = liveReload2.$("*").attributeContains("class", "gizmo").first();
Assert.assertFalse(gizmo2.getAttribute("class").contains("active"));
Assert.assertTrue(gizmo2.getAttribute("class").contains("gizmo"));
}
use of com.vaadin.flow.testutil.DevModeGizmoElement in project flow by vaadin.
the class JavaLiveReloadIT method deactivateLiveReload.
@Test
public void deactivateLiveReload() {
open();
// given: live reload is deactivated
DevModeGizmoElement gizmo = $(DevModeGizmoElement.class).waitForFirst();
gizmo.setLiveReload(false);
// when: live reload is triggered
WebElement liveReloadTrigger = findElement(By.id(JavaLiveReloadView.JAVA_LIVE_RELOAD_TRIGGER_BUTTON));
liveReloadTrigger.click();
// then: page is not reloaded
DevModeGizmoElement liveReload2 = $(DevModeGizmoElement.class).waitForFirst();
WebElement gizmo2 = liveReload2.$("*").attributeContains("class", "gizmo").first();
Assert.assertFalse(gizmo2.getAttribute("class").contains("active"));
Assert.assertTrue(gizmo2.getAttribute("class").contains("gizmo"));
}
use of com.vaadin.flow.testutil.DevModeGizmoElement in project flow by vaadin.
the class BasicsIT method debugWindowShown.
@Test
public void debugWindowShown() {
DevModeGizmoElement gizmo = $(DevModeGizmoElement.class).waitForFirst();
gizmo.expand();
Assert.assertNotNull(gizmo.$("div").attributeContains("class", "window").attributeContains("class", "visible").waitForFirst());
}
Aggregations