--- /dev/null
+package com.vaadin.tests.components.table;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.interactions.Actions;
+
+import com.vaadin.testbench.elements.TableElement;
+import com.vaadin.testbench.elements.TableHeaderElement;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class ColumnReorderingWithManyColumnsTest extends MultiBrowserTest {
+ @Test
+ public void testReordering() throws IOException {
+ openTestURL();
+ TableElement table = $(TableElement.class).first();
+ TableHeaderElement sourceCell = table.getHeaderCell(0);
+ TableHeaderElement targetCell = table.getHeaderCell(10);
+ drag(sourceCell, targetCell);
+ WebElement markedElement = table.findElement(By
+ .className("v-table-focus-slot-right"));
+ String markedColumnName = markedElement.findElement(By.xpath(".."))
+ .getText();
+ assertEquals("col-9", markedColumnName.toLowerCase());
+ }
+
+ private void drag(WebElement source, WebElement target) {
+ Actions actions = new Actions(getDriver());
+ actions.moveToElement(source, 10, 10);
+ actions.clickAndHold(source);
+ actions.moveToElement(target, 10, 10);
+ actions.perform();
+ }
+}
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head profile="http://selenium-ide.openqa.org/profiles/test-case">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="http://localhost:8068/" />
-<title>ColumnReorderingWithManyColumns</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">ColumnReorderingWithManyColumns</td></tr>
-</thead><tbody>
-<tr>
- <td>open</td>
- <td>/run/ColumnReorderingWithManyColumns?restartApplication</td>
- <td></td>
-</tr>
-<tr>
- <td>drag</td>
- <td>vaadin=runColumnReorderingWithManyColumns::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/</td>
- <td>10,10</td>
-</tr>
-<tr>
- <td>mouseMoveAt</td>
- <td>vaadin=runColumnReorderingWithManyColumns::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[10]/domChild[2]</td>
- <td>10,10</td>
-</tr>
-<tr>
- <td>screenCapture</td>
- <td></td>
- <td></td>
-</tr>
-<tr>
- <td>drop</td>
- <td>vaadin=runColumnReorderingWithManyColumns::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[10]/domChild[2]</td>
- <td>10,10</td>
-</tr>
-
-</tbody></table>
-</body>
-</html>