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.

HeaderPositionWhenSortingTest.java 934B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package com.vaadin.tests.components.table;
  2. import java.io.IOException;
  3. import org.junit.Test;
  4. import com.vaadin.testbench.TestBenchElement;
  5. import com.vaadin.testbench.elements.TableElement;
  6. import com.vaadin.tests.tb3.MultiBrowserTest;
  7. /**
  8. * Tests Table Footer ClickListener
  9. *
  10. * @author Vaadin Ltd
  11. */
  12. public class HeaderPositionWhenSortingTest extends MultiBrowserTest {
  13. @Test
  14. public void testFooter() throws IOException {
  15. openTestURL();
  16. TableElement table = $(TableElement.class).first();
  17. TestBenchElement header1 = table.getHeaderCell(1);
  18. header1.click();
  19. compareScreen("sort-asc-died-at-age");
  20. header1.click();
  21. compareScreen("sort-desc-died-at-age");
  22. TestBenchElement header0 = table.getHeaderCell(0);
  23. header0.click();
  24. compareScreen("sort-asc-name");
  25. header0.click();
  26. compareScreen("sort-desc-name");
  27. }
  28. }