gatein SVN: r3305 - portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-12 09:15:54 -0400 (Sat, 12 Jun 2010)
New Revision: 3305
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
Log:
GTNPORTAL-1288 : the layout edition does not work correctly if drag a portlet out of a container
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-06-12 07:27:18 UTC (rev 3304)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-06-12 13:15:54 UTC (rev 3305)
@@ -358,9 +358,25 @@
ContainerData srcContainer = src.getPortalLayout();
UIContainer dstContainer = template.getRootComponent();
+ // Workaround to have the real source container used as the model / UI layer lose this
+ // ID which lead to bugs
+ ContainerData realSrcContainer = new ContainerData(
+ dstContainer.getObjectId(),
+ srcContainer.getId(),
+ srcContainer.getName(),
+ srcContainer.getIcon(),
+ srcContainer.getTemplate(),
+ srcContainer.getFactoryId(),
+ srcContainer.getTitle(),
+ srcContainer.getDescription(),
+ srcContainer.getWidth(),
+ srcContainer.getHeight(),
+ srcContainer.getAccessPermissions(),
+ srcContainer.getChildren());
+
//
- save(srcContainer, dstContainer);
- saveChildren(srcContainer, dstContainer);
+ save(realSrcContainer, dstContainer);
+ saveChildren(realSrcContainer, dstContainer);
//
Templatized templatized = dst.getRootNavigation().getTemplatized();
@@ -568,9 +584,33 @@
//
UIContainer rootContainer = dst.getRootComponent();
- LinkedList<ModelChange> childrenChanges = saveChildren(src, rootContainer);
+ // We are creating a new Page with the root container id as this one is lost
+ // in the model / ui layer. Not doing this cause a class cast exception later
+ // so it's likely the best fix we can do at the moment
+ PageData src2 = new PageData(
+ rootContainer.getObjectId(),
+ src.getId(),
+ src.getName(),
+ src.getIcon(),
+ src.getTemplate(),
+ src.getFactoryId(),
+ src.getTitle(),
+ src.getDescription(),
+ src.getWidth(),
+ src.getHeight(),
+ src.getAccessPermissions(),
+ src.getChildren(),
+ src.getOwnerType(),
+ src.getOwnerId(),
+ src.getEditPermission(),
+ src.isShowMaxWindow()
+ );
+
//
+ LinkedList<ModelChange> childrenChanges = saveChildren(src2, rootContainer);
+
+ //
changes.addAll(childrenChanges);
//
@@ -835,7 +875,8 @@
changes.add(new ModelChange.Move(dst.getObjectId(), parentId, dstChildId));
// julien : we do not need to create an update operation
- // as later the update operation will be created when the object
+ // as later the update operation will be created when the
+ // object
// will be processed
}
}
14 years, 3 months
gatein SVN: r3304 - in portal/trunk/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-06-12 03:27:18 -0400 (Sat, 12 Jun 2010)
New Revision: 3304
Removed:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMovedPOM.java
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
portal/trunk/component/portal/src/test/resources/portal/portal/test/pages.xml
Log:
GTNPORTAL-1288 Revert a commit of temporary fix
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-06-11 13:13:58 UTC (rev 3303)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-06-12 07:27:18 UTC (rev 3304)
@@ -825,32 +825,18 @@
String parentId = hierarchyRelationships.get(dstChildId);
if (parentId != null)
{
- try{
// Get the new parent
- UIContainer parent = session.findObjectById(ObjectType.CONTAINER, parentId);
+ UIContainer parent = session.findObjectById(ObjectType.CONTAINER, parentId);
- // Perform the move
- parent.getComponents().add(dstChild);
+ // Perform the move
+ parent.getComponents().add(dstChild);
- //
- changes.add(new ModelChange.Move(dst.getObjectId(), parentId, dstChildId));
+ //
+ changes.add(new ModelChange.Move(dst.getObjectId(), parentId, dstChildId));
- // julien : we do not need to create an update operation
- // as later the update operation will be created when the
- // object
- // will be processed
- }
- catch (ClassCastException ex)
- {
- // minhhoang : In case the parentId refers to the page, there
- // is exception in findObjectId. Hence,
- // we have a temporary try/catch to handle this exception
- Page parent = session.findObjectById(ObjectType.PAGE, parentId);
-
- parent.getRootComponent().getComponents().add(dstChild);
-
- changes.add(new ModelChange.Move(dst.getObjectId(), parentId, dstChildId));
- }
+ // julien : we do not need to create an update operation
+ // as later the update operation will be created when the object
+ // will be processed
}
}
}
Deleted: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMovedPOM.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMovedPOM.java 2010-06-11 13:13:58 UTC (rev 3303)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMovedPOM.java 2010-06-12 07:27:18 UTC (rev 3304)
@@ -1,228 +0,0 @@
-/*
- * Copyright (C) 2010 eXo Platform SAS.
- *
- * 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.exoplatform.portal.config;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-
-/**
- * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
- * @version $Id$
- *
- */
-public class TestMovedPOM extends AbstractPortalTest
-{
-
- private DataStorage dataStorage;
-
- private POMSessionManager sessionManager;
-
- private POMSession session;
-
- public TestMovedPOM(String name)
- {
- super(name);
- }
-
- private final static Map<String, String> MOVE_CHILD_IN_PAGE_SCENARIOS;
-
- private final static Map<String, String> MOVE_CHILD_IN_PORTAL_SCENARIOS;
-
- /**
- * Moving child scenario 's parameters is a pair of source container and destination container
- */
- static{
- MOVE_CHILD_IN_PAGE_SCENARIOS = new HashMap<String, String>();
- MOVE_CHILD_IN_PORTAL_SCENARIOS = new HashMap<String, String>();
- }
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- sessionManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- session = sessionManager.openSession();
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-
- public void testMoveChildInPage() throws Exception
- {
- Page page = dataStorage.getPage("portal::test::testMoveChild");
- assertNotNull(page);
-
- String testApplication = "application_test";
- String testContainer = "container_test";
- int scenarioIndex =0;
-
- for(String srcContainer : MOVE_CHILD_IN_PAGE_SCENARIOS.keySet())
- {
- String dstContainer = MOVE_CHILD_IN_PAGE_SCENARIOS.get(srcContainer);
- String scenarioName = "Test on page, scenario_" + scenarioIndex;
-
- executeMoveChildInPageScenario(scenarioName, page, srcContainer, dstContainer, testApplication);
- executeMoveChildInPageScenario(scenarioName, page, srcContainer, dstContainer, testContainer);
-
- scenarioIndex++;
- }
- }
-
- public void testMoveChildInPortal() throws Exception
- {
- PortalConfig portalConfig = dataStorage.getPortalConfig("test");
- assertNotNull(portalConfig);
-
- String testApplication = "site_layout_application_test";
- String testContainer = "site_layout_container_test";
-
- int scenarioIndex = 0;
-
- for(String srcContainer : MOVE_CHILD_IN_PORTAL_SCENARIOS.keySet())
- {
- String dstContainer = MOVE_CHILD_IN_PORTAL_SCENARIOS.get(srcContainer);
- String scenarioName = "Test on site layout, scenario_" + scenarioIndex;
-
- executeMoveChildInSiteLayoutScenario(scenarioName, portalConfig, srcContainer, dstContainer, testApplication);
- executeMoveChildInSiteLayoutScenario(scenarioName, portalConfig, srcContainer, dstContainer, testContainer);
-
- scenarioIndex++;
- }
- }
-
- public void executeMoveChildInSiteLayoutScenario(String scenarioName, PortalConfig portalConfig, String srcContainerName, String dstContainerName, String movedObjectName) throws Exception
- {
-
- }
-
- private void executeMoveChildInPageScenario(String scenarioName, Page page, String srcContainerName, String dstContainerName, String movedObjectName) throws Exception
- {
- Container srcContainer = findDescendant(page, Container.class, srcContainerName);
- Container dstContainer = findDescendant(page, Container.class, dstContainerName);
- ModelObject movedObject = findDescendant(page, ModelObject.class, movedObjectName);
-
- assertNotNull("Source container is null in " + scenarioName, srcContainer);
- assertNotNull("Destination container is null in " + scenarioName, dstContainer);
- assertNotNull("Moved object is null in " + scenarioName, movedObject);
-
- moveChild(srcContainer, dstContainer, movedObject);
- dataStorage.save(page);
- page = dataStorage.getPage(page.getStorageId());
-
- Container updatedSrcContainer = findDescendant(page, Container.class, srcContainerName);
- Container updatedDstContainer = findDescendant(page, Container.class, dstContainerName);
- ModelObject updatedMovedObject = findDescendant(page, ModelObject.class, movedObjectName);
-
- assertFalse("Source container still contains moved child in " + scenarioName, checkChildExistence(updatedSrcContainer, movedObjectName));
- assertTrue("Destination container does not contain moved child in " + scenarioName, checkChildExistence(updatedDstContainer, movedObjectName));
-
- //Backup the moving changes, needed to run consecutive and pairwise independent scenariosc
- moveChild(updatedDstContainer, updatedSrcContainer, updatedMovedObject);
- dataStorage.save(page);
- page = dataStorage.getPage(page.getStorageId());
-
- }
-
- private void moveChild(Container srcContainer, Container dstContainer, ModelObject modelObject) throws Exception
- {
- List<ModelObject> children = srcContainer.getChildren();
- boolean found = false;
-
- //Clone children list to avoid fail-fast iterator exception
- for(ModelObject child : new ArrayList<ModelObject>(children))
- {
- if(modelObject.getStorageName().equals(modelObject.getStorageName()))
- {
- found = true;
- children.remove(child);
- break;
- }
- }
-
- if(found)
- {
- dstContainer.getChildren().add(modelObject);
- }
- }
-
- private boolean checkChildExistence(Container srcContainer, String childName)
- {
- for(ModelObject child : srcContainer.getChildren())
- {
- if(childName.equals(child.getStorageName()))
- {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Find descendant by name and type
- *
- * @param <T>
- * @param rootContainer
- * @param clazz
- * @param name
- * @return
- */
- private <T> T findDescendant(Container rootContainer, Class<T> clazz, String name)
- {
- if(rootContainer.getStorageName().equals(name))
- {
- return (T)rootContainer;
- }
-
- for(ModelObject child : rootContainer.getChildren())
- {
- if(child.getStorageName().equals(name) && (clazz.isAssignableFrom(child.getClass())))
- {
- return (T)child;
- }
- else if(child instanceof Container)
- {
- T re = findDescendant((Container)child, clazz, name);
- if(re != null)
- {
- return re;
- }
- }
- }
-
- return null;
- }
-}
Modified: portal/trunk/component/portal/src/test/resources/portal/portal/test/pages.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/portal/portal/test/pages.xml 2010-06-11 13:13:58 UTC (rev 3303)
+++ portal/trunk/component/portal/src/test/resources/portal/portal/test/pages.xml 2010-06-12 07:27:18 UTC (rev 3304)
@@ -95,36 +95,4 @@
</container>
</page>
- <page>
- <page-id>portal::test::testMoveChild</page-id>
- <owner-type>portal</owner-type>
- <owner-id>test</owner-id>
- <name>testMoveChild</name>
- <title>testMoveChildTitle</title>
- <factory-id>test_factory_id</factory-id>
- <access-permissions>test_access_permissions</access-permissions>
- <edit-permission>test_edit_permission</edit-permission>
- <container>
- <name>container_1</name>
- <title>container_1_title</title>
- <icon>container_1_icon</icon>
- <description>container_1_description</description>
- </container>
-
- <application>
- <instance-id>portal#testMoveChild:/web/BannerPortlet/banner</instance-id>
- <application-type>application_1_type</application-type>
- <title>application_1_title</title>
- <access-permissions>application_1_access_permissions</access-permissions>
- <description>application_1_description</description>
- </application>
-
- <container>
- <name>container_2</name>
- <title>container_2_title</title>
- <icon>container_2_icon</icon>
- <description>container_2_description</description>
- </container>
-
- </page>
</page-set>
14 years, 3 months
gatein SVN: r3303 - in portal/trunk/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-11 09:13:58 -0400 (Fri, 11 Jun 2010)
New Revision: 3303
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
Log:
GTNPORTAL-1272 : Could not modify access-permission on dashboard portlet window
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-06-11 09:59:48 UTC (rev 3302)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-06-11 13:13:58 UTC (rev 3303)
@@ -479,6 +479,13 @@
String theme = attrs.getValue(MappedAttributes.THEME, null);
//
+ List<String> a = Collections.singletonList(UserACL.EVERYONE);
+ if (srcContainer.isAdapted(ProtectedResource.class)) {
+ ProtectedResource pr = srcContainer.adapt(ProtectedResource.class);
+ a = pr.getAccessPermissions();
+ }
+
+ //
mo = new ApplicationData<Portlet>(
srcContainer.getObjectId(),
component.getName(),
@@ -495,10 +502,7 @@
null,
null,
Collections.<String, String>emptyMap(),
- Collections.singletonList(UserACL.EVERYONE));
- // Julien : the everyone is not great but having null permission
- // means the same thing cf {@link UIPortalComponent} class
- // we need to solve that somehow
+ a);
}
else
{
@@ -677,17 +681,21 @@
// citizen of the portal
if (srcChild instanceof ApplicationData)
{
- ApplicationData app = (ApplicationData)srcChild;
+ ApplicationData<?> app = (ApplicationData)srcChild;
if (app.getType() == ApplicationType.PORTLET && app.getState() instanceof TransientApplicationState)
{
TransientApplicationState<?> state = (TransientApplicationState<?>)app.getState();
String contentId = state.getContentId();
if ("dashboard/DashboardPortlet".equals(contentId))
{
+ DashboardData data;
if (app.getStorageId() != null)
{
UIContainer dstDashboard = session.findObjectById(ObjectType.CONTAINER, app.getStorageId());
- srcChild = loadDashboard(dstDashboard);
+ data = loadDashboard(dstDashboard);
+
+ // Update those attributes as we have to do it now, they don't exist in a container
+ // but do exist in a dashboard container
Attributes attrs = dstDashboard.getAttributes();
attrs.setValue(MappedAttributes.SHOW_INFO_BAR, app.isShowInfoBar());
attrs.setValue(MappedAttributes.SHOW_MODE, app.isShowApplicationMode());
@@ -696,8 +704,27 @@
}
else
{
- srcChild = DashboardData.INITIAL_DASHBOARD;
+ data = DashboardData.INITIAL_DASHBOARD;
}
+
+ //
+ data = new DashboardData(
+ data.getStorageId(),
+ data.getId(),
+ data.getName(),
+ data.getIcon(),
+ data.getTemplate(),
+ data.getFactoryId(),
+ data.getTitle(),
+ data.getDescription(),
+ data.getWidth(),
+ data.getHeight(),
+ app.getAccessPermissions(),
+ data.getChildren()
+ );
+
+ //
+ srcChild = data;
}
}
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-06-11 09:59:48 UTC (rev 3302)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-06-11 13:13:58 UTC (rev 3303)
@@ -35,10 +35,7 @@
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
+import java.util.*;
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
@@ -658,6 +655,7 @@
// Configures the dashboard
Dashboard dashboard = new Dashboard(dashboardId);
+ dashboard.setAccessPermissions(new String[]{"perm1","perm2"});
TransientApplicationState<Portlet> state = new TransientApplicationState<Portlet>("foo/bar");
Application<Portlet> app = Application.createPortletApplication();
app.setState(state);
@@ -673,6 +671,7 @@
// Now check we have the state on the dashboard
dashboard = storage_.loadDashboard(dashboardId);
+ assertEquals(Arrays.asList("perm1","perm2"), Arrays.asList(dashboard.getAccessPermissions()));
assertEquals(1, dashboard.getChildren().size());
app = (Application<Portlet>)dashboard.getChildren().get(0);
assertEquals("foo/bar", storage_.getId(app.getState()));
@@ -706,6 +705,32 @@
assertEquals(3, dashboard.getChildren().size());
}
+ public void testDashboardSecurity() throws Exception
+ {
+ Page page = new Page();
+ page.setPageId("portal::test::foo");
+ Application<Portlet> app = Application.createPortletApplication();
+ app.setAccessPermissions(new String[]{"perm1","perm2"});
+ app.setState(new TransientApplicationState<Portlet>("dashboard/DashboardPortlet"));
+ page.getChildren().add(app);
+ storage_.save(page);
+ page = storage_.getPage("portal::test::foo");
+ String id = page.getChildren().get(0).getStorageId();
+
+ // Load the dashboard itself
+ Dashboard dashboard = storage_.loadDashboard(id);
+ assertEquals(Arrays.asList("perm1","perm2"), Arrays.asList(dashboard.getAccessPermissions()));
+
+ // Modify the dashboard permission
+ dashboard.setAccessPermissions(new String[]{"perm3"});
+ storage_.saveDashboard(dashboard);
+
+ // Load application and check
+ page = storage_.getPage("portal::test::foo");
+ app = (Application<Portlet>)page.getChildren().get(0);
+ assertEquals(Arrays.asList("perm3"), Arrays.asList(app.getAccessPermissions()));
+ }
+
public void testDashboardMoveRight() throws Exception
{
Page page = new Page();
14 years, 3 months
gatein SVN: r3302 - portal/trunk/examples/skins/simpleskin/src/main/webapp/skin/webPortlet/webui/component/UISiteMap.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-06-11 05:59:48 -0400 (Fri, 11 Jun 2010)
New Revision: 3302
Modified:
portal/trunk/examples/skins/simpleskin/src/main/webapp/skin/webPortlet/webui/component/UISiteMap/Stylesheet.css
Log:
GTNPORTAL-1154:Error UI in SItemap when change skin to Simple Skin
Modified: portal/trunk/examples/skins/simpleskin/src/main/webapp/skin/webPortlet/webui/component/UISiteMap/Stylesheet.css
===================================================================
--- portal/trunk/examples/skins/simpleskin/src/main/webapp/skin/webPortlet/webui/component/UISiteMap/Stylesheet.css 2010-06-11 09:40:22 UTC (rev 3301)
+++ portal/trunk/examples/skins/simpleskin/src/main/webapp/skin/webPortlet/webui/component/UISiteMap/Stylesheet.css 2010-06-11 09:59:48 UTC (rev 3302)
@@ -130,7 +130,6 @@
}
.UISitemap .ChildrenContainer {
- padding-top: 30px;
padding-left: 31px; /* orientation=lt */
padding-right: 31px; /* orientation=rt */
float: none;
14 years, 3 months
gatein SVN: r3301 - in portal/trunk/component/portal/src: test/java/org/exoplatform/portal and 1 other directory.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-11 05:40:22 -0400 (Fri, 11 Jun 2010)
New Revision: 3301
Added:
portal/trunk/component/portal/src/main/java/gatein_objects_1_1.xsd
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
Log:
GTNPORTAL-1263: GateIn object 1.1 version to handle width and height
Added: portal/trunk/component/portal/src/main/java/gatein_objects_1_1.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_objects_1_1.xsd (rev 0)
+++ portal/trunk/component/portal/src/main/java/gatein_objects_1_1.xsd 2010-06-11 09:40:22 UTC (rev 3301)
@@ -0,0 +1,192 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+
+<xs:schema
+ targetNamespace="http://www.gatein.org/xml/ns/gatein_objects_1_1"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_1"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- A top page element -->
+ <xs:element name="page" type="pageType"/>
+
+ <!-- A top page-set element -->
+ <xs:element name="page-set" type="pageSetType"/>
+
+ <!-- A top portal-config element -->
+ <xs:element name="portal-config" type="portalConfigType"/>
+
+ <!-- A top container element -->
+ <xs:element name="container" type="containerType"/>
+
+ <!-- A top node-navigation element -->
+ <xs:element name="node-navigation" type="nodeNavigationType"/>
+
+ <!-- The type of a top navigation node -->
+ <xs:complexType name="nodeNavigationType">
+ <xs:sequence>
+ <xs:element name="priority" type="xs:positiveInteger"/>
+ <xs:element name="page-nodes" minOccurs="0" maxOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="node" type="nodeType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The type of a navigation node -->
+ <xs:complexType name="nodeType">
+ <xs:sequence>
+ <xs:element name="uri" type="xs:string"/>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="label" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="start-publication-date" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="end-publication-date" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="visibility" type="visibility" default="VISIBLE" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="page-reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="node" type="nodeType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="visibility">
+ <xs:restriction base='xs:string'>
+ <xs:enumeration value="DISPLAYED"/>
+ <xs:enumeration value="HIDDEN"/>
+ <xs:enumeration value="TEMPORAL"/>
+ <xs:enumeration value="SYSTEM"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="pageSetType">
+ <xs:sequence>
+ <xs:element name="page" type="pageType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portalConfigType">
+ <xs:sequence>
+ <xs:element name="portal-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="locale" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="edit-permission" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="skin" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="properties" type="propertiesType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="portal-layout" minOccurs="1" maxOccurs="1">
+ <xs:complexType>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="propertiesType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="entry" type="propertiesEntryType" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="propertiesEntryType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="key" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:group name="containerChildrenGroup">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portlet-application" type="portletApplicationType" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="container" type="containerType" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="page-body" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="site-body" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="pageType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="factory-id" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="edit-permission" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-max-window" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="containerType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="factory-id" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="width" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="height" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string"/>
+ <xs:attribute name="template" type="xs:string"/>
+ <xs:attribute name="attribute" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="portletApplicationType">
+ <xs:sequence>
+ <xs:element name="portlet" type="portletType" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-info-bar" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-application-state" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-application-mode" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="width" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="height" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletType">
+ <xs:sequence>
+ <xs:element name="application-ref" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="portlet-ref" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="preferences" type="portletPreferencesType" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletPreferencesType">
+ <xs:sequence>
+ <xs:element name="preference" type="portletPreferenceType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletPreferenceType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="read-only" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Added: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java (rev 0)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2010-06-11 09:40:22 UTC (rev 3301)
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * 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.exoplatform.portal;
+
+import junit.framework.TestCase;
+import org.gatein.common.io.IOTools;
+
+import java.io.InputStream;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestXSDCorruption extends TestCase
+{
+
+ private void assertHash(String expected, String resourcePath) throws Exception
+ {
+ InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
+ assertNotNull(in);
+ byte[] bytes = IOTools.getBytes(in);
+ java.security.MessageDigest digester = java.security.MessageDigest.getInstance("MD5");
+ digester.update(bytes);
+ StringBuilder sb = new StringBuilder();
+ for (byte b : digester.digest())
+ {
+ String hex = Integer.toHexString(b);
+ if (hex.length() == 1)
+ {
+ sb.append('0');
+ sb.append(hex.charAt(0));
+ }
+ else
+ {
+ sb.append(hex.substring(hex.length() - 2));
+ }
+ }
+ assertEquals(expected, sb.toString());
+ }
+
+ public void testGateInResources1_0() throws Exception
+ {
+ assertHash("d0591b0a022a0c2929e1aed8979857cd", "gatein_objects_1_0.xsd");
+ assertHash("99ae24c9bbfe1b59e066756a29ab6c79", "gatein_objects_1_1.xsd");
+ assertHash("c68ea6831c3d24a242f63abd2db261a6", "gatein_resources_1_0.xsd");
+ assertHash("c55b7e0dc8ae23e2d34430b38260cd96", "gatein_resources_1_1.xsd");
+ }
+}
14 years, 3 months
gatein SVN: r3300 - in portal/trunk/component: portal/src/main/java and 7 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-06-11 05:11:25 -0400 (Fri, 11 Jun 2010)
New Revision: 3300
Added:
portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd
portal/trunk/component/portal/src/test/resources/org/
portal/trunk/component/portal/src/test/resources/org/exoplatform/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml
Modified:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/XMLValidator.java
portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
Log:
GTNPORTAL-1316: Resource descriptor 1.1 to handle skin module declaration
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/XMLValidator.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/XMLValidator.java 2010-06-11 06:47:02 UTC (rev 3299)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/xml/XMLValidator.java 2010-06-11 09:11:25 UTC (rev 3300)
@@ -28,6 +28,7 @@
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import java.io.IOException;
+import java.util.Map;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -51,9 +52,10 @@
resolver = new ResourceEntityResolver(clazz, systemId, resourcePath);
}
- public String getSystemId()
+ public XMLValidator(Class clazz, Map<String, String> systemIdToResourcePath)
{
- return schemas[0];
+ schemas = systemIdToResourcePath.keySet().toArray(new String[0]);
+ resolver = new ResourceEntityResolver(clazz, systemIdToResourcePath);
}
/**
Modified: portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd 2010-06-11 06:47:02 UTC (rev 3299)
+++ portal/trunk/component/portal/src/main/java/gatein_resources_1_0.xsd 2010-06-11 09:11:25 UTC (rev 3300)
@@ -2,17 +2,17 @@
<!--
Copyright (C) 2009 eXo Platform SAS.
-
+
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
@@ -45,12 +45,11 @@
<xs:complexType name="portal-skin">
<xs:sequence>
<xs:element name="skin-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
- <xs:element name="skin-module" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="css-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="overwrite" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:complexType>
-
+
<!-- Declares a portlet skin resource -->
<xs:complexType name="portlet-skin">
<xs:sequence>
@@ -82,7 +81,7 @@
<xs:element name="style-theme" type="style-theme" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
-
+
<!-- The window style theme -->
<xs:complexType name="style-theme">
<xs:sequence>
@@ -97,7 +96,7 @@
<xs:element name="param" type="param" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
-
+
<xs:complexType name="param">
<xs:sequence>
<!-- The javascript module -->
Added: portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd (rev 0)
+++ portal/trunk/component/portal/src/main/java/gatein_resources_1_1.xsd 2010-06-11 09:11:25 UTC (rev 3300)
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+
+<xs:schema
+ targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_1"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- The root element type that contains the various resource declarations -->
+ <xs:element name="gatein-resources">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portal-skin" type="portal-skin" />
+ <xs:element name="portlet-skin" type="portlet-skin" />
+ <xs:element name="window-style" type="window-style" />
+ <xs:element name="javascript" type="javascript" />
+ <xs:element name="resource-bundle" type="resource-bundle" />
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Declares a portal skin resource -->
+ <xs:complexType name="portal-skin">
+ <xs:sequence>
+ <xs:element name="skin-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="skin-module" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="css-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="overwrite" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a portlet skin resource -->
+ <xs:complexType name="portlet-skin">
+ <xs:sequence>
+ <!-- The portlet application name -->
+ <xs:element name="application-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The portlet name -->
+ <xs:element name="portlet-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The name of the skin to load -->
+ <xs:element name="skin-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The css path of the skin relative to the application context -->
+ <xs:element name="css-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- Overwrite -->
+ <xs:element name="overwrite" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a window style -->
+ <xs:complexType name="window-style" mixed="true">
+ <xs:sequence>
+
+ <!-- The window style name -->
+ <xs:element name="style-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The window style theme -->
+ <xs:element name="style-theme" type="style-theme" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The window style theme -->
+ <xs:complexType name="style-theme">
+ <xs:sequence>
+ <!-- The theme name -->
+ <xs:element name="theme-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a javascript resource -->
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="param">
+ <xs:sequence>
+ <!-- The javascript module -->
+ <xs:element name="js-module" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript path -->
+ <xs:element name="js-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript priority -->
+ <xs:element name="js-priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a resource bundle -->
+ <xs:complexType name="resource-bundle">
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java 2010-06-11 06:47:02 UTC (rev 3299)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java 2010-06-11 09:11:25 UTC (rev 3300)
@@ -33,7 +33,9 @@
import org.w3c.dom.NodeList;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.servlet.ServletContext;
@@ -49,14 +51,25 @@
public static final String GATEIN_RESOURCES_1_0_SYSTEM_ID = "http://www.gatein.org/xml/ns/gatein_resources_1_0";
/** . */
+ public static final String GATEIN_RESOURCES_1_1_SYSTEM_ID = "http://www.gatein.org/xml/ns/gatein_resources_1_1";
+
+ /** . */
private static final String GATEIN_RESOURCE_1_0_XSD_PATH = "gatein_resources_1_0.xsd";
/** . */
- private static final XMLValidator VALIDATOR = new XMLValidator(
- SkinConfigParser.class,
- GATEIN_RESOURCES_1_0_SYSTEM_ID,
- GATEIN_RESOURCE_1_0_XSD_PATH);
+ private static final String GATEIN_RESOURCE_1_1_XSD_PATH = "gatein_resources_1_1.xsd";
+ /** . */
+ private static final XMLValidator VALIDATOR;
+
+ static
+ {
+ Map<String, String> systemIdToResourcePath = new HashMap<String, String>();
+ systemIdToResourcePath.put(GATEIN_RESOURCES_1_0_SYSTEM_ID, GATEIN_RESOURCE_1_0_XSD_PATH);
+ systemIdToResourcePath.put(GATEIN_RESOURCES_1_1_SYSTEM_ID, GATEIN_RESOURCE_1_1_XSD_PATH);
+ VALIDATOR = new XMLValidator(SkinConfigParser.class, systemIdToResourcePath);
+ }
+
public static void processConfigResource(DocumentSource source, SkinService skinService, ServletContext scontext)
{
List<SkinConfigTask> allTasks = fetchTasks(source);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java 2010-06-11 06:47:02 UTC (rev 3299)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java 2010-06-11 09:11:25 UTC (rev 3300)
@@ -12,9 +12,25 @@
public class TestGateInResourceParser extends TestCase
{
- public void testBinding() throws MalformedURLException {
- URL url = this.getClass().getResource("/WEB-INF/gatein-resources.xml");
- assertNotNull("the gatein-resources.xml can not be found", url);
+ public void testResources1_0() throws MalformedURLException
+ {
+ assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_0.xml");
+ }
+
+ public void testResources1_0WithSkinModule() throws MalformedURLException
+ {
+ assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml");
+ }
+
+ public void testResources1_1() throws MalformedURLException
+ {
+ assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_1.xml");
+ }
+
+ private void assertDescriptorCanBeLoaded(String descriptorPath) throws MalformedURLException
+ {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(descriptorPath);
+ assertNotNull("The " + descriptorPath + " can not be found", url);
DocumentSource source = DocumentSource.create(url);
List<SkinConfigTask> tasks = SkinConfigParser.fetchTasks(source);
assertNotNull("There are no tasks", tasks);
Added: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml (rev 0)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0-with-skin-module.xml 2010-06-11 09:11:25 UTC (rev 3300)
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+<gatein-resources
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0 http://www.gatein.org/xml/ns/gatein_resources_1_0"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <skin-module>MyModule</skin-module>
+ <css-path>/skin/Stylesheet.css</css-path>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
Added: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml (rev 0)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_0.xml 2010-06-11 09:11:25 UTC (rev 3300)
@@ -0,0 +1,332 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+<gatein-resources
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0 http://www.gatein.org/xml/ns/gatein_resources_1_0"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/Stylesheet.css</css-path>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
Added: portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml (rev 0)
+++ portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_1.xml 2010-06-11 09:11:25 UTC (rev 3300)
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+<gatein-resources
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_1 http://www.gatein.org/xml/ns/gatein_resources_1_1"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_1">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <skin-module>MyModule</skin-module>
+ <css-path>/skin/Stylesheet.css</css-path>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
14 years, 3 months
gatein SVN: r3299 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-06-11 02:47:02 -0400 (Fri, 11 Jun 2010)
New Revision: 3299
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
Log:
GTNPORTAL-1296 Check permission in server side with some actions by manually from user
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-06-11 06:43:48 UTC (rev 3298)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-06-11 06:47:02 UTC (rev 3299)
@@ -109,10 +109,7 @@
uiApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
UIWorkingWorkspace uiWorkingWS = uiApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
- UIPortal currentPortal = Util.getUIPortal();
- PageNavigation selectedNavigation = currentPortal.getSelectedNavigation();
- UserACL userACL = uiApp.getApplicationComponent(UserACL.class);
- if (!userACL.hasEditPermission(selectedNavigation))
+ if (!hasPageCreationPermission())
{
uiApp.addMessage(new ApplicationMessage("UIPortalManagement.msg.Invalid-CreatePage-Permission", null));
return;
@@ -136,6 +133,19 @@
uiPageSetInfo.setShowPublicationDate(false);
event.getRequestContext().addUIComponentToUpdateByAjax(uiWorkingWS);
}
+
+ private boolean hasPageCreationPermission() throws Exception
+ {
+ UIPortal currentPortal = Util.getUIPortal();
+ UserACL userACL = Util.getUIPortalApplication().getApplicationComponent(UserACL.class);
+ PageNavigation selectedNavigation = currentPortal.getSelectedNavigation();
+ if (PortalConfig.PORTAL_TYPE.equals(selectedNavigation.getOwnerType()))
+ {
+ return userACL.hasEditPermissionOnPortal(currentPortal.getOwnerType(), currentPortal.getOwner(), currentPortal.getEditPermission());
+ }
+
+ return userACL.hasEditPermission(selectedNavigation);
+ }
}
static public class EditInlineActionListener extends EventListener<UIWorkingWorkspace>
14 years, 3 months
gatein SVN: r3298 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-11 02:43:48 -0400 (Fri, 11 Jun 2010)
New Revision: 3298
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html
Log:
TESTVN-399: Create new GateIn Selenium Scrips
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html 2010-06-11 03:43:52 UTC (rev 3297)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html 2010-06-11 06:43:48 UTC (rev 3298)
@@ -57,28 +57,28 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>link=Home</td>
+ <td>echo</td>
+ <td>--Add new page --</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
- <td>link=Home</td>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
<td></td>
</tr>
<tr>
- <td>echo</td>
- <td>--Add new page --</td>
+ <td>clickAt</td>
+ <td>link=Add New Page</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>link=Add New Page</td>
+ <td>link=Home</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
- <td>link=Add New Page</td>
+ <td>link=Home</td>
<td></td>
</tr>
<tr>
14 years, 3 months
gatein SVN: r3297 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-10 23:43:52 -0400 (Thu, 10 Jun 2010)
New Revision: 3297
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_GroupsManagement.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_MembershipsManagement.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_CreateAndEditAndDeleteCategoryInApplicationRegistry.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_AddRemoteAndCreateNewGadget.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ShowOrNotImportApplicationIcon.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_EditPortal.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23_AddNavigation.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25_EditPageOfNode.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_26_MoveUpAndDownANode.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_CreateAndEditPageAndEditSiteLayoutForGroup.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28_AddDragDropInDashboardInApplicationRegistry.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29_AddAndEditAndDeleteTab.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35_CreateNewAccountPrivateMode.html
Log:
TESTVN-399: Clean and improve
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_GroupsManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_GroupsManagement.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_GroupsManagement.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>Test_SNF_PRL_07</title>
+<title>Test_SNF_PRL_07_GroupsManagement</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Test_SNF_PRL_07</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_07_GroupsManagement</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -262,7 +262,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this group?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_MembershipsManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_MembershipsManagement.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_MembershipsManagement.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -52,7 +52,7 @@
<td></td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>clickAt</td>
<td>link=Users and groups management</td>
<td></td>
</tr>
@@ -157,7 +157,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this membership?</td>
<td></td>
</tr>
@@ -172,7 +172,7 @@
<td></td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>link=Sign out</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_CreateAndEditAndDeleteCategoryInApplicationRegistry.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_CreateAndEditAndDeleteCategoryInApplicationRegistry.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_CreateAndEditAndDeleteCategoryInApplicationRegistry.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>SNF_PRL_10</title>
+<title>Test_SNF_PRL_10_CreateAndEditAndDeleteCategoryInApplicationRegistry</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">SNF_PRL_10</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_10_CreateAndEditAndDeleteCategoryInApplicationRegistry</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -212,7 +212,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure to delete this category and all applications on it?</td>
<td></td>
</tr>
@@ -232,7 +232,7 @@
<td></td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>link=Sign out</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_AddApplicationIntoCategory.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>SNF_PRL_11</title>
+<title>Test_SNF_PRL_11_AddApplicationIntoCategory</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">SNF_PRL_11</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_11_AddApplicationIntoCategory</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -42,11 +42,16 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>clickAt</td>
<td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Application Registry</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Application Registry</td>
<td>1,1</td>
@@ -122,6 +127,11 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Save</td>
<td></td>
@@ -287,7 +297,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure to delete this category and all applications on it?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_Portlet.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -42,7 +42,7 @@
<td>gtn</td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
<td></td>
</tr>
@@ -207,7 +207,7 @@
<td></td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>link=Sign out</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_AddRemoteAndCreateNewGadget.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_AddRemoteAndCreateNewGadget.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_AddRemoteAndCreateNewGadget.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -132,7 +132,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure to delete this gadget?</td>
<td></td>
</tr>
@@ -187,7 +187,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure to delete this gadget?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ShowOrNotImportApplicationIcon.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ShowOrNotImportApplicationIcon.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ShowOrNotImportApplicationIcon.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>SNF_PRL_14</title>
+<title>Test_SNF_PRL_14_ShowOrNotImportApplicationIcon</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">SNF_PRL_14</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_14_ShowOrNotImportApplicationIcon</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -37,11 +37,16 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>clickAt</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Application Registry</td>
+ <td></td>
+</tr>
+<tr>
<td>clickAt</td>
<td>link=Application Registry</td>
<td>1,1</td>
@@ -176,7 +181,7 @@
<td>link=Save</td>
<td></td>
</tr>
-<<tr>
+<tr>
<td>waitForElementPresent</td>
<td>link=Close</td>
<td></td>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_CreateNewPortal.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>Test_SNF_PRL_18</title>
+<title>Test_SNF_PRL_18_CreateNewPortal</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Test_SNF_PRL_18</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_18_CreateNewPortal</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -187,7 +187,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this portal?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_EditPortal.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_EditPortal.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_EditPortal.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -352,7 +352,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this node?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_DeletePortal.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>Test_SNF_PRL_20</title>
+<title>Test_SNF_PRL_20_DeletePortal</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Test_SNF_PRL_20</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_20_DeletePortal</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -207,7 +207,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this portal?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21_ChangeUsingPortal.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>Test_SNF_PRL_21</title>
+<title>Test_SNF_PRL_21_ChangeUsingPortal</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">Test_SNF_PRL_21</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_21_ChangeUsingPortal</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -202,7 +202,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this portal?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22_CreateAndEditPageAndEditSiteLayoutForPortal.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -77,7 +77,7 @@
<td>label=French</td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']</td>
<td></td>
</tr>
@@ -172,7 +172,7 @@
<td></td>
</tr>
<tr>
- <td>clickAndWait</td>
+ <td>clickAt</td>
<td>link=Site</td>
<td></td>
</tr>
@@ -207,7 +207,7 @@
<td>label=English</td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>xpath=//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23_AddNavigation.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23_AddNavigation.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23_AddNavigation.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -222,7 +222,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this node?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24_EditNavigationAndEditPropertiesAndDeleteInGroupNavigation.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -242,7 +242,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this node?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25_EditPageOfNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25_EditPageOfNode.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25_EditPageOfNode.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -252,7 +252,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this node?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_26_MoveUpAndDownANode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_26_MoveUpAndDownANode.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_26_MoveUpAndDownANode.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -267,7 +267,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this node?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_CreateAndEditPageAndEditSiteLayoutForGroup.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_CreateAndEditPageAndEditSiteLayoutForGroup.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_CreateAndEditPageAndEditSiteLayoutForGroup.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -482,7 +482,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete this node?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28_AddDragDropInDashboardInApplicationRegistry.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28_AddDragDropInDashboardInApplicationRegistry.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28_AddDragDropInDashboardInApplicationRegistry.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -177,7 +177,7 @@
<td></td>
</tr>
<tr>
- <td>click</td>
+ <td>clickAt</td>
<td>//div[@onclick='eXo.gadget.UIGadget.deleteGadget(this)']</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29_AddAndEditAndDeleteTab.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29_AddAndEditAndDeleteTab.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29_AddAndEditAndDeleteTab.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -297,7 +297,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Really want to remove this dashboard?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30_CreateAndEditPageAndEditSiteLayoutForUser.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -302,7 +302,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Really want to remove this dashboard?</td>
<td></td>
</tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35_CreateNewAccountPrivateMode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35_CreateNewAccountPrivateMode.html 2010-06-11 03:21:00 UTC (rev 3296)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35_CreateNewAccountPrivateMode.html 2010-06-11 03:43:52 UTC (rev 3297)
@@ -4,12 +4,12 @@
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="" />
-<title>SNF_PRL_35</title>
+<title>Test_SNF_PRL_35_CreateNewAccountPrivateMode</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
-<tr><td rowspan="1" colspan="3">SNF_PRL_35</td></tr>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_35_CreateNewAccountPrivateMode</td></tr>
</thead><tbody>
<tr>
<td>open</td>
@@ -157,7 +157,7 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmation</td>
+ <td>assertConfirmation</td>
<td>Are you sure you want to delete test_user_35 user?</td>
<td></td>
</tr>
@@ -167,6 +167,10 @@
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
<tr>
<td>clickAt</td>
<td>link=Sign out</td>
14 years, 3 months
gatein SVN: r3296 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-06-10 23:21:00 -0400 (Thu, 10 Jun 2010)
New Revision: 3296
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html
Log:
TESTVN-399: Create new GateIn Selenium Scrips
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html 2010-06-11 03:21:00 UTC (rev 3296)
@@ -0,0 +1,542 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Site Menu Editor--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Add new page --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>pageName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageName</td>
+ <td>Test_POR_14_07_001</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_POR_14_07_001</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Next to move to step 2</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Next to move to step 3, keep Empty layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Save to complete adding page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Clone a node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div[1]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div[1]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_07_001']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Clone Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Clone Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Paste Clone node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@class='HomeNode']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Edit this node after clone node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit this Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit this Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Page Node Setting--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Choose Page Selector--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='UIFormTabPane']//div[@class='TabsContainer']/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='UIFormTabPane']//div[@class='TabsContainer']/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Search and Select Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Search and Select Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//img[@title='Select Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//img[@title='Select Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Show content of clone node after change--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Check content of original node's page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Test_POR_14_07_001</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Test_POR_14_07_001</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Check page list in Manage Page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Check existing of page with title 'Test_POR_14_07_001'--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>searchTerm</td>
+ <td>Test_POR_14_07_001</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>searchOption</td>
+ <td>label=Title</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete page--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Do you want to delete this page?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//img[@title='Delete Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Do you want to delete this page?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Delete page (node)--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='Test_POR_14_07_001']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Sign out --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 3 months