aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/test/java/com/vaadin/tests/components/table/DndEmptyTableTest.java
blob: b0e0f72a33472f4255292383e36978e6af292ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.vaadin.tests.components.table;

import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;

import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.MultiBrowserTest;

/**
 * Test for empty table as a DnD target: it should not throws client side
 * exception.
 *
 * @author Vaadin Ltd
 */
public class DndEmptyTableTest extends MultiBrowserTest {

    @Test
    public void testDndEmptyTable() {
        setDebug(true);
        openTestURL();

        WebElement source = driver.findElement(By.className("v-ddwrapper"));
        WebElement target = driver.findElement(By.className("v-table-body"));
        Actions actions = new Actions(driver);
        actions.clickAndHold(source).moveToElement(target).release();

        assertNoErrorNotifications();
    }

}