blob: bae080828030b90377ebb4a4dd9732701483559b (
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
|
package com.vaadin.tests.components.grid;
import com.vaadin.testbench.elements.GridElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.interactions.Actions;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertThat;
public class GridReorderHiddenColumnsJoinedFooterTest extends MultiBrowserTest {
@Test
public void test() {
openTestURL();
GridElement grid = $(GridElement.class).get(0);
GridElement.GridCellElement headerCell1 = grid
.getHeaderCellByCaption("caption1");
GridElement.GridCellElement headerCell8 = grid
.getHeaderCellByCaption("caption8");
assertThat(grid.getHeaderCell(0, 0), is(headerCell1));
new Actions(getDriver()).clickAndHold(headerCell1)
.moveToElement(headerCell8, 2, 0).release().perform();
waitForElementNotPresent(By.className("dragged-column-header"));
assertThat(grid.getHeaderCell(0, 0), not(is(headerCell1)));
assertThat(grid.getHeaderCell(0, 0).getText(), is("caption3"));
}
}
|