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.

TreeTableOutOfSyncTest.java 1.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package com.vaadin.tests.components.treetable;
  2. import static org.junit.Assert.assertTrue;
  3. import java.util.List;
  4. import org.junit.Test;
  5. import org.openqa.selenium.By;
  6. import org.openqa.selenium.WebElement;
  7. import com.vaadin.testbench.elements.TreeTableElement;
  8. import com.vaadin.tests.tb3.MultiBrowserTest;
  9. /**
  10. * Tests that opening the root node and clicking a generated component doesn't
  11. * cause out of sync (or any other system notifications).
  12. *
  13. * @author Vaadin Ltd
  14. */
  15. public class TreeTableOutOfSyncTest extends MultiBrowserTest {
  16. @Test
  17. public void testNotification() throws InterruptedException {
  18. openTestURL();
  19. TreeTableElement treeTable = $(TreeTableElement.class).first();
  20. List<WebElement> rows = treeTable
  21. .findElement(By.className("v-table-body"))
  22. .findElements(By.tagName("tr"));
  23. WebElement treeSpacer = rows.get(0)
  24. .findElement(By.className("v-treetable-treespacer"));
  25. treeSpacer.click();
  26. sleep(100);
  27. rows = treeTable.findElement(By.className("v-table-body"))
  28. .findElements(By.tagName("tr"));
  29. WebElement button = rows.get(2).findElement(By.className("v-button"));
  30. button.click();
  31. List<WebElement> notifications = findElements(
  32. By.className("v-Notification-system"));
  33. assertTrue(notifications.isEmpty());
  34. }
  35. }