blob: 542b557ad2b57ba0067fdc28b99cbde5fa6fcdb4 (
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
36
37
38
39
40
41
42
43
44
45
|
package com.vaadin.tests.smoke;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.FormElement;
import com.vaadin.testbench.elements.TextFieldElement;
import com.vaadin.tests.tb3.TooltipTest;
public class FormSmokeTest extends TooltipTest {
@Test
public void testTooltipConfiguration() throws Exception {
openTestURL();
// first name tooltip
WebElement fieldElement = $(FormElement.class).first()
.$(TextFieldElement.class).first();
checkTooltip(fieldElement, "Fields own tooltip");
clearTooltip();
checkTooltipNotPresent();
// first name caption tooltip
checkTooltip($(FormElement.class).first()
.findElement(By.className("v-caption")), "Fields own tooltip");
clearTooltip();
checkTooltipNotPresent();
// Form should not have a description tooltip
checkTooltip($(FormElement.class).first(), null);
// Form error message should not have a tooltip
checkTooltip(By.className("v-form-errormessage"), null);
// last name should have no tooltip
checkTooltip($(TextFieldElement.class).get(1), null);
// last name caption should have no tooltip
checkTooltip($(FormElement.class).first()
.findElements(By.className("v-caption")).get(1), null);
}
}
|