Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

GridReorderHiddenColumnsJoinedFooterTest.java 1.2KB

12345678910111213141516171819202122232425262728293031323334
  1. package com.vaadin.tests.components.grid;
  2. import com.vaadin.testbench.elements.GridElement;
  3. import com.vaadin.tests.tb3.MultiBrowserTest;
  4. import org.junit.Test;
  5. import org.openqa.selenium.By;
  6. import org.openqa.selenium.interactions.Actions;
  7. import static org.hamcrest.CoreMatchers.is;
  8. import static org.hamcrest.CoreMatchers.not;
  9. import static org.junit.Assert.assertThat;
  10. public class GridReorderHiddenColumnsJoinedFooterTest extends MultiBrowserTest {
  11. @Test
  12. public void test() {
  13. openTestURL();
  14. GridElement grid = $(GridElement.class).get(0);
  15. GridElement.GridCellElement headerCell1 = grid
  16. .getHeaderCellByCaption("caption1");
  17. GridElement.GridCellElement headerCell8 = grid
  18. .getHeaderCellByCaption("caption8");
  19. assertThat(grid.getHeaderCell(0, 0), is(headerCell1));
  20. new Actions(getDriver()).clickAndHold(headerCell1)
  21. .moveToElement(headerCell8, 2, 0).release().perform();
  22. waitForElementNotPresent(By.className("dragged-column-header"));
  23. assertThat(grid.getHeaderCell(0, 0), not(is(headerCell1)));
  24. assertThat(grid.getHeaderCell(0, 0).getText(), is("caption3"));
  25. }
  26. }