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.

GridSingleColumnTest.java 1001B

12345678910111213141516171819202122232425262728293031323334
  1. package com.vaadin.tests.components.grid;
  2. import static org.junit.Assert.assertFalse;
  3. import static org.junit.Assert.assertTrue;
  4. import org.junit.Test;
  5. import com.vaadin.testbench.elements.GridElement;
  6. import com.vaadin.testbench.elements.GridElement.GridCellElement;
  7. import com.vaadin.testbench.elements.NotificationElement;
  8. import com.vaadin.testbench.parallel.TestCategory;
  9. import com.vaadin.tests.tb3.MultiBrowserTest;
  10. @TestCategory("grid")
  11. public class GridSingleColumnTest extends MultiBrowserTest {
  12. @Test
  13. public void testHeaderIsVisible() {
  14. openTestURL();
  15. GridCellElement cell = $(GridElement.class).first().getHeaderCell(0, 0);
  16. assertTrue("No header available",
  17. cell.getText().equalsIgnoreCase("header"));
  18. }
  19. @Test
  20. public void testScrollDidNotThrow() {
  21. setDebug(true);
  22. openTestURL();
  23. assertFalse("Exception when scrolling on init",
  24. isElementPresent(NotificationElement.class));
  25. }
  26. }