@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(new ExpectedCondition<Boolean>() {
@Override
public Boolean apply(WebDriver input) {
return panelElement.getSize().getWidth() < 500;
}
});
compareScreen("small");
}