JBoss Portal SVN: r13893 - tags/Enterprise_Portal_Platform_4_3_GA_CP03/core/src/main/org/jboss/portal/core/controller/ajax.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-01-06 14:13:35 -0500 (Wed, 06 Jan 2010)
New Revision: 13893
Modified:
tags/Enterprise_Portal_Platform_4_3_GA_CP03/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
Log:
JBEPP-154: Javascript error when click to "sign out with sign out event" link on TestPortlet in TestWithAjax page
Handle the case of SignOutResponse
Modified: tags/Enterprise_Portal_Platform_4_3_GA_CP03/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- tags/Enterprise_Portal_Platform_4_3_GA_CP03/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2010-01-06 18:54:25 UTC (rev 13892)
+++ tags/Enterprise_Portal_Platform_4_3_GA_CP03/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2010-01-06 19:13:35 UTC (rev 13893)
@@ -31,12 +31,15 @@
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.command.response.SignOutResponse;
import org.jboss.portal.core.controller.handler.AjaxResponse;
import org.jboss.portal.core.controller.handler.CommandForward;
+import org.jboss.portal.core.controller.handler.HTTPResponse;
import org.jboss.portal.core.controller.handler.HandlerResponse;
import org.jboss.portal.core.controller.handler.ResponseHandler;
import org.jboss.portal.core.controller.handler.ResponseHandlerException;
import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
@@ -59,6 +62,7 @@
import org.jboss.portal.core.theme.WindowContextFactory;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.theme.PageService;
import org.jboss.portal.theme.PortalLayout;
@@ -171,6 +175,30 @@
return null;
}
}
+ else if (controllerResponse instanceof SignOutResponse)
+ {
+ // Get the optional signout location
+ String location = ((SignOutResponse)controllerResponse).getLocation();
+
+ final ServerInvocation invocation = controllerContext.getServerInvocation();
+
+ //
+ if (location == null)
+ {
+ PortalObjectContainer portalObjectContainer = controllerContext.getController().getPortalObjectContainer();
+ Portal portal = (Portal)portalObjectContainer.getContext().getDefaultPortal();
+ ViewPageCommand renderCmd = new ViewPageCommand(portal.getId());
+ URLContext urlContext = invocation.getServerContext().getURLContext();
+ location = controllerContext.renderURL(renderCmd, urlContext.asNonAuthenticated(), null);
+ }
+
+ // Indicate that we want a sign out to be done
+ invocation.getResponse().setWantSignOut(true);
+
+ // We perform a full refresh
+ UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(location);
+ return new AjaxResponse(dresp);
+ }
else if (controllerResponse instanceof UpdatePageResponse)
// {
// UpdatePageResponse upr = (UpdatePageResponse)controllerResponse;
14 years, 5 months
JBoss Portal SVN: r13892 - branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-01-06 13:54:25 -0500 (Wed, 06 Jan 2010)
New Revision: 13892
Modified:
branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
Log:
JBEPP-154: Javascript error when click to "sign out with sign out event" link on TestPortlet in TestWithAjax page
Handle the case of SignOutResponse
Modified: branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2010-01-06 14:38:54 UTC (rev 13891)
+++ branches/Enterprise_Portal_Platform_4_3/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2010-01-06 18:54:25 UTC (rev 13892)
@@ -31,12 +31,15 @@
import org.jboss.portal.core.controller.ControllerResponse;
import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.command.response.SignOutResponse;
import org.jboss.portal.core.controller.handler.AjaxResponse;
import org.jboss.portal.core.controller.handler.CommandForward;
+import org.jboss.portal.core.controller.handler.HTTPResponse;
import org.jboss.portal.core.controller.handler.HandlerResponse;
import org.jboss.portal.core.controller.handler.ResponseHandler;
import org.jboss.portal.core.controller.handler.ResponseHandlerException;
import org.jboss.portal.core.model.portal.Page;
+import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
import org.jboss.portal.core.model.portal.PortalObjectId;
@@ -59,6 +62,7 @@
import org.jboss.portal.core.theme.WindowContextFactory;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.server.ServerInvocation;
+import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.theme.LayoutService;
import org.jboss.portal.theme.PageService;
import org.jboss.portal.theme.PortalLayout;
@@ -171,6 +175,30 @@
return null;
}
}
+ else if (controllerResponse instanceof SignOutResponse)
+ {
+ // Get the optional signout location
+ String location = ((SignOutResponse)controllerResponse).getLocation();
+
+ final ServerInvocation invocation = controllerContext.getServerInvocation();
+
+ //
+ if (location == null)
+ {
+ PortalObjectContainer portalObjectContainer = controllerContext.getController().getPortalObjectContainer();
+ Portal portal = (Portal)portalObjectContainer.getContext().getDefaultPortal();
+ ViewPageCommand renderCmd = new ViewPageCommand(portal.getId());
+ URLContext urlContext = invocation.getServerContext().getURLContext();
+ location = controllerContext.renderURL(renderCmd, urlContext.asNonAuthenticated(), null);
+ }
+
+ // Indicate that we want a sign out to be done
+ invocation.getResponse().setWantSignOut(true);
+
+ // We perform a full refresh
+ UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(location);
+ return new AjaxResponse(dresp);
+ }
else if (controllerResponse instanceof UpdatePageResponse)
// {
// UpdatePageResponse upr = (UpdatePageResponse)controllerResponse;
14 years, 5 months
JBoss Portal SVN: r13891 - in branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directories.
by portal-commits@lists.jboss.org
Author: mposolda(a)redhat.com
Date: 2010-01-06 09:38:54 -0500 (Wed, 06 Jan 2010)
New Revision: 13891
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
Log:
Fixes from selenium tests from CP02 tag merged to main EPP branch.
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-12-21 07:33:03 UTC (rev 13890)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2010-01-06 14:38:54 UTC (rev 13891)
@@ -55,9 +55,7 @@
"//body/div[2]/div/div/div[2]/div/div/div/div/div/div/table/tbody/tr/td[2]/div/div/div[2]/span/a");
private final String SUB_LAYOUT_UPDATE = getLoc(casePfx
+ "sub.layout.update",
-// "//input[contains(@name,'dashboardLayoutForm:j_id12')]");
- "//input[contains(@name,'dashboardLayoutForm') and @type='submit']");
-//
+ "//input[contains(@name,'dashboardLayoutForm:j_id12')]");
private final String SUB_PAGE_RENAME = getLoc(casePfx + "sub.page.rename",
"//form[contains(@id,'renameForm')]/input[@type='submit']");
private final String INP_PAGE_RENAME = getLoc(casePfx + "inp.page.rename",
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-12-21 07:33:03 UTC (rev 13890)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2010-01-06 14:38:54 UTC (rev 13891)
@@ -1,6 +1,6 @@
-selenium.timeout.page=180000
-selenium.timeout.ajax=3000
-selenium.timeout.elem=220
+selenium.timeout.page=420000
+selenium.timeout.ajax=15000
+selenium.timeout.elem=320
portal.xxs.1=/Dave</option><script>alert(document.cookie);</script>
#portal.xxs.2=
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-12-21 07:33:03 UTC (rev 13890)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2010-01-06 14:38:54 UTC (rev 13891)
@@ -23,7 +23,7 @@
public static final int ARCHIVE_WAITING = 5000;
/** The constant defining the the number of attempts when checking if the file was uploaded. */
- public static final int ATTEMPTS = 50;
+ public static final int ATTEMPTS = 100;
/*
* uncomment following lines and set the right path to the workspace in the
* case you want to use this test case locally from eclipse
@@ -51,7 +51,7 @@
logoutIfPossible();
login("admin", "admin");
// timeout hack
- selenium.setSpeed("3000");
+ selenium.setSpeed(String.valueOf(AJAX_LOAD));
}
@AfterMethod(groups = { "log" })
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-12-21 07:33:03 UTC (rev 13890)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2010-01-06 14:38:54 UTC (rev 13891)
@@ -82,7 +82,7 @@
# DashboardTestCase
-dash.sub.layout.update=//input[contains(@name,'dashboardLayoutForm') and @type='submit' and @value='Select']
+dash.sub.layout.update=//input[contains(@name,'dashboardLayoutForm:j_id13')]
dash.sub.page.rename=//form[contains(@id,'renameForm')]/input[@type='submit']
dash.inp.page.rename=//input[contains(@id,'renameForm:newName')]
dash.link.weather.portlet=link=*WeatherPortlet*
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-12-21 07:33:03 UTC (rev 13890)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2010-01-06 14:38:54 UTC (rev 13891)
@@ -516,7 +516,7 @@
//openAndAssert("/portal/auth/portal/default/Test/Exception+test",
// "NOT_FOUND ");
openAndAssert("/portal/auth/portal/default/Test/Exception+test",
- "null");
+ "NOT_FOUND");
// select ERR handling
goToProperties();
@@ -679,7 +679,7 @@
selenium.select(SEL_PORTLET_TYPE, "label=" + type);
waitFor(AJAX_LOAD);
- selenium.setSpeed("5000");
+ selenium.setSpeed("15000");
if ("portlet".equals(type)) {
} else if ("widget/google".equals(type)) {
Modified: branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-12-21 07:33:03 UTC (rev 13890)
+++ branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2010-01-06 14:38:54 UTC (rev 13891)
@@ -582,7 +582,7 @@
* and after pressing the relevant submit button, it is asserted, that the
* validation error message is present.
*/
- @Test(enabled = true, groups = {"XSS"})
+ @Test(enabled = false, groups = {"XSS"})
public void testXssPreferences() {
int r = traversePortlets(NAME_COUNTPORT, 0);
14 years, 5 months