summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2010-05-28 08:25:44 +0000
committerArtur Signell <artur.signell@itmill.com>2010-05-28 08:25:44 +0000
commit5a8158ea0075cd28af0ab4bba0416568287740c5 (patch)
tree5d390fd10f38c4ceb1b96ccb87202720245fc55b
parent182ce649cd1effee90075d61e1b9ae84e68fda75 (diff)
downloadvaadin-framework-5a8158ea0075cd28af0ab4bba0416568287740c5.tar.gz
vaadin-framework-5a8158ea0075cd28af0ab4bba0416568287740c5.zip
Renamed test Ticket4582
svn changeset:13415/svn branch:6.3
-rw-r--r--tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html (renamed from tests/src/com/vaadin/tests/components/datefield/Ticket4582.html)9
-rw-r--r--tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java (renamed from tests/src/com/vaadin/tests/components/datefield/Ticket4582.java)71
2 files changed, 45 insertions, 35 deletions
diff --git a/tests/src/com/vaadin/tests/components/datefield/Ticket4582.html b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
index ff38dbc988..f2ef2123f6 100644
--- a/tests/src/com/vaadin/tests/components/datefield/Ticket4582.html
+++ b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
@@ -4,16 +4,16 @@
<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>Ticket4582</title>
+<title>DateFieldInSubWindow</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Ticket4582</td></tr>
+<tr><td rowspan="1" colspan="3">DateFieldInSubWindow</td></tr>
</thead><tbody>
<tr>
<td>open</td>
- <td>/run/com.vaadin.tests.tickets.Ticket4582?restartApplication</td>
+ <td>/run/com.vaadin.tests.components.datefield.DateFieldInSubWindow?restartApplication</td>
<td></td>
</tr>
<tr>
@@ -23,7 +23,7 @@
</tr>
<tr>
<td>click</td>
- <td>vaadin=runcomvaadinteststicketsTicket4582::/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldInSubWindow::/VVerticalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
<td></td>
</tr>
<tr>
@@ -36,7 +36,6 @@
<td></td>
<td></td>
</tr>
-
</tbody></table>
</body>
</html>
diff --git a/tests/src/com/vaadin/tests/components/datefield/Ticket4582.java b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
index f461354188..2ab16f68e9 100644
--- a/tests/src/com/vaadin/tests/components/datefield/Ticket4582.java
+++ b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
@@ -2,9 +2,9 @@ package com.vaadin.tests.components.datefield;
import java.util.Date;
-import com.vaadin.Application;
import com.vaadin.data.Item;
import com.vaadin.data.util.BeanItem;
+import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Component;
import com.vaadin.ui.DateField;
@@ -16,33 +16,33 @@ import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;
import com.vaadin.ui.Button.ClickEvent;
-public class Ticket4582 extends Application{
+public class DateFieldInSubWindow extends AbstractTestCase {
@SuppressWarnings("serial")
public class TestCaseWindow extends Window {
- public class MyBean{
- private Date myDate;
- private String myString;
+ public class MyBean {
+ private Date myDate;
+ private String myString;
- public Date getMyDate() {
- return myDate;
- }
+ public Date getMyDate() {
+ return myDate;
+ }
- public void setMyDate(Date myDate) {
- this.myDate = myDate;
- }
+ public void setMyDate(Date myDate) {
+ this.myDate = myDate;
+ }
- public String getMyString() {
- return myString;
- }
+ public String getMyString() {
+ return myString;
+ }
- public void setMyString(String myString) {
- this.myString = myString;
- }
-
-
+ public void setMyString(String myString) {
+ this.myString = myString;
}
+
+ }
+
private MyBean myBean;
public TestCaseWindow() {
@@ -51,7 +51,6 @@ public class Ticket4582 extends Application{
setWidth("400px");
myBean = new MyBean();
-
initWindow();
}
@@ -60,7 +59,8 @@ public class Ticket4582 extends Application{
public static final String COMMON_FIELD_WIDTH = "12em";
@Override
- public Field createField(Item item, Object propertyId, Component uiContext) {
+ public Field createField(Item item, Object propertyId,
+ Component uiContext) {
Field f = super.createField(item, propertyId, uiContext);
if ("myDate".equals(propertyId)) {
@@ -73,7 +73,7 @@ public class Ticket4582 extends Application{
}
}
- protected void initWindow() {
+ protected void initWindow() {
VerticalLayout layout = (VerticalLayout) getContent();
layout.setMargin(true);
layout.setSpacing(true);
@@ -89,25 +89,25 @@ public class Ticket4582 extends Application{
generalForm.setCaption("My form");
generalForm.setWriteThrough(true);
generalForm.setFormFieldFactory(fieldFactory);
-
- BeanItem<MyBean> myBeanItem = new BeanItem<MyBean>(myBean);
- generalForm.setItemDataSource(myBeanItem);
-
- generalForm.setVisibleItemProperties(new String[]{"myDate","myString"});
+
+ BeanItem<MyBean> myBeanItem = new BeanItem<MyBean>(myBean);
+ generalForm.setItemDataSource(myBeanItem);
+
+ generalForm.setVisibleItemProperties(new String[] { "myDate",
+ "myString" });
generalForm.setValidationVisible(true);
addComponent(generalForm);
}
-
HorizontalLayout buttons = new HorizontalLayout();
{
buttons.setSpacing(true);
-
Button b = new Button("Close", new Button.ClickListener() {
public void buttonClick(ClickEvent event) {
- ((Window) getParent()).removeWindow(TestCaseWindow.this);
+ ((Window) getParent())
+ .removeWindow(TestCaseWindow.this);
}
});
buttons.addComponent(b);
@@ -130,4 +130,15 @@ public class Ticket4582 extends Application{
mainWindow.addComponent(open);
}
+ @Override
+ protected String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 4582;
+ }
+
}