blob: 9ddee5b68f4fc12fd83ed3f6c456c44893b36016 (
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
|
package com.vaadin.tests.components.grid;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.tb3.MultiBrowserTest;
@TestCategory("grid")
public class GridDetailsReattachTest extends MultiBrowserTest {
@Before
public void setUp() {
setDebug(true);
}
@Test
public void clickToAddCaption() {
openTestURL();
assertTrue("Grid details don't exist", hasDetailsElement());
$(ButtonElement.class).first().click();
assertTrue("Grid details don't exist after deattach and reattach",
hasDetailsElement());
}
private final By locator = By.className("v-grid-spacer");
private boolean hasDetailsElement() {
return !findElements(locator).isEmpty();
}
}
|