JBoss Portal SVN: r13365 - in branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests: apps and 2 other directories.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-13 16:59:35 -0400 (Wed, 13 May 2009)
New Revision: 13365
Added:
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/apps/httpHeader-portlet.war
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/src/org/jboss/portal/test/selenium/core/
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/src/org/jboss/portal/test/selenium/core/HttpHeaderTestCase.java
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/build.xml
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/testng.xml
Log:
[JBEPP-73] - Added testcase
Added: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/apps/httpHeader-portlet.war
===================================================================
(Binary files differ)
Property changes on: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/apps/httpHeader-portlet.war
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/build.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/build.xml 2009-05-13 20:54:47 UTC (rev 13364)
+++ branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/build.xml 2009-05-13 20:59:35 UTC (rev 13365)
@@ -2,7 +2,7 @@
<property environment="env" />
- <property name="workspace" location="build.xml" />
+ <property name="workspace" location="${basedir}" />
<property name="java.home" location="${env.JAVA_HOME}" />
<property name="suitename" location="testng-files" />
@@ -92,6 +92,8 @@
<target name="copyApps">
<echo message="Copying userInterceptor portlet into the ${portal.instance} server" />
<copy file="apps/userDetail-portlet.war" tofile="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war" />
+ <echo message="Copying httpHeader portlet into the ${portal.instance} server" />
+ <copy file="apps/httpHeader-portlet.war" tofile="${jboss.home}/server/${portal.instance}/deploy/httpHeader-portlet.war" />
</target>
<target name="clean">
@@ -99,6 +101,11 @@
<delete dir="${test.build.dir}" />
</target>
+ <target name="undeployApps">
+ <delete file="${jboss.home}/server/${portal.instance}/deploy/userDetail-portlet.war" />
+ <delete file="${jboss.home}/server/${portal.instance}/deploy/httpHeader-portlet.war" />
+ </target>
+
<server:config javaHome="${java.home}" jbossHome="${jboss.home}">
<server name="${portal.instance}" host="${node0}">
<!-- jvmarg value="${jpda.cmdline}" / -->
@@ -112,7 +119,7 @@
<target name="cleanup">
<echo message="Cleaning up..." />
<antcall target="stop-src" />
-
+ <antcall target="undeployApps" />
</target>
<target name="run-and-build" depends="init, compile, run-src">
Added: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/src/org/jboss/portal/test/selenium/core/HttpHeaderTestCase.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/src/org/jboss/portal/test/selenium/core/HttpHeaderTestCase.java (rev 0)
+++ branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/src/org/jboss/portal/test/selenium/core/HttpHeaderTestCase.java 2009-05-13 20:59:35 UTC (rev 13365)
@@ -0,0 +1,78 @@
+package org.jboss.portal.test.selenium.core;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
+ */
+@Test(groups = { "portlet_http_header" }, enabled = true, description = "Checking http headers and cookies of portlet responses.")
+public class HttpHeaderTestCase extends JBossPortalSeleniumTestCase
+{
+ @Test(enabled = true, description = "Checking http headers of portlet responses.")
+ public void testHttpHeaders()
+ {
+ try
+ {
+ HttpURLConnection connection;
+ Map<String,List<String>> headers;
+ connection = (HttpURLConnection)new URL("http://localhost:8080/portal/portal/HttpHeaderPortal/default/HttpHeaderPo...").openConnection();
+ headers = connection.getHeaderFields();
+ //System.out.println(headers);
+ List<String> others1 = headers.get("Foo");
+ List<String> others2 = headers.get("Foo2");
+ List<String> others3 = headers.get("partialRefresh");
+ List<String> others4 = headers.get("Expires");
+ List<String> others5 = headers.get("Pragma");
+ List<String> others6 = headers.get("Cache-Control");
+
+ Assert.assertTrue(others1 == null, "Expected no Foo as it is set in processAction!");
+ Assert.assertTrue(others2.size() == 2, "Expected 2 Foo2!");
+ Assert.assertTrue(others3.size() == 1, "Expected 1 partialRefresh!");
+ Assert.assertTrue(others4.size() == 1, "Expected 1 Expires!");
+ Assert.assertTrue(others5.size() == 1, "Expected 1 Pragma!");
+ Assert.assertTrue(others6.size() == 1, "Expected 1 Cache-Control!");
+
+ Assert.assertTrue(others2.get(0).equals("BarView2")
+ && others2.get(1).equals("BarView1"), "Foo2 not found!");
+ Assert.assertTrue(others3.get(0).equals("true"), "partialRefresh not found!");
+ Assert.assertTrue(others4.get(0).equals("0"), "Expires not found!");
+ Assert.assertTrue(others5.get(0).equals("no-cache"), "Pragma not found!");
+ Assert.assertTrue(others6.get(0).equals("private, no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0, s-maxage=0"),
+ "Cache-Control not found!");
+ connection.disconnect();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ @Test(enabled = true, description = "Checking cookies of portlet responses.")
+ public void testHttpCookies()
+ {
+ logoutIfPossible();
+ login("admin", "admin");
+ selenium.open("portal/HttpHeaderPortal");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ String cookie = selenium.getCookie();
+ // This is set in doView()
+ Assert.assertTrue(cookie.indexOf("MyIdea=1.1") >= 0,"Custom Cookie set in doView not found!");
+
+ selenium.click("link=doAction");
+ selenium.waitForPageToLoad(PAGE_LOAD);
+ cookie = selenium.getCookie();
+ // Cookie order is unknown, but all cookies are set properly.
+ // Sometimes it is set multiple times too...
+ Assert.assertTrue(cookie.indexOf("MyIdea=1.1") >= 0
+ && cookie.indexOf("MyIdea2=2.0") >= 0,"Custom Cookies set in processAction not found!");
+ logout();
+ }
+}
Modified: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/testng.xml
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/testng.xml 2009-05-13 20:54:47 UTC (rev 13364)
+++ branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/testsuite/ui-tests/testng.xml 2009-05-13 20:59:35 UTC (rev 13365)
@@ -52,6 +52,12 @@
<class name="org.jboss.portal.test.selenium.cms.CMSFileUploadTestCase"></class></classes>
</test>
+ <test name="org.jboss.portal.test.selenium.core.HttpHeaderTestCase"
+ verbose="2" annotations="JDK">
+ <classes>
+ <class name="org.jboss.portal.test.selenium.core.HttpHeaderTestCase"></class></classes>
+ </test>
+
<test name="org.jboss.portal.test.selenium.DashboardTestCase"
verbose="2" annotations="JDK">
<classes>
16 years, 11 months
JBoss Portal SVN: r13364 - branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/core/src/main/org/jboss/portal/core/aspects/portlet.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-13 16:54:47 -0400 (Wed, 13 May 2009)
New Revision: 13364
Modified:
branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
Log:
[JBEPP-72] - Added provision for multi-valued Headers
Modified: branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
===================================================================
--- branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-13 20:51:23 UTC (rev 13363)
+++ branches/Enterprise_Portal_Platform_4_3_GA_JBEPP-73/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-13 20:54:47 UTC (rev 13364)
@@ -22,28 +22,24 @@
******************************************************************************/
package org.jboss.portal.core.aspects.portlet;
-import java.util.List;
+import java.util.Iterator;
import org.jboss.portal.common.util.MultiValuedPropertyMap;
-import org.jboss.portal.core.metadata.portlet.MarkupElement;
-import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
-import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.ResponseProperties;
import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
-import org.w3c.dom.Element;
-import javax.portlet.MimeResponse;
import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
/**
* @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
* @version $Revision$
*/
public class HttpHeaderInterceptor extends CorePortletInterceptor
@@ -79,11 +75,8 @@
{
addCookie(invocation, cookie);
}
- for (String key: unsr.getProperties().getTransportHeaders().keySet())
- {
- String value = unsr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
- }
+ setHeaders(unsr.getProperties().getTransportHeaders(),
+ ((AbstractServerContext) invocation.getServerContext()).getResponse());
}
}
else if (response instanceof FragmentResponse)
@@ -95,17 +88,14 @@
{
addCookie(invocation, cookie);
}
- for (String key: fr.getProperties().getTransportHeaders().keySet())
- {
- String value = fr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
- }
+ setHeaders(fr.getProperties().getTransportHeaders(),
+ ((AbstractServerContext) invocation.getServerContext()).getResponse());
}
}
//
return response;
}
-
+
private void addCookie(PortletInvocation invocation, Cookie cookie)
{
if ((cookie.getPath() == null || "".equals(cookie.getPath().trim())) && defaultCookiePath != null)
@@ -114,4 +104,26 @@
}
((AbstractServerContext) invocation.getServerContext()).getResponse().addCookie(cookie);
}
+
+ private void setHeaders(MultiValuedPropertyMap<String> map, HttpServletResponse response)
+ {
+ for (String key: map.keySet())
+ {
+ // It might have already been added by another portlet or
+ // its the first time we are adding it so reset it with first value.
+ // The winner is the portlet in the last order of render phase.
+ response.setHeader(key, map.getValue(key));
+
+ if (map.size() > 1)
+ {
+ // If multiple values found just add them
+ String value;
+ for (Iterator<String> i = map.getValues(key).listIterator(1); i.hasNext();)
+ {
+ value = i.next();
+ response.addHeader(key, value);
+ }
+ }
+ }
+ }
}
16 years, 11 months
JBoss Portal SVN: r13363 - branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet.
by portal-commits@lists.jboss.org
Author: mageshbk(a)jboss.com
Date: 2009-05-13 16:51:23 -0400 (Wed, 13 May 2009)
New Revision: 13363
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
Log:
[JBPORTAL-2387] - Added provision for multi-valued Headers
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-13 13:14:12 UTC (rev 13362)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/aspects/portlet/HttpHeaderInterceptor.java 2009-05-13 20:51:23 UTC (rev 13363)
@@ -22,28 +22,24 @@
******************************************************************************/
package org.jboss.portal.core.aspects.portlet;
-import java.util.List;
+import java.util.Iterator;
import org.jboss.portal.common.util.MultiValuedPropertyMap;
-import org.jboss.portal.core.metadata.portlet.MarkupElement;
-import org.jboss.portal.core.portlet.info.MarkupHeaderInfo;
import org.jboss.portal.portlet.PortletInvokerException;
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
-import org.jboss.portal.portlet.info.PortletInfo;
import org.jboss.portal.portlet.invocation.PortletInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
-import org.jboss.portal.portlet.invocation.response.ResponseProperties;
import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
-import org.w3c.dom.Element;
-import javax.portlet.MimeResponse;
import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletResponse;
/**
* @author <a href="mailto:mholzner@novell.com">Martin Holzner</a>
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @author <a href="mailto:mageshbk@jboss.com">Magesh Kumar B</a>
* @version $Revision: 11068 $
*/
public class HttpHeaderInterceptor extends CorePortletInterceptor
@@ -79,11 +75,8 @@
{
addCookie(invocation, cookie);
}
- for (String key: unsr.getProperties().getTransportHeaders().keySet())
- {
- String value = unsr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
- }
+ setHeaders(unsr.getProperties().getTransportHeaders(),
+ ((AbstractServerContext) invocation.getServerContext()).getResponse());
}
}
else if (response instanceof FragmentResponse)
@@ -95,17 +88,14 @@
{
addCookie(invocation, cookie);
}
- for (String key: fr.getProperties().getTransportHeaders().keySet())
- {
- String value = fr.getProperties().getTransportHeaders().getValue(key);
- ((AbstractServerContext) invocation.getServerContext()).getResponse().setHeader(key, value);
- }
+ setHeaders(fr.getProperties().getTransportHeaders(),
+ ((AbstractServerContext) invocation.getServerContext()).getResponse());
}
}
//
return response;
}
-
+
private void addCookie(PortletInvocation invocation, Cookie cookie)
{
if ((cookie.getPath() == null || "".equals(cookie.getPath().trim())) && defaultCookiePath != null)
@@ -114,4 +104,26 @@
}
((AbstractServerContext) invocation.getServerContext()).getResponse().addCookie(cookie);
}
+
+ private void setHeaders(MultiValuedPropertyMap<String> map, HttpServletResponse response)
+ {
+ for (String key: map.keySet())
+ {
+ // It might have already been added by another portlet or
+ // its the first time we are adding it so reset it with first value.
+ // The winner is the portlet in the last order of render phase.
+ response.setHeader(key, map.getValue(key));
+
+ if (map.size() > 1)
+ {
+ // If multiple values found just add them
+ String value;
+ for (Iterator<String> i = map.getValues(key).listIterator(1); i.hasNext();)
+ {
+ value = i.next();
+ response.addHeader(key, value);
+ }
+ }
+ }
+ }
}
16 years, 11 months
JBoss Portal SVN: r13362 - other/dzone_article.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-13 09:14:12 -0400 (Wed, 13 May 2009)
New Revision: 13362
Modified:
other/dzone_article/readme.txt
Log:
minor
Modified: other/dzone_article/readme.txt
===================================================================
--- other/dzone_article/readme.txt 2009-05-13 13:08:35 UTC (rev 13361)
+++ other/dzone_article/readme.txt 2009-05-13 13:14:12 UTC (rev 13362)
@@ -42,6 +42,7 @@
We've slightly modified the service descriptor of JBoss Portal to modify the LocaleInterceptor, let's copy the modified one:
ROOT/dzone_article/: cp portalExtension/etc/jboss-service.xml ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/META-INF
+Let's delete the default pages so that we can replace by ours which are defined within myPortal.war:
ROOT/dzone_article/: rm ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/conf/data/default-object.xml
Decorate login.jsp
16 years, 11 months
JBoss Portal SVN: r13361 - other/dzone_article.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-13 09:08:35 -0400 (Wed, 13 May 2009)
New Revision: 13361
Modified:
other/dzone_article/readme.txt
Log:
update
Modified: other/dzone_article/readme.txt
===================================================================
--- other/dzone_article/readme.txt 2009-05-13 13:05:36 UTC (rev 13360)
+++ other/dzone_article/readme.txt 2009-05-13 13:08:35 UTC (rev 13361)
@@ -9,33 +9,40 @@
ROOT/: wget http://downloads.sourceforge.net/jboss/jboss-portal-2.7.2-bundled.zip
ROOT/: unzip ~/Download/jboss-portal-2.7.2-bundled.zip
+
+If you didn't checked out this readme with the sources you will need to get them:
ROOT/: svn co http://anonsvn.jboss.org/repos/portal/other/dzone_article
COMPILING:
-ROOT/: cd myPortal
-ROOT/myPortal/: mvn package
-ROOT/myPortal/: cd ../portalExtension
-ROOT/portalExtension/: mvn package
-ROOT/myPortal/: cd ../rssPortlet
-ROOT/rssPortlet/: mvn package
+ROOT/dzone_article/: cd myPortal
+ROOT/dzone_article/myPortal/: mvn package
+ROOT/dzone_article/myPortal/: cd ../portalExtension
+ROOT/dzone_article/portalExtension/: mvn package
+ROOT/dzone_article/myPortal/: cd ../rssPortlet
+ROOT/dzone_article/rssPortlet/: mvn package
INSTALLING:
First we want to install the new theme which comes as a separate Web Archive. (keep the name myPortal.war)
-ROOT/: cp myPortal/target/myPortal-0.0.1-SNAPSHOT.war jboss-portal-2.7.2/server/default/deploy/myPortal.war
+ROOT/dzone_article/: cp myPortal/target/myPortal-0.0.1-SNAPSHOT.war ../jboss-portal-2.7.2/server/default/deploy/myPortal.war
Now we want to install the rssPortlet:
-ROOT/: cp rssPortlet/target/rssPortlet-0.0.1-SNAPSHOT.war jboss-portal-2.7.2/server/default/deploy/rssPortlet.war
+ROOT/dzone_article/: cp rssPortlet/target/rssPortlet-0.0.1-SNAPSHOT.war ../jboss-portal-2.7.2/server/default/deploy/rssPortlet.war
We've created few files that we want to share with the portal, let's copy the library to the portal:
-ROOT/: cp portalExtension/target/portalExtension-0.0.1-SNAPSHOT.jar jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/lib
+ROOT/dzone_article/: cp portalExtension/target/portalExtension-0.0.1-SNAPSHOT.jar ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/lib
We've added a servlet to add on the portal, let's copy the modified web.xml:
-ROOT:/ cp portalExtension/src/main/resources/web.xml jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF
+ROOT/dzone_article/: cp portalExtension/etc/web.xml ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF
We changed the default CMS content, let's replace the original one:
-ROOT:/ cp portalExtension/src/main/resources/index.html jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-cms.sar/portal/cms/conf/default-content/default/index.html
+ROOT/dzone_article/: cp portalExtension/etc/index.html ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-cms.sar/portal/cms/conf/default-content/default/index.html
We've slightly modified the service descriptor of JBoss Portal to modify the LocaleInterceptor, let's copy the modified one:
-ROOT:/ cp portalExtension/src/main/resources/jboss-service.xml jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/META-INF
+ROOT/dzone_article/: cp portalExtension/etc/jboss-service.xml ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/META-INF
+
+ROOT/dzone_article/: rm ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/conf/data/default-object.xml
+
+Decorate login.jsp
+ROOT/dzone_article/: cp portalExtension/etc/login.jsp ../jboss-portal-2.7.2/server/default/deploy/jboss-portal.sar/portal-server.war/login.jsp
16 years, 11 months
JBoss Portal SVN: r13360 - in other/dzone_article: portalExtension and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-13 09:05:36 -0400 (Wed, 13 May 2009)
New Revision: 13360
Modified:
other/dzone_article/myPortal/
other/dzone_article/portalExtension/
other/dzone_article/rssPortlet/
Log:
Eclipse
Property changes on: other/dzone_article/myPortal
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: other/dzone_article/portalExtension
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: other/dzone_article/rssPortlet
___________________________________________________________________
Name: svn:ignore
+ target
16 years, 11 months
JBoss Portal SVN: r13359 - other/dzone_article/portalExtension/etc.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-13 09:02:56 -0400 (Wed, 13 May 2009)
New Revision: 13359
Modified:
other/dzone_article/portalExtension/etc/web.xml
Log:
fix
Modified: other/dzone_article/portalExtension/etc/web.xml
===================================================================
--- other/dzone_article/portalExtension/etc/web.xml 2009-05-13 12:56:55 UTC (rev 13358)
+++ other/dzone_article/portalExtension/etc/web.xml 2009-05-13 13:02:56 UTC (rev 13359)
@@ -150,9 +150,14 @@
<url-pattern>/images/login_top_right.png</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>localeServlet</servlet-name>
+ <url-pattern>/locale</url-pattern>
+ </servlet-mapping>
+
<servlet-mapping>
<servlet-name>localeServlet</servlet-name>
- <url-pattern>/locale</url-pattern>
+ <url-pattern>/auth/locale</url-pattern>
</servlet-mapping>
<session-config>
16 years, 11 months
JBoss Portal SVN: r13358 - other/dzone_article/portalExtension/etc.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-13 08:56:55 -0400 (Wed, 13 May 2009)
New Revision: 13358
Added:
other/dzone_article/portalExtension/etc/login.jsp
Log:
Adding custom login page
Added: other/dzone_article/portalExtension/etc/login.jsp
===================================================================
--- other/dzone_article/portalExtension/etc/login.jsp (rev 0)
+++ other/dzone_article/portalExtension/etc/login.jsp 2009-05-13 12:56:55 UTC (rev 13358)
@@ -0,0 +1,95 @@
+<%--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--%>
+<%@ page pageEncoding="utf-8" %>
+<%@page import="org.jboss.portal.identity.UserStatus" %>
+<%@page import="java.util.ResourceBundle" %>
+
+<%
+ ResourceBundle rb = ResourceBundle.getBundle("Resource", request.getLocale());
+%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <title><%= rb.getString("LOGIN_TITLE")%>
+ </title>
+
+ <script type="text/javascript" src="/portal-core/js/login.js"></script>
+
+ <link rel="stylesheet" href="/myPortal/css/login.css" type="text/css"/>
+</head>
+<body onload="JBossPortal.login.setFocusOnLoginForm();JBossPortal.login.displayStatus();">
+
+<div class="login-container">
+
+
+ <div class="login-header">
+ <%--text title--%>
+ <%--<h2><%= rb.getString("LOGIN_TITLE") %></h2>--%>
+ <%--img title--%>
+ <img src="/portal-core/images/logo-small-blue.gif" width="118px" height="17px" alt=""/>
+ </div>
+ <div class="login-content" id="login-content">
+ <div class="error-message" id="login-error-message"
+ style="<%=(request.getAttribute(!UserStatus.OK.equals("org.jboss.portal.userStatus") ? "" : "display:none"))%>;">
+ <%
+
+ if (UserStatus.DISABLE.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_DISABLED"));
+ } else if (UserStatus.WRONGPASSWORD.equals(request.getAttribute("org.jboss.portal.userStatus")) || UserStatus.UNEXISTING.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_INEXISTING_OR_WRONG_PASSWORD"));
+ } else if (UserStatus.NOTASSIGNEDTOROLE.equals(request.getAttribute("org.jboss.portal.userStatus"))) {
+ out.println(rb.getString("ACCOUNT_NOTASSIGNEDTOROLE"));
+ }
+ %>
+ </div>
+ <form method="post" action="<%= response.encodeURL("j_security_check") %>" name="loginform" id="loginForm"
+ target="_parent" style="margin:0;padding:0">
+ <div class="form-field">
+ <label for="j_username"><%= rb.getString("LOGIN_USERNAME") %>
+ </label>
+ <input type="text" style="width:155px;" name="j_username" id="j_username" value="" onFocus="JBossPortal.login.highlight('j_username');" onblur="JBossPortal.login.highlight('j_username');"/>
+ </div>
+ <div class="form-field">
+ <label for="j_password"><%= rb.getString("LOGIN_PASSWORD") %>
+ </label>
+ <input type="password" style="width:155px;" name="j_password" id="j_password" value="" onFocus="JBossPortal.login.highlight('j_password');" onblur="JBossPortal.login.highlight('j_password');"/>
+ </div>
+ <br class="clear"/>
+
+ <div class="button-container">
+ <br class="clear"/>
+ <input type="button" name="cancel" id="login-cancel"
+ value="<%= rb.getString("LOGIN_CANCEL") %>" class="cancel-button"
+ onclick="window.parent.hideContentModal('login-modal');"/>
+ <br class="clear"/>
+ <input type="submit" name="login" id="login-submit"
+ value="<%= rb.getString("LOGIN_SUBMIT") %>" class="login-button"/>
+ </div>
+ </form>
+
+ </div>
+</div>
+</body>
+</html>
16 years, 11 months
JBoss Portal SVN: r13357 - in other/dzone_article: myPortal/src/main/webapp/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-05-13 08:24:04 -0400 (Wed, 13 May 2009)
New Revision: 13357
Added:
other/dzone_article/portalExtension/etc/default-object.xml
Removed:
other/dzone_article/myPortal/src/main/pom.xml
Modified:
other/dzone_article/myPortal/src/main/webapp/WEB-INF/default-object.xml
other/dzone_article/portalExtension/etc/jboss-service.xml
other/dzone_article/portalExtension/etc/web.xml
Log:
minor
Deleted: other/dzone_article/myPortal/src/main/pom.xml
===================================================================
--- other/dzone_article/myPortal/src/main/pom.xml 2009-05-13 11:21:01 UTC (rev 13356)
+++ other/dzone_article/myPortal/src/main/pom.xml 2009-05-13 12:24:04 UTC (rev 13357)
@@ -1,18 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.portal</groupId>
- <artifactId>myPortal</artifactId>
- <packaging>war</packaging>
- <version>0.0.1-SNAPSHOT</version>
- <name>myPortal</name>
- <url>http://maven.apache.org</url>
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
-</project>
Modified: other/dzone_article/myPortal/src/main/webapp/WEB-INF/default-object.xml
===================================================================
--- other/dzone_article/myPortal/src/main/webapp/WEB-INF/default-object.xml 2009-05-13 11:21:01 UTC (rev 13356)
+++ other/dzone_article/myPortal/src/main/webapp/WEB-INF/default-object.xml 2009-05-13 12:24:04 UTC (rev 13357)
@@ -32,27 +32,6 @@
<context-name />
<properties>
<!--
- | Set the layout for the default portal, see also portal-layouts.xml.
- -->
- <property>
- <name>layout.id</name>
- <value>MyLayout</value>
- </property>
- <!--
- | Set the theme for the default portal, see also portal-themes.xml.
- -->
- <property>
- <name>theme.id</name>
- <value>mySkin</value>
- </property>
- <!--
- | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
- -->
- <property>
- <name>theme.renderSetId</name>
- <value>myPortalRenderer</value>
- </property>
- <!--
| The default portal name, if the property is not explicited then the default portal name is "default"
-->
<property>
@@ -133,6 +112,29 @@
<unchecked />
</policy-permission>
</security-constraint>
+ <properties>
+ <!--
+ | Set the layout for the default portal, see also portal-layouts.xml.
+ -->
+ <property>
+ <name>layout.id</name>
+ <value>MyLayout</value>
+ </property>
+ <!--
+ | Set the theme for the default portal, see also portal-themes.xml.
+ -->
+ <property>
+ <name>theme.id</name>
+ <value>mySkin</value>
+ </property>
+ <!--
+ | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
+ -->
+ <property>
+ <name>theme.renderSetId</name>
+ <value>myPortalRenderer</value>
+ </property>
+ </properties>
<coordination>
<wirings>
<implicit-mode>TRUE</implicit-mode>
Added: other/dzone_article/portalExtension/etc/default-object.xml
===================================================================
--- other/dzone_article/portalExtension/etc/default-object.xml (rev 0)
+++ other/dzone_article/portalExtension/etc/default-object.xml 2009-05-13 12:24:04 UTC (rev 13357)
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
+ ~ contributors as indicated by the @authors tag. See the ~
+ ~ copyright.txt in the distribution for a full listing of ~
+ ~ individual contributors. ~
+ ~ ~
+ ~ This is free software; you can redistribute it and/or modify it ~
+ ~ under the terms of the GNU Lesser General Public License as ~
+ ~ published by the Free Software Foundation; either version 2.1 of ~
+ ~ the License, or (at your option) any later version. ~
+ ~ ~
+ ~ This software is distributed in the hope that it will be useful, ~
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
+ ~ Lesser General Public License for more details. ~
+ ~ ~
+ ~ You should have received a copy of the GNU Lesser General Public ~
+ ~ License along with this software; if not, write to the Free ~
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE deployments PUBLIC
+ "-//JBoss Portal//DTD Portal Object 2.6//EN"
+ "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
+
+<deployments>
+ <deployment>
+ <context>
+ <context-name/>
+ <properties>
+ <!--
+ | The default portal name, if the property is not explicited then the default portal name is "default"
+ -->
+ <property>
+ <name>portal.defaultObjectName</name>
+ <value>default</value>
+ </property>
+
+ <!-- Control policy config -->
+ <property>
+ <name>control.portal.access_denied</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.unavailable</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.not_found</name>
+ <value>ignore</value>
+ </property>
+ <property>
+ <name>control.portal.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.portal.resource_uri</name>
+ <value>/WEB-INF/jsp/error/portal.jsp</value>
+ </property>
+ <property>
+ <name>control.page.access_denied</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.unavailable</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.not_found</name>
+ <value>hide</value>
+ </property>
+ <property>
+ <name>control.page.internal_error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.error</name>
+ <value>jsp</value>
+ </property>
+ <property>
+ <name>control.page.resource_uri</name>
+ <value>/WEB-INF/jsp/error/page.jsp</value>
+ </property>
+ </properties>
+ </context>
+ </deployment>
+ <deployment>
+ <parent-ref/>
+ <if-exists>overwrite</if-exists>
+ <portal>
+ <portal-name>default</portal-name>
+ <supported-modes>
+ <mode>view</mode>
+ <mode>edit</mode>
+ <mode>help</mode>
+ </supported-modes>
+ <supported-window-states>
+ <window-state>normal</window-state>
+ <window-state>minimized</window-state>
+ <window-state>maximized</window-state>
+ </supported-window-states>
+ <security-constraint>
+ <policy-permission>
+ <action-name>view</action-name>
+ <unchecked/>
+ </policy-permission>
+ </security-constraint>
+ <properties>
+ <!--
+ | Set the layout for the default portal, see also portal-layouts.xml.
+ -->
+ <property>
+ <name>layout.id</name>
+ <value>MyLayout</value>
+ </property>
+ <!--
+ | Set the theme for the default portal, see also portal-themes.xml.
+ -->
+ <property>
+ <name>theme.id</name>
+ <value>mySkin</value>
+ </property>
+ <!--
+ | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
+ -->
+ <property>
+ <name>theme.renderSetId</name>
+ <value>myPortalRenderer</value>
+ </property>
+ </properties>
+ <coordination>
+ <wirings>
+ <implicit-mode>TRUE</implicit-mode>
+ </wirings>
+ <bindings>
+ <implicit-mode>TRUE</implicit-mode>
+ </bindings>
+ </coordination>
+ <page>
+ <page-name>default</page-name>
+ <display-name xml:lang="en">Home</display-name>
+ <display-name xml:lang="fr">Accueil</display-name>
+ <properties>
+ <property>
+ <name>order</name>
+ <value>1</value>
+ </property>
+ </properties>
+ <security-constraint>
+ <policy-permission>
+ <action-name>view</action-name>
+ <unchecked/>
+ </policy-permission>
+ </security-constraint>
+ <window>
+ <window-name>JBossPortalRSSWindow</window-name>
+ <instance-ref>JBossPortalRSSInstance</instance-ref>
+ <region>FirstColumn</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>JBossRSSWindow</window-name>
+ <instance-ref>JBossRSSInstance</instance-ref>
+ <region>SecondColumn</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CMSWindow</window-name>
+ <content>
+ <content-type>cms</content-type>
+ <content-uri>/default/index.html</content-uri>
+ </content>
+ <region>MainColumn</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>other</page-name>
+ <display-name xml:lang="en">Other Page</display-name>
+ <display-name xml:lang="fr">Autre Page</display-name>
+ <properties>
+ <property>
+ <name>layout.id</name>
+ <value>TwoColumnsLayout</value>
+ </property>
+ <property>
+ <name>order</name>
+ <value>2</value>
+ </property>
+ </properties>
+ <security-constraint>
+ <policy-permission>
+ <action-name>view</action-name>
+ <unchecked/>
+ </policy-permission>
+ </security-constraint>
+ <window>
+ <window-name>AdminOnlyRSSWindow</window-name>
+ <instance-ref>AdminOnlyRSSInstance</instance-ref>
+ <region>FirstColumn</region>
+ <height>0</height>
+ </window>
+ <window>
+ <window-name>CMSWindow</window-name>
+ <content>
+ <content-type>netvibesWidget</content-type>
+ <content-uri>http://sudokushark.com/netvibes_uwa.php</content-uri>
+ </content>
+ <region>SecondColumn</region>
+ <height>0</height>
+ </window>
+ </page>
+ <page>
+ <page-name>adminonly</page-name>
+ <display-name xml:lang="en">Admin Only</display-name>
+ <display-name xml:lang="fr">Pour Admin</display-name>
+ <properties>
+ <property>
+ <name>layout.id</name>
+ <value>TwoColumnsLayout</value>
+ </property>
+ <property>
+ <name>order</name>
+ <value>3</value>
+ </property>
+ </properties>
+ <security-constraint>
+ <policy-permission>
+ <action-name>view</action-name>
+ <role>Admin</role>
+ </policy-permission>
+ </security-constraint>
+ <window>
+ <window-name>NYTWindow</window-name>
+ <content>
+ <content-type>netvibes-widget</content-type>
+ <content-uri>http://www.netvibes.com/modules/multipleFeeds/multipleFeeds.php?provider=nyt</content-uri>
+ </content>
+ <region>FirstColumn</region>
+ <height>0</height>
+ </window>
+ </page>
+ </portal>
+ </deployment>
+
+ <deployment>
+ <if-exists>overwrite</if-exists>
+ <context>
+ <context-name>dashboard</context-name>
+ </context>
+ </deployment>
+
+ <deployment>
+ <parent-ref/>
+ <if-exists>keep</if-exists>
+ <portal>
+ <portal-name>template</portal-name>
+ </portal>
+ </deployment>
+</deployments>
Modified: other/dzone_article/portalExtension/etc/jboss-service.xml
===================================================================
--- other/dzone_article/portalExtension/etc/jboss-service.xml 2009-05-13 11:21:01 UTC (rev 13356)
+++ other/dzone_article/portalExtension/etc/jboss-service.xml 2009-05-13 12:24:04 UTC (rev 13357)
@@ -213,9 +213,9 @@
name="portal:service=Interceptor,type=Command,name=PageCustomizer" xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
- <attribute name="TargetContextPath">/portal-core</attribute>
- <attribute name="HeaderPath">/WEB-INF/jsp/header/header.jsp</attribute>
- <attribute name="TabsPath">/WEB-INF/jsp/header/tabs.jsp</attribute>
+ <attribute name="TargetContextPath">/myPortal</attribute>
+ <attribute name="HeaderPath">/layouts/common/links.jsp</attribute>
+ <attribute name="TabsPath">/layouts/common/tabs.jsp</attribute>
<!-- Overrides the value of core.login.namespace in config.xml --><!-- attribute name="LoginNamespace">dashboard</attribute -->
<depends optional-attribute-name="Config" proxy-type="attribute">portal:service=ServerConfig</depends>
<depends optional-attribute-name="PortalAuthorizationManagerFactory" proxy-type="attribute">
Modified: other/dzone_article/portalExtension/etc/web.xml
===================================================================
--- other/dzone_article/portalExtension/etc/web.xml 2009-05-13 11:21:01 UTC (rev 13356)
+++ other/dzone_article/portalExtension/etc/web.xml 2009-05-13 12:24:04 UTC (rev 13357)
@@ -64,7 +64,7 @@
<servlet>
<servlet-name>localeServlet</servlet-name>
- <servlet-class>org.jboss.portal.myPortal.servlet.LocaleServlet</servlet-class>
+ <servlet-class>org.jboss.portal.extension.servlet.LocaleServlet</servlet-class>
</servlet>
<!-- The portal servlet is the main entrance point -->
16 years, 11 months
JBoss Portal SVN: r13356 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 1 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-05-13 07:21:01 -0400 (Wed, 13 May 2009)
New Revision: 13356
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
Log:
[selenium] - implementing fixes by magesh
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-05-13 11:17:11 UTC (rev 13355)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-05-13 11:21:01 UTC (rev 13356)
@@ -3,7 +3,7 @@
<property environment="env" />
- <property name="workspace" location="." />
+ <property name="workspace" location="${basedir}" />
<property name="java.home" location="${env.JAVA_HOME}" />
<property name="suitename" location="testng-files" />
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-05-13 11:17:11 UTC (rev 13355)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-05-13 11:21:01 UTC (rev 13356)
@@ -502,9 +502,11 @@
}
searchSimple("man", "10");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 10, "Wrong number of row in user table #1.");
searchSimple("man", "50");
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in user table #2.");
selenium.click(INP_USER_SEARCH_NEXT);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -514,6 +516,7 @@
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 50, "Wrong number of row in user table #2.");
searchSimple("man", "100");
+ selenium.waitForPageToLoad(PAGE_LOAD);
//selenium.setSpeed("60000");
Assert.assertEquals(countTableRows(TBL_USERLIST) - 1, 95, "Wrong number of row in user table #4.");
//selenium.setSpeed("0");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13 11:17:11 UTC (rev 13355)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-05-13 11:21:01 UTC (rev 13356)
@@ -1,5 +1,7 @@
package org.jboss.portal.test.selenium.cms;
+import java.io.File;
+
import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
@@ -42,7 +44,8 @@
private final String SEL_ACTION = getLoc(casePfx+"sel.action","//div[@id='center']/div/div/div[1]/div/select");
private final String WORKSPACE = System.getProperty("workspace");
-
+ private final String TEST_FILES_DIR = WORKSPACE + File.separatorChar + "test_files" + File.separatorChar;
+
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
logoutIfPossible();
@@ -77,9 +80,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- debugPrint("CMSArchiveUploadTestCase archive location: "+WORKSPACE + "/test_files/archive.zip");
-
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "archive.zip");
+ debugPrint("[selenium] : testArchiveUpload archive path2: " + TEST_FILES_DIR + "archive.zip");
selenium.click(SUB_CANCEL_ARCH_UPLOAD);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -151,9 +153,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- debugPrint("CMSArchiveUploadTestCase archive location: "+WORKSPACE + "/test_files/many_files.zip");
-
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/many_files.zip");
+ debugPrint("CMSArchiveUploadTestCase archive location: "+TEST_FILES_DIR);
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "many_files.zip");
selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -205,7 +206,7 @@
selenium.waitForPopUp("_top", PAGE_LOAD);
debugPrint("CMSArchiveUploadTestCase archive location: "+ WORKSPACE + "/test_files/big_archive.zip");
- selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/big_archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, TEST_FILES_DIR + "big_archive.zip");
selenium.click(SUB_SEND_ARCHIVE);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-05-13 11:17:11 UTC (rev 13355)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-05-13 11:21:01 UTC (rev 13356)
@@ -1,5 +1,7 @@
package org.jboss.portal.test.selenium.cms;
+import java.io.File;
+
import org.jboss.portal.test.selenium.JBossPortalSeleniumTestCase;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
@@ -29,7 +31,8 @@
private final String CMS_FILE_TABLE = getLoc(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
private final String WORKSPACE = System.getProperty("workspace");
-
+ private final String TEST_FILES_DIR = WORKSPACE + File.separatorChar + "test_files" + File.separatorChar;
+
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
logoutIfPossible();
@@ -112,7 +115,7 @@
selenium.type("description", "myFile");
selenium.type("title", "file to upload");
selenium.select("language", "label=Afar");
- selenium.type("response", WORKSPACE + "/test_files/testFile.txt");
+ selenium.type("response", TEST_FILES_DIR + "testFile.txt");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
/*
16 years, 11 months