blob: 4bc725d96c7706334043ac155faaaafb3c2a868f (
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
|
package com.vaadin.tests.extensions;
import org.junit.Test;
import com.vaadin.testbench.By;
import com.vaadin.testbench.elements.PanelElement;
import com.vaadin.tests.tb3.MultiBrowserTest;
public class ResponsiveLayoutUpdateTest extends MultiBrowserTest {
@Test
public void testWidthAndHeightRanges() throws Exception {
openTestURL();
final PanelElement panelElement = $(PanelElement.class).first();
// I currently have no idea why PhantomJS wants a click here to work
// properly
panelElement.click();
waitForElementVisible(By.cssSelector(".layout-update"));
compareScreen("large");
// Resize below 600px width breakpoint
testBench().resizeViewPortTo(400, 768);
waitUntil(input -> panelElement.getSize().getWidth() < 500);
compareScreen("small");
}
}
|