aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/tests/components/window
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-10-19 11:09:44 +0000
committerArtur Signell <artur.signell@itmill.com>2009-10-19 11:09:44 +0000
commitb26bec94b51103a0030658691f2669bfe9c44b1c (patch)
treed539e36f51897f7f3043d897bfc0da1ad8ceab34 /src/com/vaadin/tests/components/window
parent95dad56e345c7f7f0c96e9380f5345dfac89e5d0 (diff)
downloadvaadin-framework-b26bec94b51103a0030658691f2669bfe9c44b1c.tar.gz
vaadin-framework-b26bec94b51103a0030658691f2669bfe9c44b1c.zip
Merged test case, reference images updates
svn changeset:9244/svn branch:6.2
Diffstat (limited to 'src/com/vaadin/tests/components/window')
-rw-r--r--src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html57
-rw-r--r--src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java40
2 files changed, 89 insertions, 8 deletions
diff --git a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html
index 51aabc7e8f..68bb3c5f2d 100644
--- a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html
+++ b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.html
@@ -3,7 +3,7 @@
<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="" />
+<link rel="selenium.base" href="http://localhost:8888/" />
<title>UndefinedWidthSubWindow</title>
</head>
<body>
@@ -24,7 +24,62 @@
<tr>
<td>screenCapture</td>
<td></td>
+ <td>add-button</td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>add+2 remove</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscomponentswindowUndefinedWidthSubWindow::/VWindow[0]/ScrollPanel[0]/VHorizontalLayout[0]/ChildComponentContainer[3]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForVaadin</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
<td></td>
+ <td>add-button only</td>
</tr>
</tbody></table>
diff --git a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java
index f29178a525..c8009c8431 100644
--- a/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java
+++ b/src/com/vaadin/tests/components/window/UndefinedWidthSubWindow.java
@@ -2,12 +2,18 @@ package com.vaadin.tests.components.window;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.TextField;
import com.vaadin.ui.Window;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
public class UndefinedWidthSubWindow extends TestBase {
+ private Window autoWideWindow;
+
@Override
protected String getDescription() {
return "Two windows should be shown. The width of the one in the upper left corner should be adjusted according to the contents. The centered windows width should be set according to the caption and the second textfield should be clipped.";
@@ -18,16 +24,37 @@ public class UndefinedWidthSubWindow extends TestBase {
return null;
}
+ private Component createRemoveButton() {
+ Button b = new Button("Remove");
+ b.addListener(new ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ Button b = event.getButton();
+ ComponentContainer cc = (ComponentContainer) b.getParent();
+ cc.removeComponent(b);
+ }
+ });
+
+ return b;
+ }
+
@Override
protected void setup() {
- Window dialog = new Window("Dialog - width defined by contents",
+ autoWideWindow = new Window("Dialog - width defined by contents",
new HorizontalLayout());
- dialog.getContent().setSizeUndefined();
- dialog.addComponent(new TextField("Field 1"));
- dialog.addComponent(new TextField("Field 2"));
- dialog.addComponent(new Button("Ok"));
+ autoWideWindow.getContent().setSizeUndefined();
+ autoWideWindow.addComponent(new TextField("Field 1"));
+ autoWideWindow.addComponent(new TextField("Field 2"));
+ autoWideWindow.addComponent(new Button("Add", new ClickListener() {
- getMainWindow().addWindow(dialog);
+ public void buttonClick(ClickEvent event) {
+ autoWideWindow.addComponent(createRemoveButton());
+
+ }
+
+ }));
+
+ getMainWindow().addWindow(autoWideWindow);
Window dialog2 = new Window("Dialog - width defined by caption");
dialog2.addComponent(new TextField("Field 1"));
@@ -40,5 +67,4 @@ public class UndefinedWidthSubWindow extends TestBase {
dialog2.center();
getMainWindow().addWindow(dialog2);
}
-
}