gatein SVN: r3997 - exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-09-01 00:43:19 -0400 (Wed, 01 Sep 2010)
New Revision: 3997
Modified:
exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
Log:
EXOGTN-55: Update JUnit test
Modified: exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-09-01 04:30:25 UTC (rev 3996)
+++ exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-09-01 04:43:19 UTC (rev 3997)
@@ -216,6 +216,56 @@
assertEquals(true, page2.isShowMaxWindow());
}
+ public void testRenameNode() throws Exception
+ {
+ //Create node
+ PageNode pageNode = new PageNode();
+ String name = "MyPageNode";
+ pageNode.setName(name);
+ pageNode.setUri(name);
+ pageNode.setLabel(name);
+
+ //add node to page navigation
+ String ownerId = "root";
+ String ownerType = "user";
+ PageNavigation nav = storage_.getPageNavigation(ownerType, ownerId);
+ assertNotNull(nav);
+ assertEquals(ownerId, nav.getOwnerId());
+ assertEquals(ownerType, nav.getOwnerType());
+ nav.addNode(pageNode);
+ storage_.save(nav);
+
+ //Rename node
+ PageNavigation nav2 = storage_.getPageNavigation(ownerType, ownerId);
+ assertNotNull(nav2);
+ assertEquals(ownerId, nav2.getOwnerId());
+ assertEquals(ownerType, nav2.getOwnerType());
+
+ PageNode pageNode2 = nav2.getNode(name);
+ assertNotNull(pageNode2);
+ assertEquals(name, pageNode2.getName());
+ assertEquals(name, pageNode2.getLabel());
+ assertEquals(name, pageNode2.getUri());
+
+ String newName = "NewMyPageNode";
+ pageNode2.setName(newName);
+ pageNode2.setUri(newName);
+ pageNode2.setLabel(newName);
+ storage_.save(nav2);
+
+ //Get and compare
+ PageNavigation nav3 = storage_.getPageNavigation(ownerType, ownerId);
+ assertNotNull(nav3);
+ assertEquals(ownerId, nav3.getOwnerId());
+ assertEquals(ownerType, nav3.getOwnerType());
+
+ PageNode pageNode3 = nav3.getNode(newName);
+ assertNotNull(pageNode3);
+ assertEquals(newName, pageNode3.getName());
+ assertEquals(newName, pageNode3.getLabel());
+ assertEquals(newName, pageNode3.getUri());
+ }
+
public void testChangingPortletThemeInPage() throws Exception {
Page page;
Application<?> app;
14 years, 3 months
gatein SVN: r3996 - in portal/branches/branched-r3845/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-09-01 00:30:25 -0400 (Wed, 01 Sep 2010)
New Revision: 3996
Modified:
portal/branches/branched-r3845/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
portal/branches/branched-r3845/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
Log:
GTNPORTAL-1313:Rename a tab in dashboard, always redirect to home page
Modified: portal/branches/branched-r3845/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
--- portal/branches/branched-r3845/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-09-01 04:13:32 UTC (rev 3995)
+++ portal/branches/branched-r3845/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-09-01 04:30:25 UTC (rev 3996)
@@ -204,7 +204,10 @@
//
Described described = dst.adapt(Described.class);
described.setName(node.getLabel());
-
+ if(!dst.getName().equals(((NavigationNodeData) src).getName()))
+ {
+ dst.setName(((NavigationNodeData) src).getName());
+ }
//
Visible visible = dst.adapt(Visible.class);
visible.setVisibility(node.getVisibility());
Modified: portal/branches/branched-r3845/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
--- portal/branches/branched-r3845/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2010-09-01 04:13:32 UTC (rev 3995)
+++ portal/branches/branched-r3845/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2010-09-01 04:30:25 UTC (rev 3996)
@@ -704,71 +704,6 @@
}
}.execute(null);
}
-
- public void testNodeNameImmutability()
- {
- new UnitTest()
- {
- @Override
- protected void execute() throws Exception
- {
- String ownerType = "group";
- String ownerId = "/platform/administrators";
- String formerName = "testtest";
- String updatedName = "updatedupdated";
-
- PageNavigation pageNav = new PageNavigation();
- pageNav.setOwnerType(ownerType);
- pageNav.setOwnerId(ownerId);
-
- storage_.remove(pageNav);
- storage_.create(pageNav);
-
- pageNav = storage_.getPageNavigation(ownerType, ownerId);
- assertNotNull("Could not create navigation!", pageNav);
- PageNode pageNode = new PageNode();
- pageNode.setName(formerName);
- pageNode.setUri(formerName + "_uri");
- pageNode.setLabel(formerName + "_label");
- pageNav.addNode(pageNode);
-
- storage_.save(pageNav);
-
- pageNav = storage_.getPageNavigation(ownerType, ownerId);
- pageNode = pageNav.getNode(formerName);
- //Check if the node with name containing '_' has been created
- assertNotNull("Could not create page node!", pageNode);
- assertEquals(formerName, pageNode.getName());
- assertEquals(formerName + "_uri", pageNode.getUri());
- assertEquals(formerName + "_label", pageNode.getLabel());
-
- pageNode.setName(updatedName);
- pageNode.setUri(updatedName + "_uri");
- pageNode.setLabel(updatedName + "_label");
-
- storage_.save(pageNav);
-
- pageNav = storage_.getPageNavigation(ownerType, ownerId);
- pageNode = pageNav.getNode(updatedName);
- assertNull("Node name has been updated", pageNode);
-
- pageNode = pageNav.getNode(formerName);
- assertNotNull("Could not find node " + formerName, pageNode);
- assertEquals(formerName, pageNode.getName());
- assertEquals(updatedName + "_uri", pageNode.getUri());
- assertEquals(updatedName + "_label", pageNode.getLabel());
-
- for(PageNode node : pageNav.getNodes())
- {
- StringBuffer message = new StringBuffer("Current node metadata: \n");
- message.append("Name: " + node.getName() + "\n");
- message.append("Label: " + node.getLabel() + "\n");
- message.append("Uri: " + node.getUri() + "\n");
- System.out.println(message.toString());
- }
- }
- }.execute(null);
- }
public void testRenewPage()
{
14 years, 3 months
gatein SVN: r3995 - in exo/portal/branches/3.1.x/component/portal/src: test/java/org/exoplatform/portal/config and 1 other directory.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-09-01 00:13:32 -0400 (Wed, 01 Sep 2010)
New Revision: 3995
Modified:
exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
Log:
EXOGTN-55: Rename a tab in dashboard, always redirect to home page
Modified: exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-09-01 02:17:27 UTC (rev 3994)
+++ exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-09-01 04:13:32 UTC (rev 3995)
@@ -204,7 +204,10 @@
//
Described described = dst.adapt(Described.class);
described.setName(node.getLabel());
-
+ if(!dst.getName().equals(((NavigationNodeData) src).getName()))
+ {
+ dst.setName(((NavigationNodeData) src).getName());
+ }
//
Visible visible = dst.adapt(Visible.class);
visible.setVisibility(node.getVisibility());
Modified: exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2010-09-01 02:17:27 UTC (rev 3994)
+++ exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2010-09-01 04:13:32 UTC (rev 3995)
@@ -704,71 +704,6 @@
}
}.execute(null);
}
-
- public void testNodeNameImmutability()
- {
- new UnitTest()
- {
- @Override
- protected void execute() throws Exception
- {
- String ownerType = "group";
- String ownerId = "/platform/administrators";
- String formerName = "testtest";
- String updatedName = "updatedupdated";
-
- PageNavigation pageNav = new PageNavigation();
- pageNav.setOwnerType(ownerType);
- pageNav.setOwnerId(ownerId);
-
- storage_.remove(pageNav);
- storage_.create(pageNav);
-
- pageNav = storage_.getPageNavigation(ownerType, ownerId);
- assertNotNull("Could not create navigation!", pageNav);
- PageNode pageNode = new PageNode();
- pageNode.setName(formerName);
- pageNode.setUri(formerName + "_uri");
- pageNode.setLabel(formerName + "_label");
- pageNav.addNode(pageNode);
-
- storage_.save(pageNav);
-
- pageNav = storage_.getPageNavigation(ownerType, ownerId);
- pageNode = pageNav.getNode(formerName);
- //Check if the node with name containing '_' has been created
- assertNotNull("Could not create page node!", pageNode);
- assertEquals(formerName, pageNode.getName());
- assertEquals(formerName + "_uri", pageNode.getUri());
- assertEquals(formerName + "_label", pageNode.getLabel());
-
- pageNode.setName(updatedName);
- pageNode.setUri(updatedName + "_uri");
- pageNode.setLabel(updatedName + "_label");
-
- storage_.save(pageNav);
-
- pageNav = storage_.getPageNavigation(ownerType, ownerId);
- pageNode = pageNav.getNode(updatedName);
- assertNull("Node name has been updated", pageNode);
-
- pageNode = pageNav.getNode(formerName);
- assertNotNull("Could not find node " + formerName, pageNode);
- assertEquals(formerName, pageNode.getName());
- assertEquals(updatedName + "_uri", pageNode.getUri());
- assertEquals(updatedName + "_label", pageNode.getLabel());
-
- for(PageNode node : pageNav.getNodes())
- {
- StringBuffer message = new StringBuffer("Current node metadata: \n");
- message.append("Name: " + node.getName() + "\n");
- message.append("Label: " + node.getLabel() + "\n");
- message.append("Uri: " + node.getUri() + "\n");
- System.out.println(message.toString());
- }
- }
- }.execute(null);
- }
public void testRenewPage()
{
14 years, 3 months
gatein SVN: r3994 - portal/branches/branched-r3845/webui/core/src/main/java/org/exoplatform/webui/core.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2010-08-31 22:17:27 -0400 (Tue, 31 Aug 2010)
New Revision: 3994
Modified:
portal/branches/branched-r3845/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java
Log:
GTNPORTAL-1449 Can't create sub-page in portal
Modified: portal/branches/branched-r3845/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java
===================================================================
--- portal/branches/branched-r3845/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java 2010-09-01 02:15:44 UTC (rev 3993)
+++ portal/branches/branched-r3845/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java 2010-09-01 02:17:27 UTC (rev 3994)
@@ -299,7 +299,7 @@
"\" onclick=\"eXo.portal.UIPortalControl.collapseTree(this)").append("\">");
}
else {//Null item
- builder.append(" <div class=\"").append(nodeIcon).append("\">");
+ builder.append(" <div class=\"").append(nodeIcon).append("\" onclick=\"").append(actionLink).append("\">");
}
if (uiPopupMenu_ == null)
{
14 years, 3 months
gatein SVN: r3993 - portal/trunk/testsuite/testdefinitions.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-08-31 22:15:44 -0400 (Tue, 31 Aug 2010)
New Revision: 3993
Modified:
portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_MainFunctions_TestDefinition.ods
Log:
Update GateIn_v3.1.0_MainFunctions_TestDefinition.ods and GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
Modified: portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
===================================================================
(Binary files differ)
Modified: portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_MainFunctions_TestDefinition.ods
===================================================================
(Binary files differ)
14 years, 3 months