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.

InitialFrozenColumnsTest.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.vaadin.tests.components.grid;
  2. import static org.junit.Assert.assertFalse;
  3. import static org.junit.Assert.assertTrue;
  4. import java.util.logging.Level;
  5. import org.junit.Test;
  6. import org.openqa.selenium.WebElement;
  7. import com.vaadin.testbench.elements.GridElement;
  8. import com.vaadin.testbench.elements.NotificationElement;
  9. import com.vaadin.testbench.parallel.TestCategory;
  10. import com.vaadin.tests.tb3.MultiBrowserTest;
  11. @TestCategory("grid")
  12. public class InitialFrozenColumnsTest extends MultiBrowserTest {
  13. @Test
  14. public void testInitialFrozenColumns() {
  15. setDebug(true);
  16. openTestURL();
  17. assertFalse("Notification was present",
  18. isElementPresent(NotificationElement.class));
  19. WebElement cell = $(GridElement.class).first().getCell(0, 0);
  20. assertTrue(cell.getAttribute("class").contains("frozen"));
  21. }
  22. @Test
  23. public void testInitialAllColumnsFrozen() {
  24. setDebug(true);
  25. openTestURL("frozen=3");
  26. assertFalse("Notification was present",
  27. isElementPresent(NotificationElement.class));
  28. assertNoDebugMessage(Level.SEVERE);
  29. WebElement cell = $(GridElement.class).first().getCell(0, 2);
  30. assertTrue(cell.getAttribute("class").contains("frozen"));
  31. }
  32. }