blob: 3904aa5d24f4973fec0ec891e2639b6b494c09de (
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
46
47
48
49
50
51
52
53
54
|
package com.vaadin.tests.components.grid;
import static org.junit.Assert.assertNotEquals;
import org.junit.Test;
import com.vaadin.testbench.elements.ButtonElement;
import com.vaadin.testbench.elements.GridElement;
import com.vaadin.testbench.elements.WindowElement;
import com.vaadin.testbench.parallel.TestCategory;
import com.vaadin.tests.tb3.SingleBrowserTest;
@TestCategory("grid")
public class GridColumnWidthInsideWindowCompositeContentTest
extends SingleBrowserTest {
@Test
public void widthAfterExpansion() throws InterruptedException {
openTestURL();
$(ButtonElement.class).id("open-composite").click();
GridElement grid = $(GridElement.class).first();
int initialWidth = grid.getHeaderCell(0, 0).getSize().getWidth();
WindowElement window = $(WindowElement.class).first();
window.maximize();
Thread.sleep(1000);
int newWidth = grid.getHeaderCell(0, 0).getSize().getWidth();
assertNotEquals(
"Expected Grid cell to be resized after Window was expanded",
initialWidth, newWidth);
}
@Test
public void widthAfterExpansionWithoutComposite()
throws InterruptedException {
openTestURL();
$(ButtonElement.class).id("open-non-composite").click();
GridElement grid = $(GridElement.class).first();
int initialWidth = grid.getHeaderCell(0, 0).getSize().getWidth();
WindowElement window = $(WindowElement.class).first();
window.maximize();
Thread.sleep(1000);
int newWidth = grid.getHeaderCell(0, 0).getSize().getWidth();
assertNotEquals(
"Expected Grid cell to be resized after Window was expanded",
initialWidth, newWidth);
}
}
|