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.

DndTableTargetDetailsTest.java 986B

1234567891011121314151617181920212223242526272829303132333435363738
  1. package com.vaadin.tests.components.table;
  2. import static org.junit.Assert.assertEquals;
  3. import java.io.IOException;
  4. import org.junit.Test;
  5. import org.openqa.selenium.WebElement;
  6. import com.vaadin.testbench.By;
  7. import com.vaadin.tests.tb3.DndActionsTest;
  8. /**
  9. * Test for mouse details in AbstractSelectTargetDetails class when DnD target
  10. * is a table.
  11. *
  12. * @author Vaadin Ltd
  13. */
  14. public class DndTableTargetDetailsTest extends DndActionsTest {
  15. @Test
  16. public void testMouseDetails() throws IOException, InterruptedException {
  17. openTestURL();
  18. WebElement row = findElement(By.className("v-table-cell-wrapper"));
  19. dragAndDrop(row, getTarget());
  20. WebElement label = findElement(By.className("dnd-button-name"));
  21. assertEquals("Button name=left", label.getText());
  22. }
  23. protected WebElement getTarget() {
  24. return findElement(By.className("target"))
  25. .findElement(By.className("v-table-cell-wrapper"));
  26. }
  27. }