]> source.dussan.org Git - vaadin-framework.git/commitdiff
Merged tests and fixes from 6.5
authorArtur Signell <artur.signell@itmill.com>
Fri, 8 Apr 2011 12:31:23 +0000 (12:31 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 8 Apr 2011 12:31:23 +0000 (12:31 +0000)
svn changeset:18184/svn branch:6.6

src/com/vaadin/terminal/gwt/server/AbstractApplicationServlet.java
src/com/vaadin/ui/AbstractTextField.java
tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html [new file with mode: 0644]
tests/integration_tests.xml
tests/src/com/vaadin/tests/components/window/WindowClickEvents.html
tests/src/com/vaadin/tests/components/window/WindowClickEvents.java

index 668f3892a00fdc47ee21a31cc5d4bec1baa02a48..7af2159dc06e402052daf7f3317ee6bca2887369 100644 (file)
@@ -1564,14 +1564,17 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
      * If one needs to override parts of the host page, it is suggested that one
      * overrides on of several submethods which are called by this method:
      * <ul>
-     * <li> {@link #setAjaxPageHeaders(HttpServletResponse)
-     * <li> {@link #writeAjaxPageHtmlHeadStart(BufferedWriter, HttpServletRequest)
-     * <li> {@link #writeAjaxPageHtmlHeader(BufferedWriter, String, String, HttpServletRequest)
-     * <li> {@link #writeAjaxPageHtmlBodyStart(BufferedWriter, HttpServletRequest)
+     * <li> {@link #setAjaxPageHeaders(HttpServletResponse)}
      * <li>
-     * {@link #writeAjaxPageHtmlVaadinScripts(Window, String, Application, BufferedWriter, String, String, String, HttpServletRequest)
+     * {@link #writeAjaxPageHtmlHeadStart(BufferedWriter, HttpServletRequest)}
      * <li>
-     * {@link #writeAjaxPageHtmlMainDiv(BufferedWriter, String, String, String, HttpServletRequest)
+     * {@link #writeAjaxPageHtmlHeader(BufferedWriter, String, String, HttpServletRequest)}
+     * <li>
+     * {@link #writeAjaxPageHtmlBodyStart(BufferedWriter, HttpServletRequest)}
+     * <li>
+     * {@link #writeAjaxPageHtmlVaadinScripts(Window, String, Application, BufferedWriter, String, String, String, HttpServletRequest)}
+     * <li>
+     * {@link #writeAjaxPageHtmlMainDiv(BufferedWriter, String, String, String, HttpServletRequest)}
      * <li> {@link #writeAjaxPageHtmlBodyEnd(BufferedWriter)}
      * </ul>
      * 
@@ -1660,8 +1663,7 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
                     + getDefaultTheme().replaceAll("[^a-zA-Z0-9]", "");
         }
 
-        String classNames = "v-app " + themeClass + " "
-                + appClass;
+        String classNames = "v-app " + themeClass + " " + appClass;
 
         String divStyle = null;
         if (request.getAttribute(REQUEST_APPSTYLE) != null) {
@@ -1737,12 +1739,12 @@ public abstract class AbstractApplicationServlet extends HttpServlet implements
      * @param appId
      * @param classNames
      * @param divStyle
-     * @param request 
+     * @param request
      * @throws IOException
      */
     protected void writeAjaxPageHtmlMainDiv(final BufferedWriter page,
-            String appId, String classNames, String divStyle, HttpServletRequest request)
-            throws IOException {
+            String appId, String classNames, String divStyle,
+            HttpServletRequest request) throws IOException {
         page.write("<div id=\"" + appId + "\" class=\"" + classNames + "\" "
                 + (divStyle != null ? divStyle : "") + ">");
         page.write("<div class=\"v-app-loading\"></div>");
index cd9d99de18111442e5604cb35872d14cd340eb08..ad31a461579f5744c1801ffc6c3d5e271a61f61b 100644 (file)
@@ -306,6 +306,7 @@ public abstract class AbstractTextField extends AbstractField implements
      */
     public void setNullRepresentation(String nullRepresentation) {
         this.nullRepresentation = nullRepresentation;
+        requestRepaint();
     }
 
     /**
@@ -325,12 +326,13 @@ public abstract class AbstractTextField extends AbstractField implements
      * </p>
      * 
      * @param nullSettingAllowed
-     *            Should the null-string represenation be always converted to
+     *            Should the null-string representation always be converted to
      *            null-values.
      * @see TextField#getNullRepresentation()
      */
     public void setNullSettingAllowed(boolean nullSettingAllowed) {
         this.nullSettingAllowed = nullSettingAllowed;
+        requestRepaint();
     }
 
     /**
diff --git a/tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html b/tests/integration-testscripts/weblogic-portal/weblogic-portal-integration.html
new file mode 100644 (file)
index 0000000..802aa87
--- /dev/null
@@ -0,0 +1,62 @@
+<?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="http://vaadin-integration-tests.intra.itmill.com:7001/" />
+<title>weblogic-portal-integration</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">weblogic-portal-integration</td></tr>
+</thead><tbody>
+<tr>
+       <td>open</td>
+       <td>/AddrPortal/TestPortal.portal</td>
+       <td></td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VScrollTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]</td>
+       <td>52,14</td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>Marge_selected</td>
+</tr>
+<tr>
+       <td>click</td>
+       <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>Marge_in_edit_mode</td>
+</tr>
+<tr>
+       <td>mouseClick</td>
+       <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td>
+       <td>52,13</td>
+</tr>
+<tr>
+       <td>enterCharacter</td>
+       <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VFormLayout[0]/VFormLayout$VFormLayoutTable[0]/VTextField[0]</td>
+       <td>Margery</td>
+</tr>
+<tr>
+       <td>click</td>
+       <td>vaadin=v-AddressBook_1::/VVerticalLayout[0]/ChildComponentContainer[1]/VSplitPanelHorizontal[0]/VSplitPanelVertical[0]/VForm[0]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+       <td></td>
+</tr>
+<tr>
+       <td>screenCapture</td>
+       <td></td>
+       <td>Margery_Simmons</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
index f1f16d1243191404b5bcd17e7e3301e0cb3ab746..9f9ef318652a27e2c5ec4814fbd8a5386429f8fa 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>\r
 \r
 <project name="Test sampler deployment" basedir="." default="integration-test-all">\r
-   \r
+\r
        <!-- Target deploying demo.war -->\r
        <fail unless="test.integration.server" message="test.integration.server must be set for integration tests to run"/>\r
        \r
        \r
        <target name="integration-test-eXo-3">\r
                <fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/eXo-integration.html" />\r
-               <pathconvert pathsep=" " property="test-gatein" refid="html-test-files" />\r
+               <pathconvert pathsep=" " property="test-exo" refid="html-test-files" />\r
                \r
                <subant target="run-tests" failonerror="false" antfile="test.xml">\r
                        <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
                        <property name="com.vaadin.testbench.deployment.url" value="${deployment.url}" />\r
                        <property name="server.start.succeeded" value="1" />\r
                        <property name="browsers" value="winxp-firefox36" />\r
-                       <property name="testfiles" value="${test-gatein}" />\r
+                       <property name="testfiles" value="${test-exo}" />\r
+                       <property name="test-output-dir" value="../build/integration-test-output" />\r
+       \r
+                       <fileset dir="." includes="test.xml" />\r
+               </subant>\r
+       </target>\r
+       \r
+       <target name="integration-test-weblogic-portal">\r
+               <fileset dir="integration-testscripts" id="html-test-files" includes="weblogic-portal/weblogic-portal-integration.html" />\r
+               <pathconvert pathsep=" " property="test-weblogic" refid="html-test-files" />\r
+               \r
+               <subant target="run-tests" failonerror="false" antfile="test.xml">\r
+                       <property name="com.vaadin.testbench.lib.dir" value="${com.vaadin.testbench.lib.dir}" />\r
+                       <property name="com.vaadin.testbench.tester.host" value="${com.vaadin.testbench.tester.host}" />\r
+                       <property name="com.vaadin.testbench.deployment.url" value="http://${test.integration.server}:7001" />\r
+                       <property name="server.start.succeeded" value="1" />\r
+                       <property name="browsers" value="winxp-firefox36" />\r
+                       <property name="testfiles" value="${test-weblogic}" />\r
                        <property name="test-output-dir" value="../build/integration-test-output" />\r
        \r
                        <fileset dir="." includes="test.xml" />\r
        <target name="integration-test-stop-weblogic10">\r
                <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-weblogic-10.3" />\r
        </target>\r
+\r
+       <target name="integration-test-start-weblogic-portal">\r
+               <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} start-weblogic-portal" />\r
+       </target>\r
+\r
+       <target name="integration-test-stop-weblogic-portal">\r
+               <sshexec host="${test.integration.server}" username="${user}" keyfile="${sshkey.file}" command="ant -f ${ant.hub} stop-weblogic-portal" />\r
+       </target>\r
        \r
        <!-- Run sampler deployment test on GAE -->\r
        <target name="integration-test-test-GAE">\r
                <antcall target="integration-test-stop-weblogic10"/>\r
        </target>\r
        \r
+       <target name="integration-test-weblogicPortal">\r
+               <antcall target="integration-test-start-weblogic-portal"/>\r
+               <antcall target="integration-test-weblogic-portal"/>\r
+               <antcall target="integration-test-stop-weblogic-portal"/>\r
+       </target>\r
+       \r
        <target name="integration-test-GAE">\r
                <antcall target="integration-test-deploy-to-GAE"/>\r
                <antcall target="integration-test-test-GAE" />\r
                                <antcall target="run-integration-test">\r
                                        <param name="target-server" value="weblogic10"/>\r
                                </antcall>\r
+                               <antcall target="run-integration-test">\r
+                                       <param name="target-server" value="weblogicPortal"/>\r
+                               </antcall>\r
                                <antcall target="run-integration-test">\r
                                        <param name="target-server" value="GAE"/>\r
                                </antcall>\r
index 57092595f35c8fb31839c16f745bfd16e6a9f1b3..4a41374e41a7f94c20c4f73289ec8453e0eb475d 100644 (file)
        <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VLabel[0]</td>\r
        <td>4. Click using left on Sub window</td>\r
 </tr>\r
+<!--Clicking on the button should not produce a window click event-->\r
+<tr>\r
+       <td>click</td>\r
+       <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>\r
+       <td></td>\r
+</tr>\r
+<tr>\r
+       <td>assertText</td>\r
+       <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::PID_SLog_row_0</td>\r
+       <td>5. Click on button</td>\r
+</tr>\r
+<tr>\r
+       <td>assertText</td>\r
+       <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::PID_SLog_row_2</td>\r
+       <td>3. Click using left on Sub window layout</td>\r
+</tr>\r
+<tr>\r
+       <td>assertText</td>\r
+       <td>vaadin=runcomvaadintestscomponentswindowWindowClickEvents::PID_SLog_row_1</td>\r
+       <td>4. Click using left on Sub window</td>\r
+</tr>\r
 </tbody></table>\r
 </body>\r
 </html>\r
index 4748111fd678f06848f05275af559dc878435948..041ccaaf30922993a5b2e1a8583f7f1d7b24dbfe 100644 (file)
@@ -56,7 +56,15 @@ public class WindowClickEvents extends TestBase {
 
         Label l = new Label("This window is centered");
         l.setSizeUndefined();
-        Button b = new Button("Clicking here should not produce an event");
+        Button b = new Button(
+                "Clicking here should not produce a layout click event");
+        b.addListener(new Button.ClickListener() {
+
+            public void buttonClick(com.vaadin.ui.Button.ClickEvent event) {
+                log.log("Click on button");
+            }
+
+        });
         centered.addComponent(l);
         centered.addComponent(b);