summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-07-07 07:30:13 +0000
committerArtur Signell <artur.signell@itmill.com>2010-07-07 07:30:13 +0000
commitfe1496b29e4fd5d803982676bf6b07da62f094be (patch)
tree64afe6bded7af621a00c5feae69147c0f3bab212
parentc021e8c085a14f37cf48babb8bc166fc383badfc (diff)
downloadvaadin-framework-fe1496b29e4fd5d803982676bf6b07da62f094be.tar.gz
vaadin-framework-fe1496b29e4fd5d803982676bf6b07da62f094be.zip
Expanded to test non-for immediate mode
svn changeset:14113/svn branch:6.4
-rw-r--r--tests/src/com/vaadin/tests/components/table/FooterClick.html71
-rw-r--r--tests/src/com/vaadin/tests/components/table/FooterClick.java29
2 files changed, 72 insertions, 28 deletions
diff --git a/tests/src/com/vaadin/tests/components/table/FooterClick.html b/tests/src/com/vaadin/tests/components/table/FooterClick.html
index e9a5a41c50..b7d20ab5d3 100644
--- a/tests/src/com/vaadin/tests/components/table/FooterClick.html
+++ b/tests/src/com/vaadin/tests/components/table/FooterClick.html
@@ -13,60 +13,75 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.components.table.FooterClick</td>
+ <td>/run/com.vaadin.tests.components.table.FooterClick?restartApplication</td>
<td></td>
</tr>
<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>41,7</td>
+</tr>
+<tr>
+ <td>assertValue</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0]</td>
+ <td>col1</td>
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
- <td>41,7</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
+ <td>69,12</td>
</tr>
<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
+ <td>assertValue</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0]</td>
+ <td>col2</td>
</tr>
<tr>
- <td>verifyValue</td>
- <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTextField[0]</td>
- <td>col1</td>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
+ <td>19,3</td>
</tr>
<tr>
+ <td>assertValue</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0]</td>
+ <td>col3</td>
+</tr>
+<!--non-immediate-->
+<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
- <td>69,12</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VCheckBox[0]/domChild[0]</td>
+ <td>30,9</td>
</tr>
<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>56,7</td>
</tr>
<tr>
- <td>verifyValue</td>
- <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTextField[0]</td>
- <td>col2</td>
+ <td>assertValue</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0]</td>
+ <td>col1</td>
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
- <td>19,3</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[1]/domChild[0]</td>
+ <td>29,7</td>
</tr>
<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
+ <td>assertValue</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0]</td>
+ <td>col2</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[2]/domChild[0]</td>
+ <td>33,6</td>
</tr>
<tr>
- <td>verifyValue</td>
- <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTextField[0]</td>
+ <td>assertValue</td>
+ <td>vaadin=runcomvaadintestscomponentstableFooterClick::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[3]/VTextField[0]</td>
<td>col3</td>
</tr>
-
</tbody></table>
</body>
</html>
diff --git a/tests/src/com/vaadin/tests/components/table/FooterClick.java b/tests/src/com/vaadin/tests/components/table/FooterClick.java
index 07c0b83142..f6fa4a094e 100644
--- a/tests/src/com/vaadin/tests/components/table/FooterClick.java
+++ b/tests/src/com/vaadin/tests/components/table/FooterClick.java
@@ -4,8 +4,11 @@ import com.vaadin.data.Container;
import com.vaadin.data.Item;
import com.vaadin.data.util.IndexedContainer;
import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Table;
import com.vaadin.ui.TextField;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Table.FooterClickEvent;
@SuppressWarnings("serial")
@@ -23,6 +26,7 @@ public class FooterClick extends TestBase {
table.setHeight("400px");
table.setImmediate(true);
table.setFooterVisible(true);
+ table.setColumnReorderingAllowed(true);
table.setColumnFooter(COLUMN1_PROPERTY_ID, "fuu");
table.setColumnFooter(COLUMN2_PROPERTY_ID, "bar");
@@ -38,6 +42,31 @@ public class FooterClick extends TestBase {
}
});
+ CheckBox immediateCheckbox = new CheckBox("Immediate");
+ immediateCheckbox.setImmediate(true);
+ immediateCheckbox.setValue(table.isImmediate());
+ immediateCheckbox.addListener(new ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ table.setImmediate(event.getButton().booleanValue());
+ }
+ });
+
+ CheckBox columnReorderingCheckbox = new CheckBox(
+ "Column reordering allowed");
+ columnReorderingCheckbox.setImmediate(true);
+ columnReorderingCheckbox.setValue(table.isColumnReorderingAllowed());
+ columnReorderingCheckbox.addListener(new ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ table.setColumnReorderingAllowed(event.getButton()
+ .booleanValue());
+ }
+ });
+
+ addComponent(immediateCheckbox);
+ addComponent(columnReorderingCheckbox);
+
addComponent(table);
addComponent(columnField);
}