summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-10-13 05:54:28 +0000
committerArtur Signell <artur.signell@itmill.com>2009-10-13 05:54:28 +0000
commit7293dd720e2cd27c0f583c3ea3f3831e9297c78b (patch)
treedb343569f7268aec0fdf07e2539d81f6e3598b4b /src/com
parentad74ab0fa585434fdd276db089ddce645ed4b27d (diff)
downloadvaadin-framework-7293dd720e2cd27c0f583c3ea3f3831e9297c78b.tar.gz
vaadin-framework-7293dd720e2cd27c0f583c3ea3f3831e9297c78b.zip
Merged multiple test updates
svn changeset:9173/svn branch:6.2
Diffstat (limited to 'src/com')
-rw-r--r--src/com/vaadin/demo/sampler/ExampleUtil.java10
-rw-r--r--src/com/vaadin/tests/components/button/ButtonUndefinedWidth.html16
-rw-r--r--src/com/vaadin/tests/components/popupview/PopupViewLabelResized.java37
-rw-r--r--src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html8
-rw-r--r--src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html20
-rw-r--r--src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html7
6 files changed, 72 insertions, 26 deletions
diff --git a/src/com/vaadin/demo/sampler/ExampleUtil.java b/src/com/vaadin/demo/sampler/ExampleUtil.java
index ca50d2a654..411e7d77eb 100644
--- a/src/com/vaadin/demo/sampler/ExampleUtil.java
+++ b/src/com/vaadin/demo/sampler/ExampleUtil.java
@@ -1,6 +1,7 @@
package com.vaadin.demo.sampler;
import java.util.Locale;
+import java.util.Random;
import com.vaadin.data.Container;
import com.vaadin.data.Item;
@@ -143,9 +144,11 @@ public final class ExampleUtil {
String.class, "");
contactContainer.addContainerProperty(PERSON_PROPERTY_LASTNAME,
String.class, "");
+
+ Random r = new Random(5);
for (int i = 0; i < 50;) {
- String fn = firstnames[(int) (Math.random() * firstnames.length)];
- String ln = lastnames[(int) (Math.random() * lastnames.length)];
+ String fn = firstnames[(int) (r.nextDouble() * firstnames.length)];
+ String ln = lastnames[(int) (r.nextDouble() * lastnames.length)];
String id = fn + ln;
Item item = contactContainer.addItem(id);
if (item != null) {
@@ -199,7 +202,8 @@ public final class ExampleUtil {
item.getItemProperty(iso3166_PROPERTY_NAME).setValue(name);
item.getItemProperty(iso3166_PROPERTY_SHORT).setValue(id);
item.getItemProperty(iso3166_PROPERTY_FLAG).setValue(
- new ThemeResource("../sampler/flags/" + id.toLowerCase() + ".gif"));
+ new ThemeResource("../sampler/flags/" + id.toLowerCase()
+ + ".gif"));
}
container.sort(new Object[] { iso3166_PROPERTY_NAME },
new boolean[] { true });
diff --git a/src/com/vaadin/tests/components/button/ButtonUndefinedWidth.html b/src/com/vaadin/tests/components/button/ButtonUndefinedWidth.html
index 7c9b3a6559..16d18d2e50 100644
--- a/src/com/vaadin/tests/components/button/ButtonUndefinedWidth.html
+++ b/src/com/vaadin/tests/components/button/ButtonUndefinedWidth.html
@@ -22,9 +22,9 @@
<td></td>
</tr>
<tr>
- <td>screenCapture</td>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
- <td>1</td>
</tr>
<tr>
<td>waitForVaadin</td>
@@ -33,7 +33,7 @@
</tr>
<tr>
<td>click</td>
- <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VNativeButton[0]</td>
<td></td>
</tr>
<tr>
@@ -43,7 +43,7 @@
</tr>
<tr>
<td>click</td>
- <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VNativeButton[0]</td>
+ <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/ScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
@@ -53,7 +53,7 @@
</tr>
<tr>
<td>click</td>
- <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/ScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/ScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[1]/VNativeButton[0]</td>
<td></td>
</tr>
<tr>
@@ -62,9 +62,9 @@
<td></td>
</tr>
<tr>
- <td>click</td>
- <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VScrollTable[0]/ScrollPanel[0]/VScrollTable$VScrollTableBody[0]/VScrollTable$VScrollTableBody$VScrollTableRow[1]/VNativeButton[0]</td>
- <td></td>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentsbuttonButtonUndefinedWidth::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/domChild[0]/domChild[2]</td>
+ <td>636,149</td>
</tr>
<tr>
<td>waitForVaadin</td>
diff --git a/src/com/vaadin/tests/components/popupview/PopupViewLabelResized.java b/src/com/vaadin/tests/components/popupview/PopupViewLabelResized.java
new file mode 100644
index 0000000000..52bdd47790
--- /dev/null
+++ b/src/com/vaadin/tests/components/popupview/PopupViewLabelResized.java
@@ -0,0 +1,37 @@
+package com.vaadin.tests.components.popupview;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.PopupView;
+
+public class PopupViewLabelResized extends TestBase {
+
+ @Override
+ protected String getDescription() {
+ return "When clicking on the popup view on the left, its size should not change.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 3483;
+ }
+
+ @Override
+ protected void setup() {
+ GridLayout gl = new GridLayout(3, 1);
+ gl.setSizeFull();
+
+ Label expander = new Label();
+ gl.addComponent(expander, 1, 0);
+ gl.setColumnExpandRatio(1, 1);
+
+ gl.addComponent(
+ new PopupView("Click here to popup", new Label("test")), 0, 0);
+ gl.addComponent(
+ new PopupView("Click here to popup", new Label("test")), 2, 0);
+
+ addComponent(gl);
+ }
+
+}
diff --git a/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html b/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html
index dd07d8cef6..e919454fc2 100644
--- a/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html
+++ b/src/com/vaadin/tests/components/tabsheet/AddAndRemoveTabs.html
@@ -92,8 +92,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Test 1<br /><br /><br /><br />Test 3<br /><br /><br /><br /><br /><br />Close tab<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Add new tab</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
<tr>
@@ -107,8 +107,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Test 1<br /><br /><br /><br />Test 3<br /><br /><br /><br />Test 4<br /><br /><br /><br /><br /><br />Close tab<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Add new tab</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
diff --git a/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html b/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html
index 07db540395..18fa4705ce 100644
--- a/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html
+++ b/src/com/vaadin/tests/components/tabsheet/RemoveTabsTabsheet.html
@@ -22,8 +22,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Tab 1<br /><br /><br /><br />Tab 2<br /><br /><br /><br />Tab 3<br /><br /><br /><br />Tab 4<br /><br /><br /><br />Tab 5<br /><br /><br /><br /><br /><br />This is the contents of tab 1<br /><br /><br /><br /><br /><br /><br /><br />close first tab<br /><br /><br />close last tab<br /><br /><br />Close current tab<br /><br /><br />reorder</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
<tr>
@@ -37,8 +37,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Tab 2<br /><br /><br /><br />Tab 3<br /><br /><br /><br />Tab 4<br /><br /><br /><br />Tab 5<br /><br /><br /><br /><br /><br />This is the contents of tab 2<br /><br /><br /><br /><br /><br /><br /><br />close first tab<br /><br /><br />close last tab<br /><br /><br />Close current tab<br /><br /><br />reorder</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
<tr>
@@ -62,8 +62,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Tab 2<br /><br /><br /><br />Tab 3<br /><br /><br /><br />Tab 5<br /><br /><br /><br /><br /><br />This is the contents of tab 2<br /><br /><br /><br /><br /><br /><br /><br />close first tab<br /><br /><br />close last tab<br /><br /><br />Close current tab<br /><br /><br />reorder</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
<tr>
@@ -77,8 +77,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Tab 5<br /><br /><br /><br />Tab 3<br /><br /><br /><br />Tab 2<br /><br /><br /><br /><br /><br />This is the contents of tab 5<br /><br /><br /><br /><br /><br /><br /><br />close first tab<br /><br /><br />close last tab<br /><br /><br />Close current tab<br /><br /><br />reorder</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
<tr>
@@ -102,8 +102,8 @@
<td></td>
</tr>
<tr>
- <td>verifyTextPresent</td>
- <td>Tab 5<br /><br /><br /><br />Tab 3<br /><br /><br /><br /><br /><br />This is the contents of tab 5<br /><br />This is the contents of tab 3<br /><br /><br /><br /><br /><br /><br /><br />close first tab<br /><br /><br />close last tab<br /><br /><br />Close current tab<br /><br /><br />reorder</td>
+ <td>screenCapture</td>
+ <td></td>
<td></td>
</tr>
diff --git a/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html b/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html
index 2c2baca773..f98482f4c7 100644
--- a/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html
+++ b/src/com/vaadin/tests/components/tree/TreeNodeCaptionWrapping.html
@@ -23,7 +23,12 @@
</tr>
<tr>
<td>verifyTextPresent</td>
- <td>1<br /><br /><br /><br /> <br />A very long item that should not wrap<br /><br /> <br />Subitem - also long</td>
+ <td>A very long item that should not wrap</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Subitem - also long</td>
<td></td>
</tr>
<tr>