JBoss Portal SVN: r12224 - branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-10-31 15:30:05 -0400 (Fri, 31 Oct 2008)
New Revision: 12224
Modified:
branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
Log:
Redirects user to inital facelets page on ViewExpiredException
Modified: branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml 2008-10-31 15:31:30 UTC (rev 12223)
+++ branches/JBoss_Portal_Branch_2_7/core-wsrp/src/resources/portal-wsrp-admin-war/WEB-INF/web.xml 2008-10-31 19:30:05 UTC (rev 12224)
@@ -62,6 +62,12 @@
<param-value>false</param-value>
</context-param>
+ <!--When turned on, it changes ViewHandler.restoreView() to build the view before asking the StateManager for help.-->
+ <context-param>
+ <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
<!-- Facelet configuration -->
<context-param>
<param-name>facelets.DEVELOPMENT</param-name>
15 years, 6 months
JBoss Portal SVN: r12223 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium/cms and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-31 11:31:30 -0400 (Fri, 31 Oct 2008)
New Revision: 12223
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/CMSFileUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
Log:
upload fixes
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 2008-10-31 13:30:18 UTC (rev 12222)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2008-10-31 15:31:30 UTC (rev 12223)
@@ -13,15 +13,14 @@
@Test(groups = { "cms_archive_upload" }, enabled = true)
public class CMSArchiveUploadTestCase extends JBossPortalSeleniumTestCase {
+ private static final String ARCHIVE_WAITING = "90000";
/* uncomment following lines and set the right path to the workspace in the case
* you want to use this test case locally from eclipse */
-
/*
{
System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/");
}
*/
-
private static final String SUB_CANCEL_ARCH_UPLOAD = "cancel";
private static final String LNK_ADMIN = "link=Admin";
private static final String LNK_CMS = "link=CMS";
@@ -45,6 +44,7 @@
public void testArchiveUpload() {
//System.out.println("archive adress:" + WORKSPACE);
// canceling at the first stage
+
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_CMS);
@@ -85,7 +85,7 @@
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
- selenium.setSpeed("60000");
+ selenium.setSpeed(ARCHIVE_WAITING);
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -119,7 +119,7 @@
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
- selenium.setSpeed("60000");
+ selenium.setSpeed(ARCHIVE_WAITING);
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -154,7 +154,7 @@
Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
- selenium.setSpeed("60000");
+ selenium.setSpeed(ARCHIVE_WAITING);
selenium.click("link=Home");
selenium.setSpeed("0");
selenium.waitForPageToLoad(PAGE_LOAD);
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 2008-10-31 13:30:18 UTC (rev 12222)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2008-10-31 15:31:30 UTC (rev 12223)
@@ -12,6 +12,8 @@
@Test(groups = { "cms_file_upload" }, enabled = true)
public class CMSFileUploadTestCase extends JBossPortalSeleniumTestCase {
+ /* uncomment following lines and set the right path to the workspace in the case
+ * you want to use this test case locally from eclipse */
/*
{
System.setProperty("workspace","/home/vrockai/workspace/selenium/selenium/"
@@ -91,10 +93,10 @@
selenium.type("response", WORKSPACE + "/test_files/testFile.txt");
selenium.click("submit");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+/*
selenium.click("link=Approve");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+*/
Assert.assertEquals(selenium.getText("//div[@id='center']/div/div/ul/li[3]"), "testFile.txt");
Assert.assertTrue(selenium.isElementPresent("link=text/plain"));
Assert.assertTrue(selenium.isElementPresent("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-31 13:30:18 UTC (rev 12222)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-31 15:31:30 UTC (rev 12223)
@@ -1,5 +1,6 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="SeleniumTest">
+
<test verbose="2" name="org.jboss.portal.test.selenium.UserLoginTestCase" annotations="JDK">
<classes>
<class name="org.jboss.portal.test.selenium.UserLoginTestCase"/>
@@ -14,13 +15,13 @@
<classes>
<class name="org.jboss.portal.test.selenium.IdentityAdminTestCase"></class></classes>
</test>
- <!--
+
<test name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"
verbose="2" annotations="JDK">
<classes>
<class name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"></class></classes>
</test>
- -->
+
<test name="org.jboss.portal.test.selenium.WSRPTestCase"
verbose="2" annotations="JDK">
<classes>
@@ -50,7 +51,7 @@
<classes>
<class name="org.jboss.portal.test.selenium.cms.CMSDirectoryTestCase"></class></classes>
</test>
-
+ -->
<test name="org.jboss.portal.test.selenium.cms.CMSFileUploadTestCase"
verbose="2" annotations="JDK">
<classes>
15 years, 6 months
JBoss Portal SVN: r12222 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-31 09:30:18 -0400 (Fri, 31 Oct 2008)
New Revision: 12222
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
Log:
cms secure fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-31 12:22:33 UTC (rev 12221)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-31 13:30:18 UTC (rev 12222)
@@ -17,7 +17,9 @@
public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
private static final String LNK_EXPLORE = "//area[@href='/portal/content/default/epp.html']";
+ private static final String LNK_CMS_EXPLORE = "Link=epp.html";
private static final String LNK_SUPPORT_HTML = "//area[@href='/portal/content/default/project.html']";
+ private static final String LNK_CMS_SUPPORT_HTML = "Link=project.html";
private static final String LNK_MEMBERS = "link=Members";
private static final String SUB_SECURITY_SET = "//input[contains(@name,'submit')]";
private static final String SEL_SECUREUSERS_MANAGE = "//select[contains(@name,'secureusers:manage')]";
@@ -98,7 +100,7 @@
public void testSetAdminReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied"), "Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
"Non secured resource is not visible.#2");
@@ -122,10 +124,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#1");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied"), "Secured resource is visible.#1");
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#2");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied"), "Secured resource is visible.#2");
logout();
}
@@ -137,7 +139,7 @@
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied"), "Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
"Non secured resource is not visible.#2");
@@ -162,9 +164,9 @@
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
- "Non secured resource is not visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied "), "Non secured resource is not visible.#1");
+ //Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
+ // "Non secured resource is not visible.#2");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -183,10 +185,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#1");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied "), "Secured resource is visible.#1");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied "), "Secured resource is visible.#2");
logout();
}
@@ -197,7 +199,7 @@
assignRole("user", "user(a)portal.com", "secRole", "secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied"), "Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
"Non secured resource is not visible.#2");
@@ -218,10 +220,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible after logout.");
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied"), "Secured resource is visible after logout.");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible for the \"user\".");
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied"), "Non secured resource is not visible for the \"user\".");
logout();
}
@@ -232,7 +234,7 @@
deassignRole("user", "user(a)portal.com", "secRole", "secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"));
+ Assert.assertFalse(selenium.isTextPresent("Access to this resource is denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
selenium.click(LNK_ADMIN);
@@ -252,11 +254,11 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied"));
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"));
+ Assert.assertTrue(selenium.isTextPresent("Access to this resource is denied"));
logout();
}
@@ -305,7 +307,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LNK_SUPPORT_HTML);
+ selenium.click(LNK_CMS_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
15 years, 6 months
JBoss Portal SVN: r12221 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-10-31 08:22:33 -0400 (Fri, 31 Oct 2008)
New Revision: 12221
Removed:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Constants.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/theme/
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java
modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
Log:
- Rollback
Deleted: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Constants.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Constants.java 2008-10-31 12:05:41 UTC (rev 12220)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/Constants.java 2008-10-31 12:22:33 UTC (rev 12221)
@@ -1,71 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, 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. *
- ******************************************************************************/
-package org.jboss.portal.presentation.ajax.client;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class Constants
-{
-
- /** . */
- public static final String LAYOUT_ID = "org.jboss.portal.presentation.layout_id";
-
- /** . */
- public static final String SIMPLE_LAYOUT = "simple";
-
- /** . */
- public static final String REGION_LAYOUT = "region";
-
- /** . */
- public static final String DESKTOP_LAYOUT = "desktop";
-
- /** . */
- public static final String SIMPLE_LAYOUT_ORIENTATION = "org.jboss.portal.presentation.layout.simple.orientation";
-
- /** . */
- public static final String SIMPLE_LAYOUT_INDEX = "org.jboss.portal.presentation.layout.simple.index";
-
- /** . */
- public static final String VERTICAL_ORIENTATION = "vertical";
-
- /** . */
- public static final String HORIZONTAL_ORIENTATION = "horizontal";
-
- /** . */
- public static final String REGION_LAYOUT_TEMPLATE = "org.jboss.portal.presentation.layout.region.template";
-
- /** . */
- public static final String REGION_LAYOUT_NAME = "org.jboss.portal.presentation.layout.region.name";
-
- /** . */
- public static final String REGION_LAYOUT_INDEX = "org.jboss.portal.presentation.layout.region.index";
-
- /** . */
- public static final String DESKTOP_LAYOUT_X = "org.jboss.portal.presentation.layout.desktop.x";
-
- /** . */
- public static final String DESKTOP_LAYOUT_Y = "org.jboss.portal.presentation.layout.desktop.y";
-
-}
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java 2008-10-31 12:05:41 UTC (rev 12220)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java 2008-10-31 12:22:33 UTC (rev 12221)
@@ -31,10 +31,10 @@
import java.util.Iterator;
import java.util.Map;
-import org.jboss.portal.presentation.ajax.client.Constants;
import org.jboss.portal.presentation.ajax.client.protocol.MoveObjectAction;
import org.jboss.portal.presentation.ajax.client.dnd.Draggable;
import org.jboss.portal.presentation.ajax.client.dnd.Droppable;
+import org.jboss.portal.presentation.layout.Constants;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
Modified: modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java
===================================================================
--- modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-10-31 12:05:41 UTC (rev 12220)
+++ modules/presentation/trunk/classic/src/main/java/org/jboss/portal/presentation/classic/ClassicPresentationClient.java 2008-10-31 12:22:33 UTC (rev 12221)
@@ -23,31 +23,42 @@
package org.jboss.portal.presentation.classic;
import java.io.IOException;
+import java.io.PrintWriter;
import java.io.Writer;
+import java.util.Collection;
+import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.io.IOTools;
import org.jboss.portal.common.io.SerializationFilter;
import org.jboss.portal.common.servlet.URLFormat;
import org.jboss.portal.common.util.Base64;
import org.jboss.portal.presentation.classic.protocol.ClassicActionDecoderContext;
import org.jboss.portal.presentation.classic.protocol.ClassicActionEncoderContext;
-import org.jboss.portal.presentation.classic.theme.Renderer;
-import org.jboss.portal.presentation.classic.theme.RendererContext;
-import org.jboss.portal.presentation.classic.theme.TemplateInfo;
-import org.jboss.portal.presentation.classic.theme.impl.XHTMLTemplateImpl;
-import org.jboss.portal.presentation.classic.theme.info.ThemeInfo;
import org.jboss.portal.presentation.client.PresentationClient;
+import org.jboss.portal.presentation.content.ContentFragment;
import org.jboss.portal.presentation.impl.model.UIModelImpl;
import org.jboss.portal.presentation.impl.model.pull.DetachedUINode;
import org.jboss.portal.presentation.impl.model.pull.DetachedViewPortContext;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextImpl;
import org.jboss.portal.presentation.impl.state.navigational.NavigationalStateContextSerialization;
+import org.jboss.portal.presentation.layout.Layout;
+import org.jboss.portal.presentation.layout.LayoutFactory;
+import org.jboss.portal.presentation.layout.ModelLayoutAdapter;
+import org.jboss.portal.presentation.layout.Orientation;
+import org.jboss.portal.presentation.layout.SimpleLayout;
import org.jboss.portal.presentation.model.UIModel;
+import org.jboss.portal.presentation.model.UINode;
import org.jboss.portal.presentation.model.ViewPort;
import org.jboss.portal.presentation.model.ViewPortScope;
+import org.jboss.portal.presentation.model.ui.UIContext;
+import org.jboss.portal.presentation.model.ui.UILayout;
+import org.jboss.portal.presentation.model.ui.UIObject;
+import org.jboss.portal.presentation.model.ui.UIPage;
+import org.jboss.portal.presentation.model.ui.UIWindow;
import org.jboss.portal.presentation.protocol.ProtocolAction;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
import org.jboss.portal.presentation.protocol.ShowUIObjectResponse;
+import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.protocol.codec.ActionDecoder;
import org.jboss.portal.presentation.protocol.codec.ActionDecoderContext;
import org.jboss.portal.presentation.protocol.codec.ActionEncoder;
@@ -238,14 +249,149 @@
//
DetachedUINode node = context.getNode(nodeId);
-
- // TEST
- ThemeInfo theme = new ThemeInfo(null, null);
- TemplateInfo template = new XHTMLTemplateImpl();
- Renderer renderSet = new Renderer(theme, template);
-
- RendererContext ctx = new RendererContext(encoder, encoderContext, req, resp);
- renderSet.renderDocument(ctx, server, this, node);
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ writer.print("<html><head>");
+
+ writer.print("</head><body>");
+ renderNode(node, writer);
+ writer.print("</body></html>");
}
+ private void renderNode(UINode node, PrintWriter writer)
+ {
+ UIObject object = node.getObject();
+
+ //
+ writer.println("<div style=\"border: 1px solid black\">");
+
+ //
+ if (object instanceof UIContext)
+ {
+ renderChildren(node, writer);
+ }
+ else if (object instanceof UILayout)
+ {
+ if (node.getChildren() != null)
+ {
+ renderPane(node, writer);
+ }
+ else
+ {
+ if (object instanceof UIPage)
+ {
+ ViewUIObjectAction viewPage = new ViewUIObjectAction(object.getId());
+
+ String url = encoder.encode(viewPage, encoderContext);
+
+ writer.print("<div>Link to page <a href=\"" + url + "\">" + object.getId() + "</a></div>");
+ }
+ }
+ }
+ else if (object instanceof UIWindow)
+ {
+ try
+ {
+ ContentFragment content = server.renderWindow(this, object.getId());
+
+ //
+ writer.print("<li class=\"element\">");
+ writer.print("<div>");
+ writer.print("Window " + object.getId());
+ writer.print("</div>");
+ writer.print("<div>");
+ writer.print(content.getMarkup());
+ writer.print("</div>");
+ writer.print("</li>");
+ }
+ catch (PresentationServerException e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ //
+ writer.println("</div>");
+ }
+
+ private void renderPane(UINode node, PrintWriter writer)
+ {
+ LayoutFactory<UINode> layoutFactory = new LayoutFactory<UINode>(new ModelLayoutAdapter());
+
+ //
+ Layout<UINode> layout = layoutFactory.getLayout(node);
+
+ //
+ if (layout instanceof SimpleLayout)
+ {
+ //
+ SimpleLayout<UINode> simpleLayout = (SimpleLayout<UINode>)layout;
+
+ //
+ Orientation orientation = simpleLayout.getOrientation();
+
+ //
+ writer.print("<table>");
+
+ //
+ if (orientation == Orientation.HORIZONTAL)
+ {
+ writer.print("<tr>");
+ }
+
+ //
+ Collection<? extends UINode> children = node.getChildren();
+
+ //
+ if (children != null)
+ {
+ for (UINode child : children)
+ {
+ if (orientation == Orientation.HORIZONTAL)
+ {
+ writer.print("<td>");
+ renderNode(child, writer);
+ writer.print("</td>");
+ }
+ else
+ {
+ writer.print("<tr><td>");
+ renderNode(child, writer);
+ writer.print("</td></tr>");
+ }
+ }
+ }
+
+ //
+ if (orientation == Orientation.HORIZONTAL)
+ {
+ writer.print("</tr>");
+ }
+
+ //
+ writer.print("</table>");
+ }
+ else
+ {
+ throw new NotYetImplemented();
+ }
+ }
+
+ private void renderChildren(UINode node, PrintWriter writer)
+ {
+ Collection<? extends UINode> children = node.getChildren();
+
+ //
+ if (children != null)
+ {
+ for (UINode child : children)
+ {
+ renderNode(child, writer);
+ }
+ }
+ }
}
15 years, 6 months
JBoss Portal SVN: r12220 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium/cms and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-31 08:05:41 -0400 (Fri, 31 Oct 2008)
New Revision: 12220
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
Log:
file text case fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-31 01:31:01 UTC (rev 12219)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-31 12:05:41 UTC (rev 12220)
@@ -16,8 +16,8 @@
@Test(groups = { "cms_secure" }, enabled = true, description = "Setting permissions on the default portlet.")
public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
- private static final String LNK_EXPLORE = "link=Explore";
- private static final String LNK_SUPPORT_HTML = "link=support.html";
+ private static final String LNK_EXPLORE = "//area[@href='/portal/content/default/epp.html']";
+ private static final String LNK_SUPPORT_HTML = "//area[@href='/portal/content/default/project.html']";
private static final String LNK_MEMBERS = "link=Members";
private static final String SUB_SECURITY_SET = "//input[contains(@name,'submit')]";
private static final String SEL_SECUREUSERS_MANAGE = "//select[contains(@name,'secureusers:manage')]";
@@ -98,8 +98,9 @@
public void testSetAdminReadPer() {
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
+ "Non secured resource is not visible.#2");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -121,23 +122,24 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#1");
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#1");
login("user", "user");
- Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#2");
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#2");
logout();
}
@Test(enabled = true, description = "Set user read permissions, login as user.")
public void testSetUserReadPer() {
-
+
// cancelling at first stage
-
+
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
+ "Non secured resource is not visible.#2");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -155,13 +157,14 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
-
+
// really setting the permissions
-
+
login("admin", "admin");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
+ "Non secured resource is not visible.#2");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -180,10 +183,10 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#1");
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#1");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Secured resource is visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Secured resource is visible.#2");
logout();
}
@@ -194,8 +197,9 @@
assignRole("user", "user(a)portal.com", "secRole", "secRoleDisp");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
- Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible.#1");
+ Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),
+ "Non secured resource is not visible.#2");
selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -214,15 +218,15 @@
logout();
- Assert.assertTrue(selenium.isTextPresent("Access Denied"),"Secured resource is visible after logout.");
+ Assert.assertTrue(selenium.isTextPresent("Access Denied"), "Secured resource is visible after logout.");
login("user", "user");
- Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible for the \"user\".");
+ Assert.assertFalse(selenium.isTextPresent("Access Denied"), "Non secured resource is not visible for the \"user\".");
logout();
}
- @Test(enabled = true,description = "Set admin/secRole read permissions, login as user w/o secRole.")
+ @Test(enabled = true, description = "Set admin/secRole read permissions, login as user w/o secRole.")
public void testSetRoleReadPer2() {
login("admin", "admin");
@@ -249,7 +253,7 @@
logout();
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
-
+
login("user", "user");
Assert.assertTrue(selenium.isTextPresent("Access Denied"));
@@ -289,12 +293,10 @@
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium
- .isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
+ Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium
- .isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
+ Assert.assertFalse(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
login("admin", "admin");
selenium.click(LNK_ADMIN);
@@ -317,18 +319,16 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- Assert.assertTrue(selenium
- .isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
+ Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium
- .isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
+ Assert.assertTrue(selenium.isElementPresent("//img[@alt='JBoss Portal 2.7: Go Faster!']"));
}
- //TODO these functions should be used from indetity admin
+ // TODO these functions should be used from indetity admin
void assignRole(String user, String email, String role, String roleDisplay) {
searchUser(user, email);
@@ -336,10 +336,9 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isTextPresent(roleDisplay), "Role display name: " + roleDisplay + " not found on the page.");
- final String ID_CHECK_ROLE = "//input[@name='assign-roles-form:roles' and @value='" + role + "']";
+ final String CHECK_ROLE = MessageFormat.format(IdentityAdminTestCase.ID_CHECK_ROLE, role);
+ selenium.click(CHECK_ROLE);
- selenium.click(ID_CHECK_ROLE);
-
selenium.click(IdentityAdminTestCase.ID_SUBMIT_ASSIGN_ROLE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -347,7 +346,7 @@
selenium.click(butUsrRol_id(user));
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isChecked(ID_CHECK_ROLE), "The role wasn't correctly assigned.");
+ Assert.assertTrue(selenium.isChecked(CHECK_ROLE), "The role wasn't correctly assigned.");
}
@@ -360,8 +359,8 @@
Assert.assertTrue(selenium.isTextPresent(roleDisplay), "Role display name: " + roleDisplay + " not found on the page.");
// check the tempRole check box
- final String ID_CHECK_ROLE = "//input[@name='assign-roles-form:roles' and @value='" + role + "']";
- selenium.click(ID_CHECK_ROLE);
+ final String CHECK_ROLE = MessageFormat.format(IdentityAdminTestCase.ID_CHECK_ROLE, role);
+ selenium.click(CHECK_ROLE);
selenium.click(IdentityAdminTestCase.ID_SUBMIT_ASSIGN_ROLE);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -370,28 +369,36 @@
selenium.click(butUsrRol_id(user));
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertFalse(selenium.isChecked(ID_CHECK_ROLE), "Unassigned role is assigned (checked).");
+ Assert.assertFalse(selenium.isChecked(CHECK_ROLE), "Unassigned role is assigned (checked).");
}
void searchUser(String username, String email) {
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LNK_ADMIN);
+ selenium.click("link=Admin");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LNK_MEMBERS);
+ selenium.click("link=Members");
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_USERTAB);
clickIfVisible(IdentityAdminTestCase.ID_LINK_USERMAIN);
+ clickIfVisible(IdentityAdminTestCase.LINK_USERMANG_MAIN);
selenium.click(IdentityAdminTestCase.LINK_SEARCH_USER);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type(IdentityAdminTestCase.ID_INPUT_SEARCH_USER, username);
selenium.click(IdentityAdminTestCase.ID_SUBMIT_SEARCH_USER);
- selenium.waitForPageToLoad(PAGE_LOAD);
+ // selenium.waitForPageToLoad(PAGE_LOAD);
+ try {
+ Thread.sleep(5000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+
Assert.assertTrue(selenium.isTextPresent(username), "Username was not found.");
Assert.assertTrue(selenium.isTextPresent(email), "User email adress was not found.");
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-31 01:31:01 UTC (rev 12219)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-31 12:05:41 UTC (rev 12220)
@@ -36,7 +36,7 @@
<test name="org.jboss.portal.test.selenium.cms.CMSFileTestCase"
verbose="2" annotations="JDK">
<classes>
- <class name="org.jboss.portal.test.selenium.cms.CMSFileWorkflowTestCase"></class></classes>
+ <class name="org.jboss.portal.test.selenium.cms.CMSFileTestCase"></class></classes>
</test>
<test name="org.jboss.portal.test.selenium.cms.CMSSecureTestCase"
15 years, 6 months
JBoss Portal SVN: r12219 - branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF.
by portal-commits@lists.jboss.org
Author: wesleyhales
Date: 2008-10-30 21:31:01 -0400 (Thu, 30 Oct 2008)
New Revision: 12219
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
Log:
Redirects user to inital facelets page on ViewExpiredException
Modified: branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2008-10-30 15:03:03 UTC (rev 12218)
+++ branches/JBoss_Portal_Branch_2_7/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2008-10-31 01:31:01 UTC (rev 12219)
@@ -57,16 +57,13 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
-
+
+ <!--When turned on, it changes ViewHandler.restoreView() to build the view before asking the StateManager for help.-->
<context-param>
- <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
+ <param-name>facelets.BUILD_BEFORE_RESTORE</param-name>
<param-value>true</param-value>
</context-param>
- <context-param>
- <param-name>com.sun.faces.disableVersionTracking</param-name>
- <param-value>true</param-value>
- </context-param>
<!-- JSF -->
15 years, 6 months
JBoss Portal SVN: r12218 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-30 11:03:03 -0400 (Thu, 30 Oct 2008)
New Revision: 12218
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
Log:
secure testcase fix1
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-30 13:39:03 UTC (rev 12217)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-30 15:03:03 UTC (rev 12218)
@@ -19,13 +19,13 @@
private static final String LNK_EXPLORE = "link=Explore";
private static final String LNK_SUPPORT_HTML = "link=support.html";
private static final String LNK_MEMBERS = "link=Members";
- private static final String SUB_SECURITY_SET = "//input[contains(@id,'submit')]";
- private static final String SEL_SECUREUSERS_MANAGE = "//select[contains(@id,'secureusers:manage')]";
- private static final String SEL_SECUREROLES_MANAGE = "//select[contains(@id,'secureroles:manage')]";
- private static final String SEL_SECUREUSERS_WRITE = "//select[contains(@id,'secureusers:write')]";
- private static final String SEL_SECUREROLES_WRITE = "//select[contains(@id,'secureroles:write')]";
- private static final String SEL_SECUREUSERS_READ = "//select[contains(@id,'secureusers:read')]";
- private static final String SEL_SECUREROLES_READ = "//select[contains(@id,'secureroles:read')]";
+ private static final String SUB_SECURITY_SET = "//input[contains(@name,'submit')]";
+ private static final String SEL_SECUREUSERS_MANAGE = "//select[contains(@name,'secureusers:manage')]";
+ private static final String SEL_SECUREROLES_MANAGE = "//select[contains(@name,'secureroles:manage')]";
+ private static final String SEL_SECUREUSERS_WRITE = "//select[contains(@name,'secureusers:write')]";
+ private static final String SEL_SECUREROLES_WRITE = "//select[contains(@name,'secureroles:write')]";
+ private static final String SEL_SECUREUSERS_READ = "//select[contains(@name,'secureusers:read')]";
+ private static final String SEL_SECUREROLES_READ = "//select[contains(@name,'secureroles:read')]";
private static final String LNK_INDEX_HTML = "link=index.html";
private static final String LNK_DEFAULT = "link=default";
private static final String LNK_CMS = "link=CMS";
15 years, 6 months
JBoss Portal SVN: r12217 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-30 09:39:03 -0400 (Thu, 30 Oct 2008)
New Revision: 12217
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
Log:
cms file testcase fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2008-10-30 13:39:03 UTC (rev 12217)
@@ -199,14 +199,14 @@
clickIfVisible(ID_LINK_CONSCONF);
clickIfVisible(LINK_CONSUMER_HOME);
Assert.assertTrue(selenium.isTextPresent("BEAdel"));
- selenium.captureScreenshot("tabletable");
+
Assert.assertTrue(selenium.isElementPresent(WSRP_CONSUMER_TABLE),"Consumer table not available.");
int r = findTableRow(WSRP_CONSUMER_TABLE, "BEAdel", 0)-1;
Assert.assertFalse(r < 0,"Consumer BEAdel not found");
selenium.click(MessageFormat.format(LINK_T_CONS_DEL,r));
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.captureScreenshot("delete");
+
Assert.assertTrue(selenium.isTextPresent("Delete 'BEAdel' consumer?"));
clickAndWait(SUBMIT_CONSDEL_CONF);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-10-30 13:39:03 UTC (rev 12217)
@@ -13,6 +13,7 @@
@Test(groups = { "cms_file" }, enabled = true)
public class CMSFileTestCase extends JBossPortalSeleniumTestCase {
+ private static final String TBL_CMS_FILEVER = "//div[@id='center']/div/div/table";
public static final String TBL_CMS_FILE = "//div[@id='center']/div/div/div[3]/table";
public static final String TBL_FILE_PENDING = "//div[@id='center']/div/div/table[2]";
@@ -52,7 +53,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=images");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(selenium.isElementPresent("link=logo.gif"));
+ Assert.assertTrue(selenium.isElementPresent("link=jbosslogo.png"));
}
@Test(enabled = true, description = "File properties checking.")
@@ -110,19 +111,22 @@
selenium.select("language", "label=Czech");
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
-
+ /*
Assert.assertTrue(selenium.isElementPresent(TBL_FILE_PENDING));
Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "text/plain", 0) >= 0);
Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "0kb", 1) >= 0);
//Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "admin", 3) >= 0);
-
+
selenium.click("link=Approve");
selenium.waitForPageToLoad(PAGE_LOAD);
+ */
+
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
- Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
- Assert.assertEquals("1.1", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
- Assert.assertEquals("0kb", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[2]"));
- Assert.assertEquals("newFile title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "text/plain", 0)>=0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "0kb", 1)>=0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "1.0", 2)>=0);
+ Assert.assertTrue(findTableRow(TBL_CMS_FILEVER, "newFile title", 5)>=0);
+
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("newFile", selenium.getText("link=newFile"));
@@ -146,7 +150,7 @@
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
- int row = findTableRow("//div[@id='center']/div/div/table", "1.0", 2)+1;
+ int row = findTableRow(TBL_CMS_FILEVER, "1.0", 2)+1;
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
@@ -218,7 +222,7 @@
Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
Assert.assertEquals("1.0", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
Assert.assertEquals("0kb", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[2]"));
- Assert.assertEquals("fileToMove title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[5]"));
+ Assert.assertEquals("fileToMove title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("fileToMove", selenium.getText("link=fileToMove"));
@@ -259,7 +263,7 @@
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
- int row = findTableRow("//div[@id='center']/div/div/table", "1.0", 2)+1;
+ int row = findTableRow(TBL_CMS_FILEVER, "1.0", 2)+1;
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
15 years, 6 months
JBoss Portal SVN: r12216 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: apps and 2 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2008-10-30 09:12:03 -0400 (Thu, 30 Oct 2008)
New Revision: 12216
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/apps/userDetail-portlet.war
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.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/CMSDirectoryTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
Log:
userinterceptor fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/apps/userDetail-portlet.war
===================================================================
(Binary files differ)
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -14,17 +14,17 @@
private static final String SEL_CONTENT_TYPE = "//select[contains(@id,'contentTypesForm:instanceId')]";
private static final String SUB_DEL_FROM_CENTER_REGION = "//input[contains(@id,'layoutForm:l_center')]";
private static final String SEL_CENTER_REGION = "//select[contains(@id,'layoutForm:selectMany_center')]";
- private static final String SUBMIT_ADDCENTER = "//input[contains(@id,'layoutForm:a_center')]";
- private static final String SUBMIT_ADDLEFT = "//input[contains(@id,'layoutForm:a_left')]";
- private static final String LINK_CONFIGURE_DASHBOARD = "link=Configure dashboard";
- private static final String LINK_DASHBOARD = "link=Dashboard";
- private static final String SELECT_PAGE = "//select[contains(@id,'pageNameSelector')]";
- private static final String INPUT_PAGENAME = "//input[contains(@id,':pageName')]";
- private static final String SUBMIT_CREATEPAGE = "//form[contains(@id,'j_id3')]/input[@type='submit']";
- private static final String SELECT_LAYOUT = "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]";
- private static final String SUBMIT_LAYOUTSEL = "//form[contains(@id,'dashboardLayoutForm')]/input[@type='submit']";
- private static final String SELECT_THEME = "//select[contains(@id,'dashboardThemeForm:themeSelector')]";
- private static final String SUBMIT_THEMESEL = "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']";
+ private static final String SUB_ADDCENTER = "//input[contains(@id,'layoutForm:a_center')]";
+ private static final String SUB_ADDLEFT = "//input[contains(@id,'layoutForm:a_left')]";
+ private static final String LNK_CONFIGURE_DASHBOARD = "link=Configure dashboard";
+ private static final String LNK_DASHBOARD = "link=Dashboard";
+ private static final String SEL_PAGE = "//select[contains(@id,'pageNameSelector')]";
+ private static final String INP_PAGENAME = "//input[contains(@id,':pageName')]";
+ private static final String SUB_CREATEPAGE = "//form[contains(@id,'j_id3')]/input[@type='submit']";
+ private static final String SEL_LAYOUT = "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]";
+ private static final String SUB_LAYOUTSEL = "//form[contains(@id,'dashboardLayoutForm')]/input[@type='submit']";
+ private static final String SEL_THEME = "//select[contains(@id,'dashboardThemeForm:themeSelector')]";
+ private static final String SUB_THEMESEL = "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -38,15 +38,15 @@
@Test(enabled = true)
public void testCreatePage() {
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type(INPUT_PAGENAME, "DashTestPage");
+ selenium.type(INP_PAGENAME, "DashTestPage");
- clickAndWait(SUBMIT_CREATEPAGE);
+ clickAndWait(SUB_CREATEPAGE);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=DashTestPage"));
selenium.click("link=DashTestPage");
@@ -56,67 +56,67 @@
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateTheme() {
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,"DashTestPage");
+ selectIfNotSelected(SEL_PAGE,"DashTestPage");
- selenium.select(SELECT_THEME, "label=renaissance");
- selenium.click(SUBMIT_THEMESEL);
+ selenium.select(SEL_THEME, "label=renaissance");
+ selenium.click(SUB_THEMESEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage")) {
- selenium.select(SELECT_PAGE, "label=DashTestPage");
+ if (!selenium.getSelectedLabel(SEL_PAGE).equals("DashTestPage")) {
+ selenium.select(SEL_PAGE, "label=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
}
- Assert.assertEquals(selenium.getSelectedLabel(SELECT_THEME), "renaissance", "Previously selected theme other then expected.");
+ Assert.assertEquals(selenium.getSelectedLabel(SEL_THEME), "renaissance", "Previously selected theme other then expected.");
}
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testUpdateLayout() {
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,"DashTestPage");
+ selectIfNotSelected(SEL_PAGE,"DashTestPage");
- selenium.select(SELECT_LAYOUT, "label=generic");
- selenium.click(SUBMIT_LAYOUTSEL);
+ selenium.select(SEL_LAYOUT, "label=generic");
+ selenium.click(SUB_LAYOUTSEL);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- if (!selenium.getSelectedLabel(SELECT_PAGE).equals("DashTestPage")) {
- selenium.select(SELECT_PAGE, "label=DashTestPage");
+ if (!selenium.getSelectedLabel(SEL_PAGE).equals("DashTestPage")) {
+ selenium.select(SEL_PAGE, "label=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
}
- Assert.assertEquals(selenium.getSelectedLabel(SELECT_LAYOUT), "generic", "Previously selected layout other then expected.");
+ Assert.assertEquals(selenium.getSelectedLabel(SEL_LAYOUT), "generic", "Previously selected layout other then expected.");
}
@Test(enabled = true, dependsOnMethods = { "testCreatePage" })
public void testAddPortlet() {
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,"DashTestPage");
+ selectIfNotSelected(SEL_PAGE,"DashTestPage");
selenium.click("link=Who's online portlet");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(SUBMIT_ADDCENTER);
+ selenium.click(SUB_ADDCENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -131,33 +131,33 @@
final String pageName = "DashMovePage";
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type(INPUT_PAGENAME, pageName);
- selenium.click(SUBMIT_CREATEPAGE);
+ selenium.type(INP_PAGENAME, pageName);
+ selenium.click(SUB_CREATEPAGE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,pageName);
+ selectIfNotSelected(SEL_PAGE,pageName);
selenium.click("link=ExceptionPortletInstance");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(SUBMIT_ADDCENTER);
+ selenium.click(SUB_ADDCENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,pageName);
+ selectIfNotSelected(SEL_PAGE,pageName);
selenium.click("link=Who's online portlet");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(SUBMIT_ADDCENTER);
+ selenium.click(SUB_ADDCENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link="+pageName);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -170,18 +170,18 @@
@Test(enabled = true, dependsOnMethods = { "testAddPortlet" })
public void testDeletePortlet() {
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,"DashTestPage");
+ selectIfNotSelected(SEL_PAGE,"DashTestPage");
selenium.addSelection(SEL_CENTER_REGION, "label=CurrentUsersPortletWindow");
selenium.click(SUB_DEL_FROM_CENTER_REGION);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -193,18 +193,18 @@
@Test(enabled = false, dependsOnMethods = { "testCreatePage" })
public void testAddGooglePortlet() {
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,"DashTestPage");
+ selectIfNotSelected(SEL_PAGE,"DashTestPage");
selenium.select(SEL_CONTENT_TYPE, "label=widget/google");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=Band Culinaria");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(SUBMIT_ADDCENTER);
+ selenium.click(SUB_ADDCENTER);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=DashTestPage");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -222,14 +222,14 @@
// create page
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.type(INPUT_PAGENAME, pageName);
- selenium.click(SUBMIT_CREATEPAGE);
+ selenium.type(INP_PAGENAME, pageName);
+ selenium.click(SUB_CREATEPAGE);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=" + pageName));
@@ -241,18 +241,18 @@
// add weather portlet
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,pageName);
+ selectIfNotSelected(SEL_PAGE,pageName);
selenium.click("Link=*Weather Portlet*");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(SUBMIT_ADDLEFT);
+ selenium.click(SUB_ADDLEFT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=" + pageName);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -270,12 +270,12 @@
// rename portal
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CONFIGURE_DASHBOARD);
+ selenium.click(LNK_CONFIGURE_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
- selectIfNotSelected(SELECT_PAGE,pageName);
+ selectIfNotSelected(SEL_PAGE,pageName);
selenium.type("renameForm:newName", pageNameNew);
selenium.click("renameForm:rename-button");
@@ -284,7 +284,7 @@
// check the portlet again
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DASHBOARD);
+ selenium.click(LNK_DASHBOARD);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=" + pageNameNew);
selenium.waitForPageToLoad(PAGE_LOAD);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -9,23 +9,23 @@
@Test(groups = { "portlet_user_creation" }, enabled = true)
public class PortletUserCreationTestCase extends JBossPortalSeleniumTestCase {
- private static final String SUBMIT_CREATE_CONF = "confirm-form:user";
- public static final String SUBMIT_CREATE_CONF_EDIT = "confirm-form:revise";
+ private static final String SUBMIT_CREATE_CONF = "//input[contains(@id,'confirm-form:user')]";
+ public static final String SUBMIT_CREATE_CONF_EDIT = "//input[contains(@id,'//input[contains(@id,'confirm-form:revise')]";
- private static final String SUBMIT_CREATE_USER = "register-form:submit";
- private static final String SUBMIT_CREATE_USER_CANCEL = "register-form:cancel";
+ private static final String SUBMIT_CREATE_USER = "//input[contains(@id,'register-form:submit')]";
+ private static final String SUBMIT_CREATE_USER_CANCEL = "//input[contains(@id,'register-form:cancel')]";
- private static final String INPUT_USERPASSWDCONF = "register-form:passwordCheck";
+ private static final String INPUT_USERPASSWDCONF = "//input[contains(@id,'register-form:passwordCheckv";
- private static final String INPUT_USERPASSWD = "register-form:password";
+ private static final String INPUT_USERPASSWD = "//input[contains(@id,'register-form:password')]";
- private static final String INPUT_USERMAIL = "register-form:email";
+ private static final String INPUT_USERMAIL = "//input[contains(@id,'register-form:email')]";
- private static final String INPUT_USERNAME = "register-form:username";
+ private static final String INPUT_USERNAME = "//input[contains(@id,'register-form:username')]";
- private static final String LINK_CREATE_USER = "create-account-form:register";
+ private static final String LINK_CREATE_USER = "//a[contains(@id,'create-account-form:register')]";
- private static final String TAB_WELCOME = "register-temp-form:start-link";
+ private static final String TAB_WELCOME = "//a[contains(@id,'register-temp-form:start-link')]";
@Test(enabled = true, description = "Simple user creation.")
public void userCreationTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserInterceptorPortletTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -35,24 +35,24 @@
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=UsersDetailPage");
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
logInfo = selenium.getText("//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
vs = parseUserInterceptorString(logInfo);
- Date d1 = df.parse(vs.get(ind));
+ Date d1 = new Date(Long.valueOf(vs.get(ind)));//df.parse(vs.get(ind));
login(name, passwd);
logout();
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click("link=UsersDetailPage");
- selenium.waitForPageToLoad("30000");
+ selenium.waitForPageToLoad(PAGE_LOAD);
logInfo = selenium.getText("//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
vs = parseUserInterceptorString(logInfo);
- Date d2 = df.parse(vs.get(ind));
+ Date d2 = new Date(Long.valueOf(vs.get(ind)));//df.parse(vs.get(ind));
return d2.compareTo(d1);
}
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 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -22,6 +22,13 @@
}
*/
+ private static final String SUB_CANCEL_ARCH_UPLOAD = "cancel";
+ private static final String LNK_ADMIN = "link=Admin";
+ private static final String LNK_CMS = "link=CMS";
+ private static final String SUB_SEND_ARCHIVE = "submit";
+ private static final String INP_ARCHIVE_FILE = "response";
+ private static final String DIV_ARCHIVE_STATUS = "//div[@id='center']/div/div/table/tbody/tr[2]/td/font";
+ private static final String SEL_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
private final String WORKSPACE = System.getProperty("workspace");
@BeforeMethod( groups = { "log" })
@@ -38,17 +45,17 @@
public void testArchiveUpload() {
//System.out.println("archive adress:" + WORKSPACE);
// canceling at the first stage
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Upload Archive");
+ selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("response", WORKSPACE + "/test_files/archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
- selenium.click("cancel");
+ selenium.click(SUB_CANCEL_ARCH_UPLOAD);
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -60,22 +67,22 @@
Assert.assertFalse(selenium.isElementPresent("link=archive"));
// really uploading the file now
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Upload Archive");
+ selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("response", WORKSPACE + "/test_files/archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/archive.zip");
- selenium.click("submit");
+ selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
//
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertEquals(selenium.getText("//div[@id='center']/div/div/table/tbody/tr[2]/td/font"),
+ Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
selenium.setSpeed("60000");
@@ -96,20 +103,20 @@
public void testManyFilesArchiveUpload() {
//System.out.println("archive adress:" + WORKSPACE);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Upload Archive");
+ selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("response", WORKSPACE + "/test_files/many_files.zip");
+ selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/many_files.zip");
- selenium.click("submit");
+ selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertEquals(selenium.getText("//div[@id='center']/div/div/table/tbody/tr[2]/td/font"),
+ Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
selenium.setSpeed("60000");
@@ -131,20 +138,20 @@
public void testBigArchiveUpload() {
//System.out.println("archive adress:" + WORKSPACE);
- selenium.click("link=Admin");
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click("link=CMS");
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Upload Archive");
+ selenium.select(SEL_ACTION, "label=Upload Archive");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
- selenium.type("response", WORKSPACE + "/test_files/big_archive.zip");
+ selenium.type(INP_ARCHIVE_FILE, WORKSPACE + "/test_files/big_archive.zip");
- selenium.click("submit");
+ selenium.click(SUB_SEND_ARCHIVE);
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertEquals(selenium.getText("//div[@id='center']/div/div/table/tbody/tr[2]/td/font"),
+ Assert.assertEquals(selenium.getText(DIV_ARCHIVE_STATUS),
"Your archive has been accepted for processing. The resources will appear in your Folder once the processing is finished");
selenium.setSpeed("60000");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -13,6 +13,8 @@
@Test(groups = { "cms_directory" }, enabled = true)
public class CMSDirectoryTestCase extends JBossPortalSeleniumTestCase {
+ private static final String SEL_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
+ private static final String ADR_CMS_INTERFACE = "/portal/auth/portal/admin/CMS";
private final String defaultDirName = "default";
private final String tempDirName = "tempDir";
private final String copyDirName = "copySrc";
@@ -40,12 +42,12 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.open("/portal/auth/portal/admin/CMS");
+ selenium.open(ADR_CMS_INTERFACE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent(tempDirName), "Test folder is already present.");
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Create Folder");
+ selenium.select(SEL_CMS_ACTION, "label=Create Folder");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type("newcollectionname", tempDirName);
@@ -61,12 +63,12 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.open("/portal/auth/portal/admin/CMS");
+ selenium.open(ADR_CMS_INTERFACE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium.isTextPresent(tempDirName), "Test folder is already present.");
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Create Folder");
+ selenium.select(SEL_CMS_ACTION, "label=Create Folder");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
selenium.type("newcollectionname", tempDirName);
@@ -146,7 +148,7 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Create Folder");
+ selenium.select(SEL_CMS_ACTION, "label=Create Folder");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
@@ -192,7 +194,7 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Create Folder");
+ selenium.select(SEL_CMS_ACTION, "label=Create Folder");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
@@ -232,7 +234,7 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Create Folder");
+ selenium.select(SEL_CMS_ACTION, "label=Create Folder");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
@@ -280,7 +282,7 @@
selenium.click("link=CMS");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select("//div[@id='center']/div/div/div[1]/div/select", "label=Create Folder");
+ selenium.select(SEL_CMS_ACTION, "label=Create Folder");
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.waitForPopUp("_top", PAGE_LOAD);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -13,9 +13,9 @@
@Test(groups = { "cms_file" }, enabled = true)
public class CMSFileTestCase extends JBossPortalSeleniumTestCase {
- private final String CMS_FILE_TABLE = "//div[@id='center']/div/div/div[3]/table";
- public static final String CMS_FILE_PENDING_TABLE = "//div[@id='center']/div/div/table";
-
+ public static final String TBL_CMS_FILE = "//div[@id='center']/div/div/div[3]/table";
+ public static final String TBL_FILE_PENDING = "//div[@id='center']/div/div/table[2]";
+
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
login("admin", "admin");
@@ -40,7 +40,7 @@
Assert.assertTrue(selenium.isElementPresent("link=private"));
Assert.assertTrue(selenium.isElementPresent("link=index.html"));
Assert.assertTrue(selenium.isElementPresent("link=project.html"));
- Assert.assertTrue(selenium.isElementPresent("link=support.html"));
+ //Assert.assertTrue(selenium.isElementPresent("link=support.html"));
selenium.click("link=index.html");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium.isElementPresent("link=text/html"));
@@ -80,7 +80,7 @@
Assert.assertEquals("Modified", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[3]/td[5]/b"));
Assert.assertEquals("Title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[3]/td[6]/b"));
- Assert.assertEquals("2kb", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[2]"));
+ Assert.assertEquals("0kb", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[2]"));
Assert.assertEquals("1.0", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
Assert.assertEquals("JBoss Portal", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
@@ -111,15 +111,16 @@
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
- Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "text/plain", 0) >= 0);
- Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "0kb", 1) >= 0);
- Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "admin", 3) >= 0);
+ Assert.assertTrue(selenium.isElementPresent(TBL_FILE_PENDING));
+ Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "text/plain", 0) >= 0);
+ Assert.assertTrue(findTableRow(TBL_FILE_PENDING, "0kb", 1) >= 0);
+ //Assert.assertTrue(findTableRow(CMS_FILE_PENDING_TABLE, "admin", 3) >= 0);
selenium.click("link=Approve");
-
+ selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
- Assert.assertEquals("1.0", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
+ Assert.assertEquals("1.1", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
Assert.assertEquals("0kb", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[2]"));
Assert.assertEquals("newFile title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
selenium.click("link=Home");
@@ -217,12 +218,12 @@
Assert.assertEquals("text/plain", selenium.getText("link=text/plain"));
Assert.assertEquals("1.0", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[3]"));
Assert.assertEquals("0kb", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[2]"));
- Assert.assertEquals("fileToMove title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[6]"));
+ Assert.assertEquals("fileToMove title", selenium.getText("//div[@id='center']/div/div/table/tbody/tr[4]/td[5]"));
selenium.click("link=Home");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("fileToMove", selenium.getText("link=fileToMove"));
- int row = findTableRow(CMS_FILE_TABLE, "fileToMove", 0)+1;
+ int row = findTableRow(TBL_CMS_FILE, "fileToMove", 0)+1;
selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select", "label=Move");
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select/option[3]");
@@ -269,7 +270,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("file2copy", selenium.getText("link=file2copy"));
- row = findTableRow(CMS_FILE_TABLE, "file2copy", 0)+1;
+ row = findTableRow(TBL_CMS_FILE, "file2copy", 0)+1;
selenium.select("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select", "label=Copy");
selenium.click("//div[@id='center']/div/div/div[3]/table/tbody/tr["+row+"]/td[2]/form/select/option[3]");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2008-10-30 13:12:03 UTC (rev 12216)
@@ -16,30 +16,30 @@
@Test(groups = { "cms_secure" }, enabled = true, description = "Setting permissions on the default portlet.")
public class CMSSecureTestCase extends JBossPortalSeleniumTestCase {
- private static final String LINK_EXPLORE = "link=Explore";
- private static final String LINK_SUPPORT_HTML = "link=support.html";
- private static final String LINK_MEMBERS = "link=Members";
- private static final String SUBMIT_SECURITY_SET = "submit";
- private static final String SELECT_SECUREUSERS_MANAGE = "secureusers:manage";
- private static final String SELECT_SECUREROLES_MANAGE = "secureroles:manage";
- private static final String SELECT_SECUREUSERS_WRITE = "secureusers:write";
- private static final String SELECT_SECUREROLES_WRITE = "secureroles:write";
- private static final String SELECT_SECUREUSERS_READ = "secureusers:read";
- private static final String SELECT_SECUREROLES_READ = "secureroles:read";
- private static final String LINK_INDEX_HTML = "link=index.html";
- private static final String LINK_DEFAULT = "link=default";
- private static final String LINK_CMS = "link=CMS";
- private static final String LINK_ADMIN = "link=Admin";
- private static final String LINK_LOGOUT = "link=Logout";
- private static final String SELECT_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
+ private static final String LNK_EXPLORE = "link=Explore";
+ private static final String LNK_SUPPORT_HTML = "link=support.html";
+ private static final String LNK_MEMBERS = "link=Members";
+ private static final String SUB_SECURITY_SET = "//input[contains(@id,'submit')]";
+ private static final String SEL_SECUREUSERS_MANAGE = "//select[contains(@id,'secureusers:manage')]";
+ private static final String SEL_SECUREROLES_MANAGE = "//select[contains(@id,'secureroles:manage')]";
+ private static final String SEL_SECUREUSERS_WRITE = "//select[contains(@id,'secureusers:write')]";
+ private static final String SEL_SECUREROLES_WRITE = "//select[contains(@id,'secureroles:write')]";
+ private static final String SEL_SECUREUSERS_READ = "//select[contains(@id,'secureusers:read')]";
+ private static final String SEL_SECUREROLES_READ = "//select[contains(@id,'secureroles:read')]";
+ private static final String LNK_INDEX_HTML = "link=index.html";
+ private static final String LNK_DEFAULT = "link=default";
+ private static final String LNK_CMS = "link=CMS";
+ private static final String LNK_ADMIN = "link=Admin";
+ private static final String LNK_LOGOUT = "link=Logout";
+ private static final String SEL_CMS_ACTION = "//div[@id='center']/div/div/div[1]/div/select";
@AfterMethod(groups = { "log" })
public void logoutAfterTestIfPossible() {
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- if (selenium.isElementPresent(LINK_LOGOUT)) {
- selenium.click(LINK_LOGOUT);
+ if (selenium.isElementPresent(LNK_LOGOUT)) {
+ selenium.click(LNK_LOGOUT);
selenium.waitForPageToLoad(PAGE_LOAD);
}
@@ -48,23 +48,23 @@
private void resetSecurity() {
login("admin", "admin");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=Anonymous");
- selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.select(SELECT_SECUREROLES_WRITE, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_WRITE, "label=admin");
- selenium.select(SELECT_SECUREROLES_MANAGE, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_MANAGE, "label=admin");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.select(SEL_SECUREROLES_READ, "label=Anonymous");
+ selenium.select(SEL_SECUREUSERS_READ, "label=admin");
+ selenium.select(SEL_SECUREROLES_WRITE, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_WRITE, "label=admin");
+ selenium.select(SEL_SECUREROLES_MANAGE, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_MANAGE, "label=admin");
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
}
@@ -76,9 +76,9 @@
login("admin", "admin");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_MEMBERS);
+ selenium.click(LNK_MEMBERS);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_ROLETAB);
@@ -101,22 +101,22 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
+ selenium.select(SEL_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_READ, "label=admin");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -139,18 +139,18 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_READ, "label=user");
+ selenium.select(SEL_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_READ, "label=user");
selenium.click("cancel");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -163,19 +163,19 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_READ, "label=user");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.select(SEL_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_READ, "label=user");
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -197,19 +197,19 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"),"Non secured resource is not visible.#1");
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"),"Non secured resource is not visible.#2");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
- selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.select(SEL_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SEL_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -231,19 +231,19 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
- selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.select(SEL_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SEL_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -266,19 +266,19 @@
Assert.assertFalse(selenium.isTextPresent("Access Denied"));
Assert.assertFalse(selenium.isTextPresent("You are not allowed to access the following resource - /default/index.html"));
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_INDEX_HTML);
+ selenium.click(LNK_INDEX_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=secRoleDisp");
- selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.select(SEL_SECUREROLES_READ, "label=secRoleDisp");
+ selenium.select(SEL_SECUREUSERS_READ, "label=admin");
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -291,29 +291,29 @@
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
- selenium.click(LINK_EXPLORE);
+ selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertFalse(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
login("admin", "admin");
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_CMS);
+ selenium.click(LNK_CMS);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_DEFAULT);
+ selenium.click(LNK_DEFAULT);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_SUPPORT_HTML);
+ selenium.click(LNK_SUPPORT_HTML);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_CMS_ACTION, "label=Secure");
+ selenium.select(SEL_CMS_ACTION, "label=Secure");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.select(SELECT_SECUREROLES_READ, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_READ, "label=admin");
- selenium.select(SELECT_SECUREROLES_WRITE, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_WRITE, "label=admin");
- selenium.select(SELECT_SECUREROLES_MANAGE, "label=Administrators");
- selenium.select(SELECT_SECUREUSERS_MANAGE, "label=admin");
- selenium.click(SUBMIT_SECURITY_SET);
+ selenium.select(SEL_SECUREROLES_READ, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_READ, "label=admin");
+ selenium.select(SEL_SECUREROLES_WRITE, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_WRITE, "label=admin");
+ selenium.select(SEL_SECUREROLES_MANAGE, "label=Administrators");
+ selenium.select(SEL_SECUREUSERS_MANAGE, "label=admin");
+ selenium.click(SUB_SECURITY_SET);
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
@@ -321,7 +321,7 @@
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
selenium.open("/portal/portal/default");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_EXPLORE);
+ selenium.click(LNK_EXPLORE);
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertTrue(selenium
.isTextPresent("Thank you for downloading and deploying JBoss Portal. We hope your enjoy working with it as much as we enjoy developing it!"));
@@ -377,9 +377,9 @@
void searchUser(String username, String email) {
selenium.open("/portal/");
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_ADMIN);
+ selenium.click(LNK_ADMIN);
selenium.waitForPageToLoad(PAGE_LOAD);
- selenium.click(LINK_MEMBERS);
+ selenium.click(LNK_MEMBERS);
selenium.waitForPageToLoad(PAGE_LOAD);
clickIfVisible(IdentityAdminTestCase.ID_LINK_USERTAB);
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-29 17:12:44 UTC (rev 12215)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/testng.xml 2008-10-30 13:12:03 UTC (rev 12216)
@@ -14,13 +14,13 @@
<classes>
<class name="org.jboss.portal.test.selenium.IdentityAdminTestCase"></class></classes>
</test>
-
+ <!--
<test name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"
verbose="2" annotations="JDK">
<classes>
<class name="org.jboss.portal.test.selenium.PortletUserCreationTestCase"></class></classes>
</test>
-
+ -->
<test name="org.jboss.portal.test.selenium.WSRPTestCase"
verbose="2" annotations="JDK">
<classes>
15 years, 6 months
JBoss Portal SVN: r12214 - in branches/JBoss_Portal_Branch_2_6/core-cms/src: resources/portal-cms-war/WEB-INF/classes and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-10-29 13:09:00 -0400 (Wed, 29 Oct 2008)
New Revision: 12214
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
Log:
JBPORTAL-2222: Moving a folder into itself in CMS raise an exception
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-10-29 17:05:23 UTC (rev 12213)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-10-29 17:09:00 UTC (rev 12214)
@@ -1158,7 +1158,25 @@
String sTo = aReq.getParameter("destination");
String sFrom = aReq.getParameter("source");
String sType = aReq.getParameter("type");
+
+ if (sTo.startsWith(sFrom))
+ {
+ List messages = new ArrayList();
+ messages.add(this.resources.getObject("CMS_CANT_MOVE_SAME_DESTINATION"));
+ aReq.getPortletSession().setAttribute("messages", messages);
+ try
+ {
+ String sParentPath = NodeUtil.getParentPath(sFrom);
+ aRes.setRenderParameter("path", sParentPath);
+ }
+ catch (Exception e)
+ {
+ }
+ return;
+ }
+
+
if (!"".equals(sTo) && !"".equals(sFrom) && !"".equals(sType))
{
String sNodeName = sFrom.substring(sFrom.lastIndexOf("/") + 1, sFrom.length());
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-10-29 17:05:23 UTC (rev 12213)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-10-29 17:09:00 UTC (rev 12214)
@@ -145,6 +145,7 @@
CMS_FOLDERNAME_INVALID=Folder Name is invalid. It may not contain illegal characters such as '.', '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character.
CMS_MSG_DESTINATION_ALREADY_EXISTS=The command was not performed, because the destination already exists.
+CMS_CANT_MOVE_SAME_DESTINATION=You cannot move a folder to the same location
CMS_DATE_PATTERN=MM/dd/yy HH:mm
15 years, 6 months