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.

LeftColumnAlignmentTest.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package com.vaadin.tests.components.table;
  2. import static org.junit.Assert.assertEquals;
  3. import static org.junit.Assert.assertTrue;
  4. import org.junit.Test;
  5. import org.openqa.selenium.WebElement;
  6. import com.vaadin.testbench.By;
  7. import com.vaadin.tests.tb3.MultiBrowserTest;
  8. /**
  9. * Test class for issue #13399 : Left alignment should not be set explicitly
  10. * instead of relying on default behavior
  11. *
  12. * @author Vaadin Ltd
  13. */
  14. public class LeftColumnAlignmentTest extends MultiBrowserTest {
  15. @Test
  16. public void testLeftColumnAlignment() throws Exception {
  17. openTestURL();
  18. // Do align columns to the left
  19. WebElement webElement = driver.findElement(By.className("v-button"));
  20. webElement.click();
  21. assertTrue("Table caption is not aligned to the left", isElementPresent(
  22. By.className("v-table-caption-container-align-left")));
  23. WebElement footer = driver
  24. .findElement(By.className("v-table-footer-container"));
  25. assertEquals("Table footer is not aligned to the left", "left",
  26. footer.getCssValue("text-align"));
  27. WebElement cell = driver
  28. .findElement(By.className("v-table-cell-wrapper"));
  29. assertEquals("Table cell is not aligned to the left", "left",
  30. cell.getCssValue("text-align"));
  31. }
  32. }