You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GridLayoutScrollPositionTest.java 875B

123456789101112131415161718192021222324252627282930313233
  1. package com.vaadin.tests.components.gridlayout;
  2. import static org.junit.Assert.assertEquals;
  3. import org.junit.Test;
  4. import org.openqa.selenium.By;
  5. import org.openqa.selenium.WebDriver;
  6. import org.openqa.selenium.WebElement;
  7. import com.vaadin.tests.tb3.MultiBrowserTest;
  8. public class GridLayoutScrollPositionTest extends MultiBrowserTest {
  9. @Test
  10. public void testToggleChildComponents() throws Exception {
  11. final int SCROLLTOP = 100;
  12. openTestURL();
  13. WebDriver driver = getDriver();
  14. WebElement ui = driver.findElement(By.className("v-ui"));
  15. testBenchElement(ui).scroll(SCROLLTOP);
  16. driver.findElement(By.id("visibility-toggle"))
  17. .findElement(By.tagName("input")).click();
  18. assertEquals("UI scroll position", String.valueOf(SCROLLTOP),
  19. ui.getAttribute("scrollTop"));
  20. }
  21. }