]> source.dussan.org Git - vaadin-framework.git/commitdiff
Test for sorting Labels in a Table (#8845)
authorArtur Signell <artur@vaadin.com>
Mon, 25 Jun 2012 11:29:52 +0000 (14:29 +0300)
committerArtur Signell <artur@vaadin.com>
Mon, 25 Jun 2012 11:29:52 +0000 (14:29 +0300)
tests/testbench/com/vaadin/tests/components/table/SortLabelsInTable.html [new file with mode: 0644]
tests/testbench/com/vaadin/tests/components/table/SortLabelsInTable.java [new file with mode: 0644]

diff --git a/tests/testbench/com/vaadin/tests/components/table/SortLabelsInTable.html b/tests/testbench/com/vaadin/tests/components/table/SortLabelsInTable.html
new file mode 100644 (file)
index 0000000..51f13af
--- /dev/null
@@ -0,0 +1,192 @@
+<?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="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/run/com.vaadin.tests.components.table.SortLabelsInTable?restartApplication</td>
+       <td></td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+       <td>Text 0</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VLabel[0]</td>
+       <td>Label 0</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[14]/domChild[0]/domChild[0]</td>
+       <td>Text 14</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[14]/VLabel[0]</td>
+       <td>Label 14</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td>
+       <td>22,11</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+       <td>Text 0</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]</td>
+       <td>Text 10</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[14]/domChild[0]/domChild[0]</td>
+       <td>Text 4</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VLabel[0]</td>
+       <td>Label 0</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[2]/VLabel[0]</td>
+       <td>Label 10</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[11]/VLabel[0]</td>
+       <td>Label 19</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[14]/VLabel[0]</td>
+       <td>Label 4</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]</td>
+       <td>14,3</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+       <td>Text 9</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[8]/domChild[0]/domChild[0]</td>
+       <td>Text 19</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[14]/domChild[0]/domChild[0]</td>
+       <td>Text 13</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VLabel[0]</td>
+       <td>Label 9</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[8]/VLabel[0]</td>
+       <td>Label 19</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[14]/VLabel[0]</td>
+       <td>Label 13</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[2]</td>
+       <td>28,13</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+       <td>Text 9</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[8]/domChild[0]/domChild[0]</td>
+       <td>Text 19</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[14]/domChild[0]/domChild[0]</td>
+       <td>Text 13</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VLabel[0]</td>
+       <td>Label 9</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[8]/VLabel[0]</td>
+       <td>Label 19</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[14]/VLabel[0]</td>
+       <td>Label 13</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[2]</td>
+       <td>26,9</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+       <td>Text 0</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]</td>
+       <td>Text 10</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[14]/domChild[0]/domChild[0]</td>
+       <td>Text 4</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VLabel[0]</td>
+       <td>Label 0</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[2]/VLabel[0]</td>
+       <td>Label 10</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[11]/VLabel[0]</td>
+       <td>Label 19</td>
+</tr>
+<tr>
+       <td>assertText</td>
+       <td>vaadin=runcomvaadintestscomponentstableSortLabelsInTable::/VVerticalLayout[0]/VVerticalLayout[0]/VScrollTable[0]/FocusableScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[14]/VLabel[0]</td>
+       <td>Label 4</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/table/SortLabelsInTable.java b/tests/testbench/com/vaadin/tests/components/table/SortLabelsInTable.java
new file mode 100644 (file)
index 0000000..d46b9bf
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+@VaadinApache2LicenseForJavaFiles@
+ */
+package com.vaadin.tests.components.table;
+
+import com.vaadin.data.Item;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Table;
+
+public class SortLabelsInTable extends TestBase {
+
+    @Override
+    protected void setup() {
+        Table t = new Table("A table with a text column and a Label column");
+        t.addContainerProperty("text", String.class, null);
+        t.addContainerProperty("label", Label.class, null);
+
+        for (int i = 0; i < 20; i++) {
+            Item item = t.addItem("" + i);
+            item.getItemProperty("text").setValue("Text " + i);
+            item.getItemProperty("label").setValue(new Label("Label " + i));
+        }
+        addComponent(t);
+    }
+
+    @Override
+    protected String getDescription() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 8845;
+    }
+
+}