aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/twincolselect
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
committerArtur Signell <artur@vaadin.com>2012-08-30 17:24:36 +0300
commit7b25b3886ea95bc6495506fbe9472e45fcbde684 (patch)
tree0b93cb65dab437feb46720659a63b8f1ef48f7f4 /uitest/src/com/vaadin/tests/components/twincolselect
parent8941056349e302e687e40e94c13709e75f256d73 (diff)
downloadvaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.tar.gz
vaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.zip
Renamed tests -> uitest and tests/testbench -> uitest/src (#9299)
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/twincolselect')
-rw-r--r--uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html132
-rw-r--r--uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelects.java66
2 files changed, 198 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html b/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html
new file mode 100644
index 0000000000..a34a14eeef
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelectSelection.html
@@ -0,0 +1,132 @@
+<?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.select.TwinColSelects?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>label=5</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#add</td>
+ <td></td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>label=1</td>
+</tr>
+<tr>
+ <td>removeSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>label=4</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#add</td>
+ <td></td>
+</tr>
+<tr>
+ <td>removeSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>label=0</td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>label=8</td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>label=4</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#add</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>5148</td>
+</tr>
+<tr>
+ <td>removeSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=5</td>
+</tr>
+<tr>
+ <td>removeSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=4</td>
+</tr>
+<tr>
+ <td>removeSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=8</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#remove</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>548</td>
+</tr>
+<tr>
+ <td>removeSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=5</td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=8</td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=5</td>
+</tr>
+<tr>
+ <td>addSelection</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td>label=4</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#remove</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#rightSelect</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentsselectTwinColSelects::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTwinColSelect[0]#leftSelect</td>
+ <td>023679101112131415161718191548</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelects.java b/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelects.java
new file mode 100644
index 0000000000..fc1b11bb94
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/twincolselect/TwinColSelects.java
@@ -0,0 +1,66 @@
+package com.vaadin.tests.components.twincolselect;
+
+import java.util.LinkedHashMap;
+
+import com.vaadin.tests.components.select.AbstractSelectTestCase;
+import com.vaadin.ui.TwinColSelect;
+
+public class TwinColSelects extends AbstractSelectTestCase<TwinColSelect> {
+
+ @Override
+ protected Class<TwinColSelect> getTestClass() {
+ return TwinColSelect.class;
+ }
+
+ @Override
+ protected void createActions() {
+ super.createActions();
+ createColumnSelectAction();
+ createRowSelectAction();
+ }
+
+ private void createColumnSelectAction() {
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ options.put("-", 0);
+ for (int i = 1; i <= 10; i++) {
+ options.put(String.valueOf(i), i);
+ }
+ options.put("50", 50);
+ options.put("100", 100);
+ options.put("1000", 1000);
+
+ super.createSelectAction("Columns", CATEGORY_DATA_SOURCE, options, "-",
+ columnsAction);
+
+ }
+
+ private void createRowSelectAction() {
+ LinkedHashMap<String, Integer> options = new LinkedHashMap<String, Integer>();
+ options.put("-", 0);
+ for (int i = 1; i <= 10; i++) {
+ options.put(String.valueOf(i), i);
+ }
+ options.put("50", 50);
+ options.put("100", 100);
+ options.put("1000", 1000);
+
+ super.createSelectAction("Rows", CATEGORY_DATA_SOURCE, options, "-",
+ rowsAction);
+
+ }
+
+ private Command<TwinColSelect, Integer> columnsAction = new Command<TwinColSelect, Integer>() {
+
+ @Override
+ public void execute(TwinColSelect c, Integer value, Object data) {
+ c.setColumns(value);
+ }
+ };
+ private Command<TwinColSelect, Integer> rowsAction = new Command<TwinColSelect, Integer>() {
+
+ @Override
+ public void execute(TwinColSelect c, Integer value, Object data) {
+ c.setRows(value);
+ }
+ };
+}