gatein SVN: r4231 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-17 03:24:49 -0400 (Fri, 17 Sep 2010)
New Revision: 4231
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_022_CheckAddNewPortalWhenUserDoesNotHaveRigtToCreateNewPortal.html
Log:
TESTVN-1006: Create new GateIn Selenium scripts
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_022_CheckAddNewPortalWhenUserDoesNotHaveRigtToCreateNewPortal.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_022_CheckAddNewPortalWhenUserDoesNotHaveRigtToCreateNewPortal.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_022_CheckAddNewPortalWhenUserDoesNotHaveRigtToCreateNewPortal.html 2010-09-17 07:24:49 UTC (rev 4231)
@@ -0,0 +1,317 @@
+<?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_09_022_CheckAddNewPortalWhenUserDoesNotHaveRigtToCreateNewPortal</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_09_022_CheckAddNewPortalWhenUserDoesNotHaveRigtToCreateNewPortal</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Check add new portal when user does not have the right to create a new portal --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=New Staff</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>Confirmpassword</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>firstName</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>lastName</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>email</td>
+ <td>TEST_POR_09_022(a)gmail.com</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose User Profile tab --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIAccountPortlet']/div[1]/div/div/div/div/div/div/div/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>user.language</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>user.language</td>
+ <td>label=English</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>waitForTextPresent</td>
+ <td>You have registered a new account.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>You have registered a new account.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[3]/div/div/div[1]/div/div/div/div/div/div/div/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[3]/div/div/div[1]/div/div/div/div/div/div/div/div[2]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Portal Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Portal Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>Add New Portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextNotPresent</td>
+ <td>Add New Portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>searchTerm</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>searchTerm</td>
+ <td>TEST_POR_09_022</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//form[@id='UISearchForm']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//form[@id='UISearchForm']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//img[@alt='DeleteUser']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//img[@alt='DeleteUser']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete TEST_POR_09_022 user?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>No result found.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>No result found.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 3 months
gatein SVN: r4230 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-17 03:21:12 -0400 (Fri, 17 Sep 2010)
New Revision: 4230
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html
Log:
TestVN-356:Clean and Improve existing Selenium for GateIn
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html 2010-09-17 03:30:39 UTC (rev 4229)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_09_003_CreateNewPortalWithBlankName.html 2010-09-17 07:21:12 UTC (rev 4230)
@@ -78,20 +78,15 @@
</tr>
<tr>
<td>echo</td>
- <td>--Choose Portal Setting--</td>
+ <td>--Portal Setting--</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']</td>
+ <td>name</td>
<td></td>
</tr>
<tr>
- <td>click</td>
- <td>//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']</td>
- <td></td>
-</tr>
-<tr>
<td>type</td>
<td>name</td>
<td></td>
@@ -108,20 +103,40 @@
</tr>
<tr>
<td>echo</td>
+ <td>-- Choose Portal Template --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[1]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[1]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
<td>--Choose Properites--</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>sessionAlive</td>
+ <td></td>
+</tr>
+<tr>
<td>select</td>
<td>sessionAlive</td>
<td>label=On Demand</td>
@@ -133,12 +148,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
@@ -259,12 +274,12 @@
<td></td>
</tr>
<tr>
- <td>waitForConfirmationPresent</td>
+ <td>waitForTextPresent</td>
+ <td>The field "Portal Name :" is required.</td>
<td></td>
- <td></td>
</tr>
<tr>
- <td>assertConfirmation</td>
+ <td>verifyTextPresent</td>
<td>The field "Portal Name :" is required.</td>
<td></td>
</tr>
14 years, 3 months
gatein SVN: r4229 - in portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform: web/application/javascript and 1 other directory.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-09-16 23:30:39 -0400 (Thu, 16 Sep 2010)
New Revision: 4229
Modified:
portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigDeployer.java
portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigRemoval.java
portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java
portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java
Log:
GTNPORTAL-1477 Using gatein-resources.xml should not mandate additional configuration of PortalContainerConfig
Modified: portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigDeployer.java
===================================================================
--- portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigDeployer.java 2010-09-16 16:22:29 UTC (rev 4228)
+++ portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigDeployer.java 2010-09-17 03:30:39 UTC (rev 4229)
@@ -19,9 +19,8 @@
package org.exoplatform.portal.resource;
+import org.exoplatform.commons.utils.Safe;
import org.exoplatform.commons.xml.DocumentSource;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.RootContainer.PortalContainerPostInitTask;
import org.exoplatform.portal.resource.config.xml.SkinConfigParser;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
@@ -53,15 +52,9 @@
/** . */
private static final String GATEIN_CONFIG_RESOURCE = "/WEB-INF/gatein-resources.xml";
- /**
- * The name of the portal container
- */
- private final String portalContainerName;
-
- public GateInSkinConfigDeployer(String portalContainerName, SkinService _skinService)
+ public GateInSkinConfigDeployer(SkinService _skinService)
{
this.skinService = _skinService;
- this.portalContainerName = portalContainerName;
}
@Override
@@ -72,42 +65,29 @@
WebAppLifeCycleEvent waEvent = (WebAppLifeCycleEvent)event;
if (waEvent.getType() == WebAppLifeCycleEvent.ADDED)
{
- ServletContext scontext = null;
- try
+ ServletContext scontext = event.getWebApp().getServletContext();
+ InputStream is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
+ if (is != null)
{
- scontext = event.getWebApp().getServletContext();
- InputStream is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
- if (is == null)
- return;
try
{
- is.close();
+ register(scontext);
}
catch (Exception ex)
{
- // ignore me
+ log.error("An error occurs while registering '" + GATEIN_CONFIG_RESOURCE + "' from the context '"
+ + (scontext == null ? "unknown" : scontext.getServletContextName()) + "'", ex);
}
- final PortalContainerPostInitTask task = new PortalContainerPostInitTask()
+ finally
{
-
- public void execute(ServletContext scontext, PortalContainer portalContainer)
- {
- register(scontext, portalContainer);
- skinService.registerContext(scontext);
- }
- };
- PortalContainer.addInitTask(scontext, task, portalContainerName);
+ Safe.close(is);
+ }
}
- catch (Exception ex)
- {
- log.error("An error occurs while registering '" + GATEIN_CONFIG_RESOURCE + "' from the context '"
- + (scontext == null ? "unknown" : scontext.getServletContextName()) + "'", ex);
- }
}
}
}
- private void register(ServletContext scontext, PortalContainer container)
+ private void register(ServletContext scontext)
{
URL url;
try
@@ -127,5 +107,8 @@
log.error("An error occurs while registering '" + GATEIN_CONFIG_RESOURCE + "' from the context '"
+ (scontext == null ? "unknown" : scontext.getServletContextName()) + "'", ex);
}
+
+ //
+ skinService.registerContext(scontext);
}
}
Modified: portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigRemoval.java
===================================================================
--- portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigRemoval.java 2010-09-16 16:22:29 UTC (rev 4228)
+++ portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/GateInSkinConfigRemoval.java 2010-09-17 03:30:39 UTC (rev 4229)
@@ -36,11 +36,8 @@
private SkinService service;
- private String portalContainerName;
-
- public GateInSkinConfigRemoval(String _portalContainerName, SkinService _service)
+ public GateInSkinConfigRemoval(SkinService _service)
{
- this.portalContainerName = _portalContainerName;
this.service = _service;
}
Modified: portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
--- portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-09-16 16:22:29 UTC (rev 4228)
+++ portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-09-17 03:30:39 UTC (rev 4229)
@@ -151,8 +151,8 @@
portletThemes_ = new HashMap<String, Set<String>>();
portalContainerName = context.getPortalContainerName();
mainResolver = new MainResourceResolver(portalContainerName, skinConfigs_);
- deployer = new GateInSkinConfigDeployer(portalContainerName, this);
- removal = new GateInSkinConfigRemoval(portalContainerName, this);
+ deployer = new GateInSkinConfigDeployer(this);
+ removal = new GateInSkinConfigRemoval(this);
}
/**
Modified: portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java
===================================================================
--- portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2010-09-16 16:22:29 UTC (rev 4228)
+++ portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptConfigService.java 2010-09-17 03:30:39 UTC (rev 4229)
@@ -82,8 +82,8 @@
availableScriptsPaths_ = new ArrayList<String>();
availableScriptsKey_ = new ArrayList<Javascript>();
extendedJavascripts = new HashMap<String, String>();
- deployer = new JavascriptDeployer(context.getPortalContainerName(), this);
- removal = new JavascriptRemoval(context.getPortalContainerName(), this);
+ deployer = new JavascriptDeployer(this);
+ removal = new JavascriptRemoval(this);
object_view_of_merged_JS = new HashMap<String, List<String>>();
}
Modified: portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java
===================================================================
--- portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java 2010-09-16 16:22:29 UTC (rev 4228)
+++ portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptDeployer.java 2010-09-17 03:30:39 UTC (rev 4229)
@@ -19,8 +19,7 @@
package org.exoplatform.web.application.javascript;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.RootContainer.PortalContainerPostInitTask;
+import org.exoplatform.commons.utils.Safe;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.gatein.wci.WebAppEvent;
@@ -29,7 +28,6 @@
import org.gatein.wci.impl.DefaultServletContainerFactory;
import org.picocontainer.Startable;
-import java.io.IOException;
import java.io.InputStream;
import javax.servlet.ServletContext;
@@ -52,15 +50,9 @@
/** . */
private final JavascriptConfigService javascriptService;
- /**
- * The name of the portal container
- */
- private final String portalContainerName;
-
- public JavascriptDeployer(String portalContainerName, JavascriptConfigService javascriptService)
+ public JavascriptDeployer(JavascriptConfigService javascriptService)
{
this.javascriptService = javascriptService;
- this.portalContainerName = portalContainerName;
}
public void start()
@@ -80,47 +72,33 @@
WebAppLifeCycleEvent waEvent = (WebAppLifeCycleEvent)event;
if (waEvent.getType() == WebAppLifeCycleEvent.ADDED)
{
- ServletContext scontext = null;
- try
+ ServletContext scontext = event.getWebApp().getServletContext();
+ InputStream is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
+ if (is != null)
{
- scontext = event.getWebApp().getServletContext();
-
- InputStream is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
- if (is == null)
- return;
try
{
- is.close();
+ register(scontext);
}
catch (Exception ex)
{
- // ignore me
+ LOG.error("An error occurs while registering 'Javascript in gatein-resources.xml' from the context '"
+ + (scontext == null ? "unknown" : scontext.getServletContextName()) + "'", ex);
}
- final PortalContainerPostInitTask task = new PortalContainerPostInitTask()
+ finally
{
-
- public void execute(ServletContext scontext, PortalContainer portalContainer)
- {
- register(scontext, portalContainer);
- }
- };
- PortalContainer.addInitTask(scontext, task, portalContainerName);
+ Safe.close(is);
+ }
}
- catch (Exception ex)
- {
- LOG.error("An error occurs while registering 'Javascript in gatein-resources.xml' from the context '"
- + (scontext == null ? "unknown" : scontext.getServletContextName()) + "'", ex);
- }
}
}
}
- private void register(ServletContext scontext, PortalContainer container)
+ private void register(ServletContext scontext)
{
- InputStream is = null;
+ InputStream is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
try
{
- is = scontext.getResourceAsStream(GATEIN_CONFIG_RESOURCE);
JavascriptConfigParser.processConfigResource(is, javascriptService, scontext);
}
catch (Exception ex)
@@ -130,17 +108,7 @@
}
finally
{
- if (is != null)
- {
- try
- {
- is.close();
- }
- catch (IOException e)
- {
- // ignore me
- }
- }
+ Safe.close(is);
}
}
}
\ No newline at end of file
Modified: portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java
===================================================================
--- portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java 2010-09-16 16:22:29 UTC (rev 4228)
+++ portal/branches/branch-r4047/component/web/resources/src/main/java/org/exoplatform/web/application/javascript/JavascriptRemoval.java 2010-09-17 03:30:39 UTC (rev 4229)
@@ -34,13 +34,10 @@
public class JavascriptRemoval implements WebAppListener, Startable
{
- private String portalContainerName;
-
private JavascriptConfigService javascriptService;
- public JavascriptRemoval(String _portalContainerName, JavascriptConfigService _javascriptService)
+ public JavascriptRemoval(JavascriptConfigService _javascriptService)
{
- this.portalContainerName = _portalContainerName;
this.javascriptService = _javascriptService;
}
14 years, 3 months
gatein SVN: r4228 - in portal/branches/navcontroller: component/web/controller/src/main/java/org/exoplatform/web/controller/metadata and 6 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-09-16 12:22:29 -0400 (Thu, 16 Sep 2010)
New Revision: 4228
Added:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java
Removed:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java
Modified:
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouteDescriptor.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java
portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/LocatorProvider.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
portal/branches/navcontroller/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
Log:
- rename ResourceURL to ControllerURL
- a bit of javadoc
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/application/RequestContext.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -20,10 +20,10 @@
package org.exoplatform.web.application;
import org.exoplatform.services.resources.Orientation;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.web.url.LocatorProvider;
import org.exoplatform.web.url.ResourceLocator;
import org.exoplatform.web.url.ResourceType;
-import org.exoplatform.web.url.ResourceURL;
import java.io.Writer;
import java.util.HashMap;
@@ -86,11 +86,11 @@
*/
public abstract LocatorProvider getLocatorProvider();
- public abstract <R, L extends ResourceLocator<R>> ResourceURL<R, L> newURL(ResourceType<R, L> resourceType, L locator);
+ public abstract <R, L extends ResourceLocator<R>> ControllerURL<R, L> newURL(ResourceType<R, L> resourceType, L locator);
- public final <R, L extends ResourceLocator<R>> ResourceURL<R, L> createURL(ResourceType<R, L> resourceType, R resource)
+ public final <R, L extends ResourceLocator<R>> ControllerURL<R, L> createURL(ResourceType<R, L> resourceType, R resource)
{
- ResourceURL<R, L> url = createURL(resourceType);
+ ControllerURL<R, L> url = createURL(resourceType);
// Set the resource on the URL
url.setResource(resource);
@@ -99,7 +99,7 @@
return url;
}
- public final <R, L extends ResourceLocator<R>> ResourceURL<R, L> createURL(ResourceType<R, L> resourceType)
+ public final <R, L extends ResourceLocator<R>> ControllerURL<R, L> createURL(ResourceType<R, L> resourceType)
{
// Get the provider
LocatorProvider provider = getLocatorProvider();
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouteDescriptor.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouteDescriptor.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouteDescriptor.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -27,6 +27,8 @@
import java.util.Map;
/**
+ * Describes a route.
+ *
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/controller/metadata/RouterDescriptor.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -23,6 +23,8 @@
import java.util.List;
/**
+ * Describe a router.
+ *
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
Copied: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java (from rev 4221, portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java)
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java (rev 0)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ControllerURL.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -0,0 +1,214 @@
+/*
+ * 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.web.url;
+
+import org.gatein.common.util.ParameterMap;
+
+import java.util.Map;
+
+/**
+ * An URL for a resource managed by the controller.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public abstract class ControllerURL<R, L extends ResourceLocator<R>>
+{
+
+ /** . */
+ private static final ParameterMap.AccessMode ACCES_MODE = ParameterMap.AccessMode.get(false, false);
+
+ /** . */
+ protected final L locator;
+
+ /** . */
+ protected Boolean ajax;
+
+ /** . */
+ protected String confirm;
+
+ /** . */
+ protected ParameterMap queryParams;
+
+ /**
+ * Create a resource URL instance.
+ *
+ * @param locator the resource locator that can't be null
+ * @param ajax the ajax mode
+ * @throws NullPointerException if the resource locator is null
+ */
+ public ControllerURL(L locator, Boolean ajax) throws NullPointerException
+ {
+ if (locator == null)
+ {
+ throw new NullPointerException("No null locator");
+ }
+
+ //
+ this.locator = locator;
+ this.ajax = ajax;
+ this.confirm = null;
+ this.queryParams = null;
+ }
+
+ /**
+ * Returns the resource locator of this URL.
+ *
+ * @return the resource locator
+ */
+ public final L getResourceLocator()
+ {
+ return locator;
+ }
+
+ /**
+ * Returns the ajax mode.
+ *
+ * @return the ajax mode
+ */
+ public final Boolean getAjax()
+ {
+ return ajax;
+ }
+
+ /**
+ * Update the ajax mode.
+ *
+ * @param ajax the new ajax mode
+ * @return this object
+ */
+ public final ControllerURL setAjax(Boolean ajax)
+ {
+ this.ajax = ajax;
+ return this;
+ }
+
+ /**
+ * Returns the confirm message.
+ *
+ * @return the confirm message
+ */
+ public String getConfirm()
+ {
+ return confirm;
+ }
+
+ /**
+ * Updates the confirm message.
+ *
+ * @param confirm the new confirm message
+ * @return this object
+ */
+ public final ControllerURL setConfirm(String confirm)
+ {
+ this.confirm = confirm;
+ return this;
+ }
+
+ /**
+ * Returns the current resource associated with this URL.
+ *
+ * @return the resource
+ */
+ public final R getResource()
+ {
+ return locator.getResource();
+ }
+
+ /**
+ * Set a new resource on this URL.
+ *
+ * @param resource the new resource
+ * @return this object
+ */
+ public final ControllerURL setResource(R resource)
+ {
+ locator.setResource(resource);
+ return this;
+ }
+
+ public Map<String, String[]> getQueryParameters()
+ {
+ if (queryParams == null)
+ {
+ queryParams = new ParameterMap(ACCES_MODE);
+ }
+ return queryParams;
+ }
+
+ public String getQueryParameterValue(String parameterName)
+ {
+ if (parameterName == null)
+ {
+ throw new NullPointerException("");
+ }
+ else if (queryParams == null)
+ {
+ return null;
+ }
+ else
+ {
+ String[] parameterValues = queryParams.get(parameterName);
+ return parameterValues != null ? parameterValues[0] : null;
+ }
+ }
+
+ public void setQueryParameterValue(String parameterName, String parameterValue)
+ {
+ if (parameterName == null)
+ {
+ throw new NullPointerException("No null parameter name");
+ }
+ if (queryParams == null)
+ {
+ queryParams = new ParameterMap(ACCES_MODE);
+ }
+ queryParams.setValue(parameterName, parameterValue);
+ }
+
+ public String[] getQueryParameterValues(String parameterName)
+ {
+ if (parameterName == null)
+ {
+ throw new NullPointerException("No null parameter name");
+ }
+ return queryParams != null ? queryParams.getValues(parameterName) : null;
+ }
+
+ public void setQueryParameterValues(String parameterName, String[] parameterValues)
+ {
+ if (parameterName == null)
+ {
+ throw new NullPointerException("No null parameter name");
+ }
+ if (queryParams == null)
+ {
+ queryParams = new ParameterMap(ACCES_MODE);
+ }
+ queryParams.setValues(parameterName, parameterValues);
+ }
+
+ /**
+ * Generates the URL value.
+ *
+ * @return the URL value
+ */
+ public abstract String toString();
+}
Modified: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/LocatorProvider.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/LocatorProvider.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/LocatorProvider.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -20,6 +20,8 @@
package org.exoplatform.web.url;
/**
+ * A provider for locator.
+ *
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
Deleted: portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java
===================================================================
--- portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/component/web/controller/src/main/java/org/exoplatform/web/url/ResourceURL.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -1,214 +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.web.url;
-
-import org.gatein.common.util.ParameterMap;
-
-import java.util.Map;
-
-/**
- * An URL for a resource.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public abstract class ResourceURL<R, L extends ResourceLocator<R>>
-{
-
- /** . */
- private static final ParameterMap.AccessMode ACCES_MODE = ParameterMap.AccessMode.get(false, false);
-
- /** . */
- protected final L locator;
-
- /** . */
- protected Boolean ajax;
-
- /** . */
- protected String confirm;
-
- /** . */
- protected ParameterMap queryParams;
-
- /**
- * Create a resource URL instance.
- *
- * @param locator the resource locator that can't be null
- * @param ajax the ajax mode
- * @throws NullPointerException if the resource locator is null
- */
- public ResourceURL(L locator, Boolean ajax) throws NullPointerException
- {
- if (locator == null)
- {
- throw new NullPointerException("No null locator");
- }
-
- //
- this.locator = locator;
- this.ajax = ajax;
- this.confirm = null;
- this.queryParams = null;
- }
-
- /**
- * Returns the resource locator of this URL.
- *
- * @return the resource locator
- */
- public final L getResourceLocator()
- {
- return locator;
- }
-
- /**
- * Returns the ajax mode.
- *
- * @return the ajax mode
- */
- public final Boolean getAjax()
- {
- return ajax;
- }
-
- /**
- * Update the ajax mode.
- *
- * @param ajax the new ajax mode
- * @return this object
- */
- public final ResourceURL setAjax(Boolean ajax)
- {
- this.ajax = ajax;
- return this;
- }
-
- /**
- * Returns the confirm message.
- *
- * @return the confirm message
- */
- public String getConfirm()
- {
- return confirm;
- }
-
- /**
- * Updates the confirm message.
- *
- * @param confirm the new confirm message
- * @return this object
- */
- public final ResourceURL setConfirm(String confirm)
- {
- this.confirm = confirm;
- return this;
- }
-
- /**
- * Returns the current resource associated with this URL.
- *
- * @return the resource
- */
- public final R getResource()
- {
- return locator.getResource();
- }
-
- /**
- * Set a new resource on this URL.
- *
- * @param resource the new resource
- * @return this object
- */
- public final ResourceURL setResource(R resource)
- {
- locator.setResource(resource);
- return this;
- }
-
- public Map<String, String[]> getQueryParameters()
- {
- if (queryParams == null)
- {
- queryParams = new ParameterMap(ACCES_MODE);
- }
- return queryParams;
- }
-
- public String getQueryParameterValue(String parameterName)
- {
- if (parameterName == null)
- {
- throw new NullPointerException("");
- }
- else if (queryParams == null)
- {
- return null;
- }
- else
- {
- String[] parameterValues = queryParams.get(parameterName);
- return parameterValues != null ? parameterValues[0] : null;
- }
- }
-
- public void setQueryParameterValue(String parameterName, String parameterValue)
- {
- if (parameterName == null)
- {
- throw new NullPointerException("No null parameter name");
- }
- if (queryParams == null)
- {
- queryParams = new ParameterMap(ACCES_MODE);
- }
- queryParams.setValue(parameterName, parameterValue);
- }
-
- public String[] getQueryParameterValues(String parameterName)
- {
- if (parameterName == null)
- {
- throw new NullPointerException("No null parameter name");
- }
- return queryParams != null ? queryParams.getValues(parameterName) : null;
- }
-
- public void setQueryParameterValues(String parameterName, String[] parameterValues)
- {
- if (parameterName == null)
- {
- throw new NullPointerException("No null parameter name");
- }
- if (queryParams == null)
- {
- queryParams = new ParameterMap(ACCES_MODE);
- }
- queryParams.setValues(parameterName, parameterValues);
- }
-
- /**
- * Generates the URL value.
- *
- * @return the URL value
- */
- public abstract String toString();
-}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -40,10 +40,10 @@
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.web.application.URLBuilder;
import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.web.url.LocatorProvider;
import org.exoplatform.web.url.ResourceLocator;
import org.exoplatform.web.url.ResourceType;
-import org.exoplatform.web.url.ResourceURL;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
@@ -265,7 +265,7 @@
}
@Override
- public <R, L extends ResourceLocator<R>> ResourceURL<R, L> newURL(ResourceType<R, L> resourceType, L locator)
+ public <R, L extends ResourceLocator<R>> ControllerURL<R, L> newURL(ResourceType<R, L> resourceType, L locator)
{
return new PortalURL<R, L>(this, locator, false, portalOwner_, access);
}
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/application/PortalURLBuilder.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -21,7 +21,7 @@
import org.exoplatform.web.application.Parameter;
import org.exoplatform.web.application.URLBuilder;
-import org.exoplatform.web.url.ResourceURL;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.url.ComponentLocator;
@@ -33,12 +33,12 @@
{
/** . */
- private final ResourceURL<UIComponent, ComponentLocator> url;
+ private final ControllerURL<UIComponent, ComponentLocator> url;
/** . */
private final ComponentLocator locator;
- public PortalURLBuilder(PortalRequestContext ctx, ResourceURL<UIComponent, ComponentLocator> url)
+ public PortalURLBuilder(PortalRequestContext ctx, ControllerURL<UIComponent, ComponentLocator> url)
{
String path = ctx.getNodePath();
url.getResourceLocator().setPath(path);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/url/PortalURL.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -21,15 +21,12 @@
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.application.PortalRequestHandler;
-import org.exoplatform.web.ControllerContext;
import org.exoplatform.web.WebAppController;
import org.exoplatform.web.controller.QualifiedName;
-import org.exoplatform.web.controller.router.RenderContext;
import org.exoplatform.web.controller.router.SimpleRenderContext;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.web.url.ResourceLocator;
-import org.exoplatform.web.url.ResourceURL;
-import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -37,7 +34,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class PortalURL<R, L extends ResourceLocator<R>> extends ResourceURL<R, L>
+public class PortalURL<R, L extends ResourceLocator<R>> extends ControllerURL<R, L>
{
/** . */
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/application/ExoPortletInvocationContext.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -21,8 +21,7 @@
import org.exoplatform.Constants;
import org.exoplatform.portal.application.PortalRequestContext;
-import org.exoplatform.portal.application.PortalRequestHandler;
-import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.url.ComponentLocator;
import org.gatein.common.net.media.MediaType;
@@ -61,14 +60,14 @@
private final HttpServletRequest request;
/** . */
- private final org.exoplatform.web.url.ResourceURL<UIComponent, ComponentLocator> url;
+ private final ControllerURL<UIComponent, ComponentLocator> url;
public ExoPortletInvocationContext(PortalRequestContext portalRequestContext, UIPortlet portlet)
{
super(new MarkupInfo(MediaType.create("text/html"), "UTF-8"));
//
- org.exoplatform.web.url.ResourceURL<UIComponent,ComponentLocator> url = portalRequestContext.createURL(ComponentLocator.TYPE, portlet);
+ ControllerURL<UIComponent,ComponentLocator> url = portalRequestContext.createURL(ComponentLocator.TYPE, portlet);
String path = portalRequestContext.getNodePath();
url.getResourceLocator().setPath(path);
Modified: portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
--- portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -48,7 +48,7 @@
import org.exoplatform.services.resources.Orientation;
import org.exoplatform.services.resources.ResourceBundleManager;
import org.exoplatform.web.application.javascript.JavascriptConfigService;
-import org.exoplatform.web.url.ResourceURL;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -544,7 +544,7 @@
isAjaxInLastRequest = false;
if (nodePath.equals(lastNonAjaxUri) && !nodePath.equals(lastNodePath))
{
- ResourceURL<PageNode, NavigationLocator> nodeURL =
+ ControllerURL<PageNode, NavigationLocator> nodeURL =
pcontext.createURL(org.exoplatform.portal.url.navigation.NavigationLocator.TYPE);
nodeURL.setResource(getShowedUIPortal().getSelectedNode());
pcontext.sendRedirect(nodeURL.toString());
Modified: portal/branches/navcontroller/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java
===================================================================
--- portal/branches/navcontroller/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java 2010-09-16 15:21:53 UTC (rev 4227)
+++ portal/branches/navcontroller/webui/portlet/src/main/java/org/exoplatform/webui/application/portlet/PortletRequestContext.java 2010-09-16 16:22:29 UTC (rev 4228)
@@ -26,7 +26,7 @@
import org.exoplatform.web.url.LocatorProvider;
import org.exoplatform.web.url.ResourceLocator;
import org.exoplatform.web.url.ResourceType;
-import org.exoplatform.web.url.ResourceURL;
+import org.exoplatform.web.url.ControllerURL;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIApplication;
@@ -81,7 +81,7 @@
}
@Override
- public <R, L extends ResourceLocator<R>> ResourceURL<R, L> newURL(ResourceType<R, L> resourceType, L locator)
+ public <R, L extends ResourceLocator<R>> ControllerURL<R, L> newURL(ResourceType<R, L> resourceType, L locator)
{
return parentAppRequestContext_.newURL(resourceType, locator);
}
14 years, 3 months
gatein SVN: r4227 - in components/wsrp/trunk: wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1 and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-09-16 11:21:53 -0400 (Thu, 16 Sep 2010)
New Revision: 4227
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
Log:
- Fixed trailing _ in namespaces (adapted test cases).
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-09-16 10:58:53 UTC (rev 4226)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/handlers/processors/MimeResponseProcessor.java 2010-09-16 15:21:53 UTC (rev 4227)
@@ -57,7 +57,7 @@
*/
protected String processFragmentString(String renderString)
{
- String result = renderString.replaceAll(namespace, WSRPRewritingConstants.WSRP_REWRITE_TOKEN);
+ String result = renderString.replaceAll(namespace, WSRPRewritingConstants.WSRP_REWRITE);
result = URLTools.replaceURLsBy(result, new WSRPUtils.AbsoluteURLReplacementGenerator(ServletAccess.getRequest()));
return result;
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-09-16 10:58:53 UTC (rev 4226)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v1/MarkupTestCase.java 2010-09-16 15:21:53 UTC (rev 4227)
@@ -168,7 +168,7 @@
V1MarkupResponse response = producer.getMarkup(getMarkup);
checkMarkupResponse(response, "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
+ "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewriteportfolioManager'><table><tr><td>Stock symbol</t" +
"d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>");
}
Modified: components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java
===================================================================
--- components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-09-16 10:58:53 UTC (rev 4226)
+++ components/wsrp/trunk/wsrp-producer-war/src/test/java/org/gatein/wsrp/protocol/v2/MarkupTestCase.java 2010-09-16 15:21:53 UTC (rev 4227)
@@ -175,7 +175,7 @@
MarkupResponse response = producer.getMarkup(getMarkup);
checkMarkupResponse(response, "<form method='post' action='wsrp_rewrite?wsrp-urlType=blockingAction&wsrp" +
- "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewrite_portfolioManager'><table><tr><td>Stock symbol</t" +
+ "-interactionState=JBPNS_/wsrp_rewrite' id='wsrp_rewriteportfolioManager'><table><tr><td>Stock symbol</t" +
"d><td><input name='symbol'/></td></tr><tr><td><input type='submit' value='Submit'></td></tr></table></form>");
}
@@ -896,15 +896,15 @@
try
{
GetMarkup getMarkup = createMarkupRequest();
-
+
getMarkup.getMarkupParams().setMode(WSRPConstants.EDIT_MODE);
MarkupResponse responseEdit = producer.getMarkup(getMarkup);
checkMarkupResponse(responseEdit, "This is EDIT MODE.", false, true);
-
+
getMarkup.getMarkupParams().setMode(WSRPConstants.VIEW_MODE);
MarkupResponse responseView = producer.getMarkup(getMarkup);
checkMarkupResponse(responseView, "This is VIEW MODE.", false, true);
-
+
getMarkup.getMarkupParams().setMode(WSRPConstants.HELP_MODE);
MarkupResponse responseHelp = producer.getMarkup(getMarkup);
checkMarkupResponse(responseHelp, "This is HELP MODE.", false, true);
@@ -914,7 +914,7 @@
undeploy(archive);
}
}
-
+
@Test
public void testGetMarkupWithCustomPortletMode() throws Exception
{
14 years, 3 months
gatein SVN: r4226 - portal/trunk/testsuite/testdefinitions.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-16 06:58:53 -0400 (Thu, 16 Sep 2010)
New Revision: 4226
Modified:
portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
Log:
Update GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
Modified: portal/trunk/testsuite/testdefinitions/GateIn_v3.1.0_BasicPortlets_TestDefinition.ods
===================================================================
(Binary files differ)
14 years, 3 months
gatein SVN: r4225 - portal/trunk/testsuite/testdefinitions.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-16 06:58:17 -0400 (Thu, 16 Sep 2010)
New Revision: 4225
Modified:
portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods
Log:
TestVN-1020 : Update Sniff tests
Modified: portal/trunk/testsuite/testdefinitions/eXo_SniffTest_GateIn_3.1.0_TestDefinition.ods
===================================================================
(Binary files differ)
14 years, 3 months
gatein SVN: r4224 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-16 06:56:20 -0400 (Thu, 16 Sep 2010)
New Revision: 4224
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_002_DeleteMembershipWithoutConfirmation.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_005_CheckExistingOfUserInGroupAfterHisRoleInThatGroupWasDeleted.html
Log:
TESTVN-1006: Create new GateIn Selenium scripts
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_002_DeleteMembershipWithoutConfirmation.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_002_DeleteMembershipWithoutConfirmation.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_002_DeleteMembershipWithoutConfirmation.html 2010-09-16 10:56:20 UTC (rev 4224)
@@ -0,0 +1,182 @@
+<?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_PRL_04_04_002_DeleteMembershipWithoutConfirmation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_PRL_04_04_002_DeleteMembershipWithoutConfirmation</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete membership without confirmation --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose membership management tab --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Membership Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Membership Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>Test_PLT_04_04_002</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>Test_PLT_04_04_002</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>-- Click Cancel in confirm message --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>chooseCancelOnNextConfirmation</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIGrid']/table/tbody/tr[3]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIGrid']/table/tbody/tr[3]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this membership?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Test_PLT_04_04_002</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Test_PLT_04_04_002</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete membership --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIGrid']/table/tbody/tr[3]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIGrid']/table/tbody/tr[3]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this membership?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>Test_PLT_04_04_002</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextNotPresent</td>
+ <td>Test_PLT_04_04_002</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_005_CheckExistingOfUserInGroupAfterHisRoleInThatGroupWasDeleted.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_005_CheckExistingOfUserInGroupAfterHisRoleInThatGroupWasDeleted.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_PRL_04_04_005_CheckExistingOfUserInGroupAfterHisRoleInThatGroupWasDeleted.html 2010-09-16 10:56:20 UTC (rev 4224)
@@ -0,0 +1,237 @@
+<?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_PRL_04_04_005_CheckExistingOfUserInGroupAfterHisRoleInThatGroupWasDeleted</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_PRL_04_04_005_CheckExistingOfUserInGroupAfterHisRoleInThatGroupWasDeleted</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Check existing of user in group after his role in that group was deleted--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Go to User and Group management--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Membership Management--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[3]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[3]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>Test_PRL_04_04_005</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>Test_PRL_04_04_005</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>-- Go to Group Management--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[2]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Select a group --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Communication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Communication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>mary</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>membership</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>membership</td>
+ <td>label=Test_PRL_04_04_005</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>-- Return to Membership Management to delete new membership--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[3]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[1]/div/div/div/div/div/div/a[3]/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIGrid']/table/tbody/tr[4]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIGrid']/table/tbody/tr[4]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this membership?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Check existing of user in group--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Group Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Group Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 3 months
gatein SVN: r4223 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-09-16 06:42:34 -0400 (Thu, 16 Sep 2010)
New Revision: 4223
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_44_AddApplicationIntoCategoryWhenEditLayoutForGroupPage.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_56_ChangeSiteConfigWhenEditLayoutForUserPage.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_57_ChangeContainerWhenEditLayoutForUserPage.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_58_ChangeApplicationWhenEditLayoutForUserPage.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_59_AddApplicationIntoCateGoryWhenEditLayoutForUserPage.html
Log:
TESTVN-1163 - Create new SniffTest for GateIn Selenium scripts
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_44_AddApplicationIntoCategoryWhenEditLayoutForGroupPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_44_AddApplicationIntoCategoryWhenEditLayoutForGroupPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_44_AddApplicationIntoCategoryWhenEditLayoutForGroupPage.html 2010-09-16 10:42:34 UTC (rev 4223)
@@ -0,0 +1,537 @@
+<?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_SNF_PRL_44_AddApplicationIntoCategoryWhenEditLayoutForGroupPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_44_AddApplicationIntoCategoryWhenEditLayoutForGroupPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Change application when edit layout for group's page --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=Application Registry</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Add new page on Group editor menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageNodeSelector']/div/div/div[2]/div/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPageNodeSelector']/div/div/div[2]/div/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>pageName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageName</td>
+ <td>Test_SNF_PRL_44</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_SNF_PRL_44</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Next to move 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>click</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>-- Keep empty layout and click Next move step 3--</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>click</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 Finish --</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>clickAndWait</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertLocation</td>
+ <td>http://localhost:8080/portal/private/classic/administration/Test_SNF_PRL_44</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Edit layout --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View layout before Change application--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Container tab--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add container by drag & drop--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='oneRow']/div</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[@id='oneRow']/div</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Application tab--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[1]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[1]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Drag & drop application into the container added above--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='Gadgets/Calculator']/div/div/img</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[@id='Gadgets/Calculator']/div/div/img</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Calculator</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this portlet?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Container tab to delete container --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Container</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this Container?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click to Finish</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Go to Edit Navigation --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIGroupNavigationGrid']/table[2]/tbody/tr/td[3]/a[1]</td>
+ <td>Edit Navigation</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIGroupNavigationGrid']/table[2]/tbody/tr/td[3]/a[1]</td>
+ <td>Edit Navigation</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete node --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='Test_SNF_PRL_44']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon' and @title='Test_SNF_PRL_44']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></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>-- Go to Page Management --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>searchTerm</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>searchTerm</td>
+ <td>Test_SNF_PRL_44</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>searchOption</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>searchOption</td>
+ <td>label=Title</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//form[@id='UIPageSearch']/div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- https://jira.jboss.org/browse/GTNPORTAL-1304--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete page --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIRepeater']/table/tbody/tr[13]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIRepeater']/table/tbody/tr[13]/td[5]/div/img[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></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>//div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[4]/div/div[2]/div/div/div/div/div/div[3]/div/table/tbody/tr/td/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_56_ChangeSiteConfigWhenEditLayoutForUserPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_56_ChangeSiteConfigWhenEditLayoutForUserPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_56_ChangeSiteConfigWhenEditLayoutForUserPage.html 2010-09-16 10:42:34 UTC (rev 4223)
@@ -0,0 +1,267 @@
+<?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_SNF_PRL_56_ChangeSiteConfigWhenEditLayoutForUserPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_56_ChangeSiteConfigWhenEditLayoutForUserPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add new page for user --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=Dashboard</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Add new page on Dashboard editor menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</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_SNF_PRL_56</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_SNF_PRL_56</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Next to move 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>click</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>-- Keep empty layout and click Next move step 3--</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>click</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 Finish --</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>clickAndWait</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertLocation</td>
+ <td>http://localhost:8080/portal/private/classic/Test_SNF_PRL_56</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Edit Layout --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Site's config from edit inline composer--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site's Config</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Site's Config</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Make change something --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>locale</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>locale</td>
+ <td>label=French</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>skin</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>skin</td>
+ <td>label=SimpleSkin</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Properties--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div/div/div/div/div/div[2]/div/div/div/div</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>-- Finish change in Site config's portal --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete new tab</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Really want to remove this dashboard?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_57_ChangeContainerWhenEditLayoutForUserPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_57_ChangeContainerWhenEditLayoutForUserPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_57_ChangeContainerWhenEditLayoutForUserPage.html 2010-09-16 10:42:34 UTC (rev 4223)
@@ -0,0 +1,417 @@
+<?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_SNF_PRL_57_ChangeContainerWhenEditLayoutForUserPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_57_ChangeContainerWhenEditLayoutForUserPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add new page for user --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=Dashboard</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Add new page on Dashboard editor menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</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_SNF_PRL_57</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_SNF_PRL_57</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Next to move 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>click</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>-- Keep empty layout and click Next move step 3--</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>click</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 Finish --</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>clickAndWait</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertLocation</td>
+ <td>http://localhost:8080/portal/private/classic/Test_SNF_PRL_57</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Edit Layout --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View layout of page before Change container--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Change container--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='oneRow']/div</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[@id='oneRow']/div</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Edit container --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>title</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>Test_SNF_PRL_57</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>width</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>width</td>
+ <td>300px</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>height</td>
+ <td>100px</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>height</td>
+ <td>100px</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>-- Move position of container --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Test_SNF_PRL_57</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div</td>
+ <td>//div[@class='LAYOUT-BLOCK LAYOUT-PORTLET']</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View after change position of container --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete container --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div[2]/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Test_SNF_PRL_57</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[2]/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[2]/div/div/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this Container?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete new tab</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Really want to remove this dashboard?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_58_ChangeApplicationWhenEditLayoutForUserPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_58_ChangeApplicationWhenEditLayoutForUserPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_58_ChangeApplicationWhenEditLayoutForUserPage.html 2010-09-16 10:42:34 UTC (rev 4223)
@@ -0,0 +1,512 @@
+<?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_SNF_PRL_58_ChangeApplicationWhenEditLayoutForUserPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_58_ChangeApplicationWhenEditLayoutForUserPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add new page for user --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=Dashboard</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Add new page on Dashboard editor menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</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_SNF_PRL_58</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_SNF_PRL_58</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Next to move 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>click</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>-- Keep empty layout and click Next move step 3--</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>click</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 Finish --</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>clickAndWait</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertLocation</td>
+ <td>http://localhost:8080/portal/private/classic/Test_SNF_PRL_58</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Edit Layout --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View layout before Change application--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Drag & drop applcation in portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='Gadgets/Calculator']/div/div/div[1]/div[1]</td>
+ <td>UIPortalApplication</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[@id='Gadgets/Calculator']/div/div/div[1]/div[1]</td>
+ <td>UIPortalApplication</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View application after drag & drop in portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Return to normal view --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Edit application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Calculator</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>title</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>Test_SNF_PRL_58</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Select Icon tab --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div[1]/div/div/div/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div[1]/div/div/div/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//form[@id='UIPortletForm']/div[3]/div/div/div[2]/div[2]/div/a[1]/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//form[@id='UIPortletForm']/div[3]/div/div/div[2]/div[2]/div/a[1]/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Decoration Themes--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div[1]/div/div/div/div/div[3]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']/div[2]/div/div/div/div/div/div/div[1]/div/div/div/div/div[3]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIItemThemeSelector']/div[2]/div[1]/div/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIItemThemeSelector']/div[2]/div[1]/div/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save And Close</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save And Close</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View after change something in application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Test_SNF_PRL_58</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Test_SNF_PRL_58</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Return to normail view --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Move position of application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div[3]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Test_SNF_PRL_58</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[1]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//html/body/div/div[2]/div/div[2]/div/div/div/div/div/div[2]/div/div/div/div/div/div/div/div[2]/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[1]</td>
+ <td>//html/body/div/div[2]/div/div[2]/div/div/div/div/div/div[2]/div/div/div/div/div/div/div/div[3]/div/div/div</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View after change position of application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Test_SNF_PRL_58</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[2]/div/div[2]/div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this portlet?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete new tab</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Really want to remove this dashboard?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_59_AddApplicationIntoCateGoryWhenEditLayoutForUserPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_59_AddApplicationIntoCateGoryWhenEditLayoutForUserPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/NewSnifftest/Test_SNF_PRL_59_AddApplicationIntoCateGoryWhenEditLayoutForUserPage.html 2010-09-16 10:42:34 UTC (rev 4223)
@@ -0,0 +1,402 @@
+<?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_SNF_PRL_59_AddApplicationIntoCateGoryWhenEditLayoutForUserPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_SNF_PRL_59_AddApplicationIntoCateGoryWhenEditLayoutForUserPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add new page for user --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</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>clickAndWait</td>
+ <td>link=Dashboard</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Add new page on Dashboard editor menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</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_SNF_PRL_59</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_SNF_PRL_59</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click Next to move 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>click</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>-- Keep empty layout and click Next move step 3--</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>click</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 Finish --</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>clickAndWait</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertLocation</td>
+ <td>http://localhost:8080/portal/private/classic/Test_SNF_PRL_59</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Edit Layout --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- View layout before Change application--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementNotPresent</td>
+ <td>css= div[@id="UIPortalApplication"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Container tab--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Add container by drag & drop--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='oneRow']/div</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[@id='oneRow']/div</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div/div[1]/div</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Application tab--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[1]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[1]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Drag & drop application into the container added above--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='Gadgets/Calculator']/div/div/img</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div</td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>//div[@id='Gadgets/Calculator']/div/div/img</td>
+ <td>//div[2]/div/div/div/div/div/div[2]/div/div/div/div/div[1]/div/div/div[1]/div/div/div</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyElementPresent</td>
+ <td>UIPortalApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Switch View Mode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete application --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Calculator</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this portlet?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Container tab to delete container --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposerTab']/div[1]/div/div[2]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseOver</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/div[2]</td>
+ <td>Container</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div/div/div[2]/div/div/div/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this Container?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Click to Finish</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete new tab</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UITabPaneDashboard']/div/div/div/div/div/div[2]/div/div/div/div/a/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForConfirmationPresent</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Really want to remove this dashboard?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 3 months
gatein SVN: r4222 - portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-09-16 05:54:53 -0400 (Thu, 16 Sep 2010)
New Revision: 4222
Modified:
portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
Log:
GTNPORTAL-1480 Encode new node URI before redirect to them in tab dashboard
Modified: portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
--- portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-09-16 07:12:48 UTC (rev 4221)
+++ portal/branches/branch-r4047/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-09-16 09:54:53 UTC (rev 4222)
@@ -40,6 +40,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
@@ -419,7 +420,7 @@
PortalRequestContext prContext = Util.getPortalRequestContext();
prContext.setResponseComplete(true);
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + selectedNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() + URLEncoder.encode(selectedNode.getUri(), "UTF-8"));
}
}
}
@@ -437,7 +438,7 @@
//We should redirect to current node while adding new tab fails
PageNode currentNode = tabPane.uiPortal.getSelectedNode();
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + currentNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() + URLEncoder.encode(currentNode.getUri(), "UTF-8"));
Object[] args = {newTabLabel};
context.getUIApplication().addMessage(new ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
@@ -450,7 +451,7 @@
{
PortalRequestContext prContext = Util.getPortalRequestContext();
prContext.setResponseComplete(true);
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + uri);
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() + URLEncoder.encode(uri, "UTF-8"));
}
}
}
@@ -475,11 +476,10 @@
String newTabLabel = context.getRequestParameter(RENAMED_TAB_LABEL_PARAMETER);
if (!tabPane.validateName(newTabLabel))
{
- //TODO nguyenanhkien2a(a)gmail.com
//We should redirect to current node while renaming fails
PageNode currentNode = tabPane.uiPortal.getSelectedNode();
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + currentNode.getUri());
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() + URLEncoder.encode(currentNode.getUri(), "UTF-8"));
Object[] args = {newTabLabel};
context.getUIApplication().addMessage(new ApplicationMessage("UITabPaneDashboard.msg.wrongTabName", args));
@@ -491,7 +491,7 @@
if (newUri != null)
{
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getResponse().sendRedirect(prContext.getPortalURI() + newUri);
+ prContext.getResponse().sendRedirect(prContext.getPortalURI() + URLEncoder.encode(newUri, "UTF-8"));
}
}
}
14 years, 3 months