]> source.dussan.org Git - vaadin-framework.git/commitdiff
Renamed test Ticket4582
authorArtur Signell <artur.signell@itmill.com>
Fri, 28 May 2010 08:25:44 +0000 (08:25 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 28 May 2010 08:25:44 +0000 (08:25 +0000)
svn changeset:13415/svn branch:6.3

tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html [new file with mode: 0644]
tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java [new file with mode: 0644]
tests/src/com/vaadin/tests/components/datefield/Ticket4582.html [deleted file]
tests/src/com/vaadin/tests/components/datefield/Ticket4582.java [deleted file]

diff --git a/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.html
new file mode 100644 (file)
index 0000000..f2ef212
--- /dev/null
@@ -0,0 +1,41 @@
+<?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>DateFieldInSubWindow</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">DateFieldInSubWindow</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/run/com.vaadin.tests.components.datefield.DateFieldInSubWindow?restartApplication</td>
+       <td></td>
+</tr>
+<tr>
+       <td>waitForVaadin</td>
+       <td></td>
+       <td></td>
+</tr>
+<tr>
+       <td>click</td>
+       <td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldInSubWindow::/VVerticalLayout[0]/ChildComponentContainer[0]/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></td>
+</tr>
+</tbody></table>
+</body>
+</html>
diff --git a/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java b/tests/src/com/vaadin/tests/components/datefield/DateFieldInSubWindow.java
new file mode 100644 (file)
index 0000000..2ab16f6
--- /dev/null
@@ -0,0 +1,144 @@
+package com.vaadin.tests.components.datefield;
+
+import java.util.Date;
+
+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;
+import com.vaadin.ui.DefaultFieldFactory;
+import com.vaadin.ui.Field;
+import com.vaadin.ui.Form;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Button.ClickEvent;
+
+public class DateFieldInSubWindow extends AbstractTestCase {
+
+    @SuppressWarnings("serial")
+    public class TestCaseWindow extends Window {
+
+        public class MyBean {
+            private Date myDate;
+            private String myString;
+
+            public Date getMyDate() {
+                return myDate;
+            }
+
+            public void setMyDate(Date myDate) {
+                this.myDate = myDate;
+            }
+
+            public String getMyString() {
+                return myString;
+            }
+
+            public void setMyString(String myString) {
+                this.myString = myString;
+            }
+
+        }
+
+        private MyBean myBean;
+
+        public TestCaseWindow() {
+            super("Test Case Window");
+            setModal(true);
+            setWidth("400px");
+            myBean = new MyBean();
+
+            initWindow();
+        }
+
+        protected class CustomerFieldFactory extends DefaultFieldFactory {
+
+            public static final String COMMON_FIELD_WIDTH = "12em";
+
+            @Override
+            public Field createField(Item item, Object propertyId,
+                    Component uiContext) {
+                Field f = super.createField(item, propertyId, uiContext);
+
+                if ("myDate".equals(propertyId)) {
+                    ((DateField) f).setResolution(DateField.RESOLUTION_MIN);
+                    ((DateField) f).setCaption("This is my date");
+
+                }
+
+                return f;
+            }
+        }
+
+        protected void initWindow() {
+            VerticalLayout layout = (VerticalLayout) getContent();
+            layout.setMargin(true);
+            layout.setSpacing(true);
+
+            /**
+             * This causes the window to add the .v-readonly style!
+             */
+            setClosable(false);
+
+            CustomerFieldFactory fieldFactory = new CustomerFieldFactory();
+            final Form generalForm = new Form();
+            {
+                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" });
+                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);
+                    }
+                });
+                buttons.addComponent(b);
+                layout.addComponent(buttons);
+
+            }
+        }
+    }
+
+    @Override
+    public void init() {
+        Window mainWindow = new Window();
+        setMainWindow(mainWindow);
+        Button open = new Button("Open window", new Button.ClickListener() {
+            public void buttonClick(ClickEvent event) {
+                getMainWindow().addWindow(new TestCaseWindow());
+            }
+        });
+
+        mainWindow.addComponent(open);
+    }
+
+    @Override
+    protected String getDescription() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    protected Integer getTicketNumber() {
+        return 4582;
+    }
+
+}
diff --git a/tests/src/com/vaadin/tests/components/datefield/Ticket4582.html b/tests/src/com/vaadin/tests/components/datefield/Ticket4582.html
deleted file mode 100644 (file)
index ff38dbc..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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>Ticket4582</title>
-</head>
-<body>
-<table cellpadding="1" cellspacing="1" border="1">
-<thead>
-<tr><td rowspan="1" colspan="3">Ticket4582</td></tr>
-</thead><tbody>
-<tr>
-       <td>open</td>
-       <td>/run/com.vaadin.tests.tickets.Ticket4582?restartApplication</td>
-       <td></td>
-</tr>
-<tr>
-       <td>waitForVaadin</td>
-       <td></td>
-       <td></td>
-</tr>
-<tr>
-       <td>click</td>
-       <td>vaadin=runcomvaadinteststicketsTicket4582::/VVerticalLayout[0]/ChildComponentContainer[0]/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></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/Ticket4582.java
deleted file mode 100644 (file)
index f461354..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-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.ui.Button;
-import com.vaadin.ui.Component;
-import com.vaadin.ui.DateField;
-import com.vaadin.ui.DefaultFieldFactory;
-import com.vaadin.ui.Field;
-import com.vaadin.ui.Form;
-import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.VerticalLayout;
-import com.vaadin.ui.Window;
-import com.vaadin.ui.Button.ClickEvent;
-
-public class Ticket4582 extends Application{
-
-    @SuppressWarnings("serial")
-    public class TestCaseWindow extends Window {
-
-            public class MyBean{
-                    private Date myDate;
-                    private String myString;
-
-                    public Date getMyDate() {
-                            return myDate;
-                    }
-
-                    public void setMyDate(Date myDate) {
-                            this.myDate = myDate;
-                    }
-
-                    public String getMyString() {
-                            return myString;
-                    }
-
-                    public void setMyString(String myString) {
-                            this.myString = myString;
-                    }
-                    
-                    
-            }
-        private MyBean myBean;
-
-        public TestCaseWindow() {
-            super("Test Case Window");
-            setModal(true);
-            setWidth("400px");
-            myBean = new MyBean();
-
-
-            initWindow();
-        }
-
-        protected class CustomerFieldFactory extends DefaultFieldFactory {
-
-            public static final String COMMON_FIELD_WIDTH = "12em";
-
-            @Override
-            public Field createField(Item item, Object propertyId, Component uiContext) {
-                Field f = super.createField(item, propertyId, uiContext);
-
-                if ("myDate".equals(propertyId)) {
-                    ((DateField) f).setResolution(DateField.RESOLUTION_MIN);
-                    ((DateField) f).setCaption("This is my date");
-
-                }
-
-                return f;
-            }
-        }
-
-            protected void initWindow() {
-            VerticalLayout layout = (VerticalLayout) getContent();
-            layout.setMargin(true);
-            layout.setSpacing(true);
-
-            /**
-             * This causes the window to add the .v-readonly style!
-             */
-            setClosable(false);
-
-            CustomerFieldFactory fieldFactory = new CustomerFieldFactory();
-            final Form generalForm = new Form();
-            {
-                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"});
-                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);
-                    }
-                });
-                buttons.addComponent(b);
-                layout.addComponent(buttons);
-
-            }
-        }
-    }
-
-    @Override
-    public void init() {
-        Window mainWindow = new Window();
-        setMainWindow(mainWindow);
-        Button open = new Button("Open window", new Button.ClickListener() {
-            public void buttonClick(ClickEvent event) {
-                getMainWindow().addWindow(new TestCaseWindow());
-            }
-        });
-
-        mainWindow.addComponent(open);
-    }
-
-}