blob: 36800cc68611de7153831d8e87108e75b3094014 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
package com.vaadin.tests.components.notification;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.interactions.Actions;
import com.vaadin.tests.tb3.MultiBrowserTest;
/**
* Test to check notification delay.
*
* @author Vaadin Ltd
*/
public class NotificationDelayTest extends MultiBrowserTest {
@Test
public void testDelay() throws InterruptedException {
openTestURL();
assertTrue("No notification found", hasNotification());
waitUntil(input -> {
new Actions(getDriver()).moveByOffset(10, 10).perform();
return !hasNotification();
});
}
private boolean hasNotification() {
return isElementPresent(By.className("v-Notification"));
}
}
|