]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed test to work also on build server
authorArtur Signell <artur@vaadin.com>
Mon, 1 Oct 2012 18:11:49 +0000 (21:11 +0300)
committerArtur Signell <artur@vaadin.com>
Mon, 1 Oct 2012 18:11:49 +0000 (21:11 +0300)
Change-Id: I78e49ad780c75b38fb62f3880bc6b4b08c9af8b1

uitest/src/com/vaadin/tests/components/ui/UISerialization.html
uitest/src/com/vaadin/tests/components/ui/UISerialization.java

index 1eb6dffcc093b37e17b6657d44aa5210f62ce44c..2379882a2cef30df112b345252f467843a6bbb02 100644 (file)
@@ -18,7 +18,7 @@
 </tr>
 <tr>
        <td>click</td>
-       <td>vaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[3]/VButton[0]/domChild[0]/domChild[0]</td>
+       <td>vaadin=runcomvaadintestscomponentsuiUISerialization::/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VVerticalLayout[0]/VOrderedLayout$Slot[1]/VButton[0]/domChild[0]/domChild[0]</td>
        <td></td>
 </tr>
 <tr>
index 927d00a3887d800859af1d10a5f9654528681999..2f72166b11ae5a5380b6f0d90b94e6af489ccfcc 100644 (file)
@@ -24,14 +24,11 @@ import java.io.Serializable;
 import java.util.Date;
 
 import com.vaadin.server.VaadinRequest;
-import com.vaadin.tests.VaadinClasses;
 import com.vaadin.tests.components.AbstractTestUI;
 import com.vaadin.tests.util.Log;
-import com.vaadin.ui.AbstractComponent;
 import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;
-import com.vaadin.ui.Component;
 
 public class UISerialization extends AbstractTestUI {
 
@@ -40,28 +37,6 @@ public class UISerialization extends AbstractTestUI {
     @Override
     protected void setup(VaadinRequest request) {
         addComponent(log);
-        for (Class<? extends Component> cls : VaadinClasses.getComponents()) {
-            try {
-                AbstractComponent c = (AbstractComponent) cls.newInstance();
-                if (c instanceof LegacyWindow) {
-                    continue;
-                }
-                if (!(c instanceof Button)) {
-                    continue;
-                }
-
-                c.setId(cls.getName());
-                c.setCaption(cls.getName());
-                c.setDescription(cls.getName());
-                c.setWidth("100px");
-                c.setHeight("100px");
-                addComponent(c);
-                System.out.println("Added " + cls.getName());
-            } catch (Exception e) {
-                System.err.println("Could not instatiate " + cls.getName());
-            }
-        }
-
         addComponent(new Button("Serialize UI", new ClickListener() {
 
             @Override
@@ -86,27 +61,6 @@ public class UISerialization extends AbstractTestUI {
 
             }
         }));
-        addComponent(new Button(
-                "Instantiate and serialize server classes with no-arg constructors",
-                new ClickListener() {
-
-                    @Override
-                    public void buttonClick(ClickEvent event) {
-                        for (Class<?> cls : VaadinClasses
-                                .getAllServerSideClasses()) {
-                            try {
-                                serializeInstance(cls);
-                            } catch (InstantiationException e) {
-                                // No no-arg constructor probably, ignore
-                            } catch (Throwable t) {
-                                log.log("Failed to create and serialize instance of "
-                                        + cls.getName());
-                            }
-                        }
-                        log.log("Serialization done");
-
-                    }
-                }));
     }
 
     protected void serializeInstance(Class<?> cls)