gatein SVN: r4594 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-10-08 00:48:22 -0400 (Fri, 08 Oct 2010)
New Revision: 4594
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.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_14_07_001_CheckCloneNodeDoesNotContainSubNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html 2010-10-08 04:37:55 UTC (rev 4593)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_001_CheckCloneNodeDoesNotContainSubNode.html 2010-10-08 04:48:22 UTC (rev 4594)
@@ -352,11 +352,6 @@
<td></td>
</tr>
<tr>
- <td>assertLocation</td>
- <td>http://localhost:8080/portal/private/classic/Test_POR_14_07_001</td>
- <td></td>
-</tr>
-<tr>
<td>echo</td>
<td>-- Check content of original node's page--</td>
<td></td>
@@ -428,11 +423,6 @@
</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>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html 2010-10-08 04:37:55 UTC (rev 4593)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_002_CheckCloneNodeContainSubNode.html 2010-10-08 04:48:22 UTC (rev 4594)
@@ -268,11 +268,6 @@
</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>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html 2010-10-08 04:37:55 UTC (rev 4593)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_07_003_CheckCloneNodeDoesNotLinkToAnyPage.html 2010-10-08 04:48:22 UTC (rev 4594)
@@ -17,7 +17,12 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
<td>link=Sign in</td>
<td></td>
</tr>
@@ -37,7 +42,7 @@
<td>gtn</td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickAndWait</td>
<td>xpath=//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
<td></td>
</tr>
@@ -52,7 +57,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Site</td>
<td></td>
</tr>
@@ -62,7 +67,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Edit Navigation</td>
<td></td>
</tr>
@@ -72,7 +77,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Add Node</td>
<td></td>
</tr>
@@ -97,9 +102,9 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
- <td>1,1</td>
+ <td></td>
</tr>
<tr>
<td>echo</td>
@@ -107,7 +112,7 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>//a[@class='NodeIcon DefaultPageIcon' and @title='POR_14_07_003']</td>
<td></td>
</tr>
@@ -117,7 +122,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Clone Node</td>
<td></td>
</tr>
@@ -127,22 +132,27 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>//div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a</td>
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>//div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>link=Save</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
<td></td>
</tr>
@@ -157,16 +167,21 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Page Management</td>
<td></td>
</tr>
<tr>
<td>echo</td>
<td>-- Check existing of page with title 'Test_POR_14_07_003'</td>
- <td>Test_POR_14_07_003</td>
+ <td></td>
</tr>
<tr>
+ <td>waitForElementPresent</td>
+ <td>searchTerm</td>
+ <td></td>
+</tr>
+<tr>
<td>type</td>
<td>searchTerm</td>
<td>Test_POR_14_07_003</td>
@@ -182,7 +197,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//form[@id='UIPageSearch']/div[2]/a</td>
<td></td>
</tr>
@@ -192,7 +207,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
<td></td>
</tr>
@@ -207,7 +222,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Site</td>
<td></td>
</tr>
@@ -217,12 +232,12 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Edit Navigation</td>
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>//a[@class='NodeIcon DefaultPageIcon' and @title='POR_14_07_003']</td>
<td></td>
</tr>
@@ -232,7 +247,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Delete Node</td>
<td></td>
</tr>
@@ -242,7 +257,7 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[8]/div/a</td>
<td></td>
</tr>
@@ -252,7 +267,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Delete Node</td>
<td></td>
</tr>
@@ -267,7 +282,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
<td></td>
</tr>
@@ -282,7 +297,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
</tr>
14 years, 3 months
gatein SVN: r4593 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-10-08 00:37:55 -0400 (Fri, 08 Oct 2010)
New Revision: 4593
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_06_001_ChangeOrderOfNode.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_14_06_001_ChangeOrderOfNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_06_001_ChangeOrderOfNode.html 2010-10-08 04:33:55 UTC (rev 4592)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_06_001_ChangeOrderOfNode.html 2010-10-08 04:37:55 UTC (rev 4593)
@@ -17,17 +17,22 @@
<td></td>
</tr>
<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>-MoveUp/DownNode-</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Sign in</td>
<td></td>
</tr>
<tr>
- <td>verifyElementPresent</td>
+ <td>waitForElementPresent</td>
<td>username</td>
<td></td>
</tr>
@@ -57,7 +62,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Site</td>
<td></td>
</tr>
@@ -67,7 +72,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Edit Navigation</td>
<td></td>
</tr>
@@ -77,7 +82,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Add Node</td>
<td></td>
</tr>
@@ -107,17 +112,22 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>xpath=//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']</td>
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>xpath=//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>link=Search and Select Page</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Search and Select Page</td>
<td></td>
</tr>
@@ -127,7 +137,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//img[@title='Select Page']</td>
<td></td>
</tr>
@@ -137,22 +147,27 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>waitForElementPresent</td>
<td>link=Save</td>
<td></td>
</tr>
<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
<td>waitForElementPresent</td>
<td>link=Test_POR_14_06_001</td>
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Test_POR_14_06_001</td>
<td></td>
</tr>
@@ -167,7 +182,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Site</td>
<td></td>
</tr>
@@ -177,7 +192,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Edit Navigation</td>
<td></td>
</tr>
@@ -202,7 +217,7 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>xpath=//a[@title='Test_POR_14_06_001']</td>
<td></td>
</tr>
@@ -212,7 +227,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UINavigationNodeSelector']//div[@id='NavigationNodePopupMenu']//a[@class='ItemIcon MoveUp16x16Icon']</td>
<td></td>
</tr>
@@ -227,7 +242,7 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>xpath=//a[@title='Test_POR_14_06_001']</td>
<td></td>
</tr>
@@ -247,7 +262,7 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>xpath=//a[@title='Test_POR_14_06_001']</td>
<td></td>
</tr>
@@ -257,7 +272,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>xpath=//div[@id='UINavigationNodeSelector']//div[@id='NavigationNodePopupMenu']//a[@class='ItemIcon DeleteNode16x16Icon']</td>
<td></td>
</tr>
@@ -272,7 +287,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Save</td>
<td></td>
</tr>
@@ -287,7 +302,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>clickAndWait</td>
<td>link=Sign out</td>
<td></td>
</tr>
14 years, 3 months
gatein SVN: r4592 - in exo/portal/branches/3.1.x: component/common/src/main/java/conf/jcr/jbosscache/local and 5 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2010-10-08 00:33:55 -0400 (Fri, 08 Oct 2010)
New Revision: 4592
Added:
exo/portal/branches/3.1.x/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java
exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/
exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java
Removed:
exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java
Modified:
exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/cluster/config.xml
exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/local/config.xml
exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml
exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
Log:
EXOGTN-94 Merge performance improvements
Modified: exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/cluster/config.xml
===================================================================
--- exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/cluster/config.xml 2010-10-07 15:38:39 UTC (rev 4591)
+++ exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/cluster/config.xml 2010-10-08 04:33:55 UTC (rev 4592)
@@ -30,11 +30,12 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
- actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy"
- eventQueueSize="1000000">
- <property name="maxNodes" value="5000" />
- <property name="timeToLive" value="20000" />
- </default>
+ <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm"
+ actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="1000000" />
+ <property name="warnNoExpirationKey" value="false" />
+ </default>
</eviction>
+
</jbosscache>
\ No newline at end of file
Modified: exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/local/config.xml
===================================================================
--- exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/local/config.xml 2010-10-07 15:38:39 UTC (rev 4591)
+++ exo/portal/branches/3.1.x/component/common/src/main/java/conf/jcr/jbosscache/local/config.xml 2010-10-08 04:33:55 UTC (rev 4592)
@@ -27,11 +27,13 @@
<invocationBatching enabled="true" />
<!-- Eviction configuration -->
- <eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy" eventQueueSize="1000000">
- <property name="maxNodes" value="5000" />
- <property name="minTimeToLive" value="20000" />
- </default>
- </eviction>
+ <eviction wakeUpInterval="5000">
+ <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm"
+ actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="1000000" />
+ <property name="warnNoExpirationKey" value="false" />
+ </default>
+ </eviction>
</jbosscache>
Copied: exo/portal/branches/3.1.x/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java (from rev 4419, exo/portal/branches/3.1.4-PLF-perf/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java)
===================================================================
--- exo/portal/branches/3.1.x/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java (rev 0)
+++ exo/portal/branches/3.1.x/component/common/src/main/java/org/exoplatform/commons/xml/DOMSerializer.java 2010-10-08 04:33:55 UTC (rev 4592)
@@ -0,0 +1,134 @@
+/*
+ * 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.commons.xml;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.CharacterData;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.io.IOException;
+import java.io.Writer;
+
+/**
+ * An high performance and custom DOM serializer based on stax {@link XMLStreamWriter}.
+ *
+ * <p>The serializer takes care of correctly writing empty script elements with their non empty form, because we want to ouput
+ * xhtml text that will still work on html browsers.</p>
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class DOMSerializer
+{
+
+ /** Thread safe. */
+ private static final XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+
+ public static void serialize(Element element, Writer writer) throws IOException, XMLStreamException
+ {
+ XMLStreamWriter xml = outputFactory.createXMLStreamWriter(writer);
+ serialize(element, xml);
+ xml.writeEndDocument();
+ xml.flush();
+ }
+
+ private static void serialize(Element element, XMLStreamWriter writer) throws IOException, XMLStreamException
+ {
+ String tagName = element.getTagName();
+
+ // Determine if empty
+ // Note that we won't accumulate the elements that would be serialized for performance reason
+ // we will just reiterate later before ending the element
+ boolean empty;
+ if (tagName.equalsIgnoreCase("script"))
+ {
+ empty = false;
+ }
+ else
+ {
+ empty = true;
+ NodeList children = element.getChildNodes();
+ int length = children.getLength();
+ for (int i = 0;i < length && empty;i++)
+ {
+ Node child = children.item(i);
+ if (child instanceof CharacterData)
+ {
+ empty = false;
+ }
+ else if (child instanceof Element)
+ {
+ empty = false;
+ }
+ }
+ }
+
+ //
+ if (empty)
+ {
+ writer.writeEmptyElement(tagName);
+ }
+ else
+ {
+ writer.writeStartElement(tagName);
+ }
+
+ // Write attributes
+ if (element.hasAttributes())
+ {
+ NamedNodeMap attrs = element.getAttributes();
+ int length = attrs.getLength();
+ for (int i = 0;i < length;i++)
+ {
+ Attr attr = (Attr)attrs.item(i);
+ writer.writeAttribute(attr.getName(), attr.getValue());
+ }
+ }
+
+ //
+ if (!empty)
+ {
+ // Serialize children that are worth to be
+ NodeList children = element.getChildNodes();
+ int length = children.getLength();
+ for (int i = 0;i < length;i++)
+ {
+ Node child = children.item(i);
+ if (child instanceof CharacterData)
+ {
+ writer.writeCData(((CharacterData)child).getData());
+ }
+ else if (child instanceof Element)
+ {
+ serialize((Element)child, writer);
+ }
+ }
+
+ // Close
+ writer.writeEndElement();
+ }
+ }
+}
Copied: exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml (from rev 4419, exo/portal/branches/3.1.4-PLF-perf/component/common/src/test/java/org/exoplatform/commons/xml)
Deleted: exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java
===================================================================
--- exo/portal/branches/3.1.4-PLF-perf/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java 2010-09-29 01:27:51 UTC (rev 4419)
+++ exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java 2010-10-08 04:33:55 UTC (rev 4592)
@@ -1,69 +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.commons.xml;
-
-import junit.framework.TestCase;
-import org.w3c.dom.Element;
-import org.xml.sax.InputSource;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-import java.io.StringReader;
-import java.io.StringWriter;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class TestDOMSerializer extends TestCase
-{
-
- @Override
- protected void setUp() throws Exception
- {
- }
-
- public void testScriptNoAttributes() throws Exception
- {
- assertSerialization("<script></script>", "<script/>");
- }
-
- public void testScriptWithAttribute() throws Exception
- {
- assertSerialization("<script type=\"text/javascript\"></script>", "<script type='text/javascript'/>");
- }
-
- public void testMetaNoAttributes() throws Exception
- {
- assertSerialization("<meta/>", "<meta/>");
- }
-
- public void testMetaWithAttribute() throws Exception
- {
- assertSerialization("<meta http-equiv=\"Content-Type\"/>", "<meta http-equiv='Content-Type'></meta>");
- }
-
- private void assertSerialization(String expectedMarkup, String markup) throws Exception
- {
- Element elt = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(markup))).getDocumentElement();
- StringWriter writer = new StringWriter();
- DOMSerializer.serialize(elt, writer);
- assertEquals(expectedMarkup, writer.toString());
- }
-}
Copied: exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java (from rev 4419, exo/portal/branches/3.1.4-PLF-perf/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java)
===================================================================
--- exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java (rev 0)
+++ exo/portal/branches/3.1.x/component/common/src/test/java/org/exoplatform/commons/xml/TestDOMSerializer.java 2010-10-08 04:33:55 UTC (rev 4592)
@@ -0,0 +1,69 @@
+/*
+ * 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.commons.xml;
+
+import junit.framework.TestCase;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class TestDOMSerializer extends TestCase
+{
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ }
+
+ public void testScriptNoAttributes() throws Exception
+ {
+ assertSerialization("<script></script>", "<script/>");
+ }
+
+ public void testScriptWithAttribute() throws Exception
+ {
+ assertSerialization("<script type=\"text/javascript\"></script>", "<script type='text/javascript'/>");
+ }
+
+ public void testMetaNoAttributes() throws Exception
+ {
+ assertSerialization("<meta/>", "<meta/>");
+ }
+
+ public void testMetaWithAttribute() throws Exception
+ {
+ assertSerialization("<meta http-equiv=\"Content-Type\"/>", "<meta http-equiv='Content-Type'></meta>");
+ }
+
+ private void assertSerialization(String expectedMarkup, String markup) throws Exception
+ {
+ Element elt = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(markup))).getDocumentElement();
+ StringWriter writer = new StringWriter();
+ DOMSerializer.serialize(elt, writer);
+ assertEquals(expectedMarkup, writer.toString());
+ }
+}
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml 2010-10-07 15:38:39 UTC (rev 4591)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml 2010-10-08 04:33:55 UTC (rev 4592)
@@ -8,11 +8,12 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
- eventQueueSize="1000000">
- <property name="maxNodes" value="1000000" />
- <property name="timeToLive" value="120000" />
- </default>
+ <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm"
+ actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="1000000" />
+ <property name="warnNoExpirationKey" value="false" />
+ </default>
</eviction>
</jbosscache>
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml 2010-10-07 15:38:39 UTC (rev 4591)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache.xml 2010-10-08 04:33:55 UTC (rev 4592)
@@ -2,11 +2,12 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm"
- eventQueueSize="1000000">
- <property name="maxNodes" value="1000000" />
- <property name="timeToLive" value="120000" />
- </default>
+ <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm"
+ actionPolicyClass="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.ParentNodeEvictionActionPolicy"
+ eventQueueSize="1000000">
+ <property name="maxNodes" value="1000000" />
+ <property name="warnNoExpirationKey" value="false" />
+ </default>
</eviction>
</jbosscache>
\ No newline at end of file
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-10-07 15:38:39 UTC (rev 4591)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-10-08 04:33:55 UTC (rev 4592)
@@ -22,6 +22,7 @@
import org.exoplatform.Constants;
import org.exoplatform.commons.utils.PortalPrinter;
import org.exoplatform.commons.utils.WriterPrinter;
+import org.exoplatform.commons.xml.DOMSerializer;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Page;
@@ -41,19 +42,12 @@
import org.gatein.common.http.QueryStringParser;
import org.w3c.dom.Element;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-
import java.io.IOException;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.net.URLDecoder;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -437,35 +431,16 @@
public List<String> getExtraMarkupHeadersAsStrings() throws Exception
{
List<String> markupHeaders = new ArrayList<String>();
-
if (extraMarkupHeaders != null && !extraMarkupHeaders.isEmpty())
{
- Transformer transformer = TransformerFactory.newInstance().newTransformer();
- transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
-
+ StringWriter sw = new StringWriter();
for (Element element : extraMarkupHeaders)
{
- DOMSource source = new DOMSource(element);
- StreamResult result = new StreamResult(new StringWriter());
-
- // we want to ouput xhtml text that will still work on html browsers.
- // In order to do this we need to have the script tag be not self closing
- // which it will try and do with the xml or xhtml method. If we just use
- // the html method then the other tags will not be closed.
- if (element.getNodeName().equalsIgnoreCase("script"))
- {
- transformer.setOutputProperty(OutputKeys.METHOD, "html");
- }
- else
- {
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- }
- transformer.transform(source, result);
- markupHeaders.add(result.getWriter().toString());
+ DOMSerializer.serialize(element, sw);
+ markupHeaders.add(sw.toString());
}
}
-
- return markupHeaders;
+ return markupHeaders;
}
/**
14 years, 3 months
gatein SVN: r4591 - in components/wsrp/trunk/common/src/main/java/org/gatein/wsrp: payload and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-10-07 11:38:39 -0400 (Thu, 07 Oct 2010)
New Revision: 4591
Added:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableNamedStringArray.java
Modified:
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java
Log:
- GTNWSRP-49: properly support events using NamedStringArray...
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-10-07 14:49:15 UTC (rev 4590)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/WSRPTypeFactory.java 2010-10-07 15:38:39 UTC (rev 4591)
@@ -1425,13 +1425,10 @@
return namedString;
}
- public static EventPayload createEventPayloadAsNamedString(Object payload)
+ public static EventPayload createEventPayloadAsNamedString(NamedStringArray payload)
{
- // todo: fix me GTNWSRP-49
EventPayload result = new EventPayload();
- NamedStringArray value = new NamedStringArray();
- value.getNamedString().add(createNamedString("event", payload.toString()));
- result.setNamedStringArray(value);
+ result.setNamedStringArray(payload);
return result;
}
@@ -1755,44 +1752,49 @@
return userProfile;
}
-
+
public static CopyPortlets createCopyPortlets(RegistrationContext toRegistrationContext, UserContext toUserContext, RegistrationContext fromRegistrationContext, UserContext fromUserContext, List<PortletContext> fromPortletContexts)
{
if (!ParameterValidation.existsAndIsNotEmpty(fromPortletContexts))
{
throw new IllegalArgumentException("Must provide at least one PortletContext to CopyPortlets.");
}
-
+
CopyPortlets copyPortlets = new CopyPortlets();
copyPortlets.setToRegistrationContext(toRegistrationContext);
copyPortlets.setToUserContext(toUserContext);
copyPortlets.setFromRegistrationContext(fromRegistrationContext);
copyPortlets.setFromUserContext(fromUserContext);
copyPortlets.getFromPortletContexts().addAll(fromPortletContexts);
-
+
return copyPortlets;
}
-
+
public static CopyPortletsResponse createCopyPortletsResponse(List<CopiedPortlet> copiedPortlets, List<FailedPortlets> failedPortlets, ResourceList resourceList)
{
CopyPortletsResponse response = new CopyPortletsResponse();
response.getCopiedPortlets().addAll(copiedPortlets);
response.getFailedPortlets().addAll(failedPortlets);
response.setResourceList(resourceList);
-
+
return response;
}
-
+
public static CopiedPortlet createCopiedPortlet(PortletContext newPortletContext, String fromPortletHandle)
{
ParameterValidation.throwIllegalArgExceptionIfNull(newPortletContext, "newPortletContext");
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(fromPortletHandle, "fromPortletHandle", "createCopiedPortlet");
-
+
CopiedPortlet copiedPortlet = new CopiedPortlet();
-
+
copiedPortlet.setNewPortletContext(newPortletContext);
copiedPortlet.setFromPortletHandle(fromPortletHandle);
-
+
return copiedPortlet;
}
+
+ public static NamedStringArray createNamedStringArray()
+ {
+ return new NamedStringArray();
+ }
}
Modified: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java 2010-10-07 14:49:15 UTC (rev 4590)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/PayloadUtils.java 2010-10-07 15:38:39 UTC (rev 4591)
@@ -74,7 +74,7 @@
NamedStringArray namedStringArray = payload.getNamedStringArray();
if (namedStringArray != null)
{
- throw new UnsupportedOperationException("Don't know how to convert NamedStringArray to a Serializable in an interroperable way. :(");
+ return new SerializableNamedStringArray(namedStringArray);
}
else
{
@@ -119,22 +119,30 @@
public static EventPayload getPayloadAsEventPayload(QName type, Serializable payload)
{
- // todo: complete GTNWSRP-49
- try
+ if (payload instanceof SerializableNamedStringArray)
{
- Class payloadClass = payload.getClass();
- JAXBContext context = JAXBContext.newInstance(payloadClass);
- Marshaller marshaller = context.createMarshaller();
- JAXBElement<Serializable> element = new JAXBElement<Serializable>(type, payloadClass, payload);
- DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
- builderFactory.setNamespaceAware(true);
- Document document = builderFactory.newDocumentBuilder().newDocument();
- marshaller.marshal(element, document);
- return WSRPTypeFactory.createEventPayloadAsAny(document.getDocumentElement());
+ SerializableNamedStringArray stringArray = (SerializableNamedStringArray)payload;
+ return WSRPTypeFactory.createEventPayloadAsNamedString(stringArray.toNamedStringArray());
}
- catch (Exception e)
+ else
{
- throw new IllegalArgumentException("Couldn't marshall payload " + payload + " with expected type " + type, e);
+ // todo: complete GTNWSRP-49
+ try
+ {
+ Class payloadClass = payload.getClass();
+ JAXBContext context = JAXBContext.newInstance(payloadClass);
+ Marshaller marshaller = context.createMarshaller();
+ JAXBElement<Serializable> element = new JAXBElement<Serializable>(type, payloadClass, payload);
+ DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+ builderFactory.setNamespaceAware(true);
+ Document document = builderFactory.newDocumentBuilder().newDocument();
+ marshaller.marshal(element, document);
+ return WSRPTypeFactory.createEventPayloadAsAny(document.getDocumentElement());
+ }
+ catch (Exception e)
+ {
+ throw new IllegalArgumentException("Couldn't marshall payload " + payload + " with expected type " + type, e);
+ }
}
}
}
Added: components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableNamedStringArray.java
===================================================================
--- components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableNamedStringArray.java (rev 0)
+++ components/wsrp/trunk/common/src/main/java/org/gatein/wsrp/payload/SerializableNamedStringArray.java 2010-10-07 15:38:39 UTC (rev 4591)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.wsrp.payload;
+
+
+import org.gatein.wsrp.WSRPTypeFactory;
+import org.oasis.wsrp.v2.NamedString;
+import org.oasis.wsrp.v2.NamedStringArray;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class SerializableNamedStringArray implements Serializable
+{
+ private SerializableNamedString[] strings;
+
+ SerializableNamedStringArray(NamedStringArray array)
+ {
+ initFrom(array);
+ }
+
+ void initFrom(NamedStringArray array)
+ {
+ List<NamedString> namedString = array.getNamedString();
+ strings = new SerializableNamedString[namedString.size()];
+ int i = 0;
+ for (NamedString string : namedString)
+ {
+ strings[i++] = new SerializableNamedString(string.getName(), string.getValue());
+ }
+ }
+
+ NamedStringArray toNamedStringArray()
+ {
+ NamedStringArray array = WSRPTypeFactory.createNamedStringArray();
+
+ List<NamedString> namedString = new ArrayList<NamedString>(strings.length);
+ for (SerializableNamedString string : strings)
+ {
+ namedString.add(WSRPTypeFactory.createNamedString(string.name, string.value));
+ }
+
+ array.getNamedString().addAll(namedString);
+ return array;
+ }
+
+ private static class SerializableNamedString implements Serializable
+ {
+ String name;
+ String value;
+
+ private SerializableNamedString(String name, String value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+ }
+}
14 years, 3 months
gatein SVN: r4590 - in portal/branches/wci: component/web/security/src/main/java/org/exoplatform/web/security and 2 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-07 10:49:15 -0400 (Thu, 07 Oct 2010)
New Revision: 4590
Added:
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
Modified:
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
portal/branches/wci/examples/portal/war/src/main/webapp/WEB-INF/web.xml
portal/branches/wci/web/portal/src/main/webapp/WEB-INF/web.xml
Log:
Fix remember me cookie creation
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-10-07 14:42:11 UTC (rev 4589)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2010-10-07 14:49:15 UTC (rev 4590)
@@ -66,9 +66,6 @@
//
if (credentials == null)
{
- PortalContainer pContainer = PortalContainer.getInstance();
- ServletContext context = pContainer.getPortalContext();
-
//
String token = getRememberMeTokenCookie(req);
if (token != null)
@@ -117,30 +114,10 @@
log.debug("Login initiated with credentials in session, performing authentication");
if (result instanceof GenericAuthenticationResult)
{
- // if we do have a remember me
- String rememberme = req.getParameter("rememberme");
- if ("true".equals(rememberme))
- {
- boolean isRemember = "true".equals(req.getParameter(InitiateLoginServlet.COOKIE_NAME));
- if (isRemember)
- {
- //Create token
- AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
- String cookieToken = tokenService.createToken(credentials);
-
- log.debug("Found a remember me request parameter, created a persistent token " + cookieToken + " for it and set it up " +
- "in the next response");
- Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, cookieToken);
- cookie.setPath(req.getContextPath());
- cookie.setMaxAge((int)tokenService.getValidityTime() / 1000);
- resp.addCookie(cookie);
- }
- }
((GenericAuthenticationResult) result).perform(req, resp);
}
else
- {
-
+ {
resp.sendRedirect(resp.encodeRedirectURL(""));
}
}
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2010-10-07 14:42:11 UTC (rev 4589)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2010-10-07 14:49:15 UTC (rev 4590)
@@ -19,9 +19,17 @@
package org.exoplatform.web.login;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.web.AbstractFilter;
+import org.exoplatform.web.security.security.CookieTokenService;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.common.text.FastURLEncoder;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.GenericAuthenticationResult;
+import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
+import org.gatein.wci.impl.DefaultServletContainerFactory;
+import org.gatein.wci.security.Credentials;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
@@ -36,18 +44,14 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class RememberMeFilter implements Filter
+public class RememberMeFilter extends AbstractFilter
{
/** . */
private static final FastURLEncoder CONVERTER = FastURLEncoder.getUTF8Instance();
/** . */
private static final Logger log = LoggerFactory.getLogger(RememberMeFilter.class);
-
- public void init(FilterConfig filterConfig) throws ServletException
- {
- }
-
+
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException
{
doFilter((HttpServletRequest)req, (HttpServletResponse)resp, chain);
@@ -60,31 +64,27 @@
String token = InitiateLoginServlet.getRememberMeTokenCookie(req);
if (token != null)
{
- StringBuilder builder = new StringBuilder();
- builder.append(req.getContextPath());
- builder.append("/private");
- String pathInfo = req.getPathInfo();
- if (pathInfo != null)
+ String s = privateUri(req);
+
+ ExoContainer container = getContainer();
+ Object o =
+ ((CookieTokenService)container.getComponentInstanceOfType(CookieTokenService.class)).validateToken(
+ token, false);
+ if (o instanceof Credentials)
{
- builder.append(pathInfo);
- }
- char sep = '?';
- for (Enumeration<String> e = req.getParameterNames();e.hasMoreElements();)
- {
- String parameterName = e.nextElement();
- for (String parameteValue : req.getParameterValues(parameterName))
+ Credentials credentials = (Credentials) o;
+ AuthenticationResult result = DefaultServletContainerFactory.getInstance().getServletContainer()
+ .login(req, resp, credentials.getUsername(), credentials.getPassword());
+ if (result instanceof GenericAuthenticationResult)
{
- builder.append(sep);
- sep = '&';
- builder.append(CONVERTER.encode(parameterName));
- builder.append('=');
- builder.append(CONVERTER.encode(parameteValue));
+ ((GenericAuthenticationResult) result).perform(req, resp);
}
+ else if (result instanceof ProgrammaticAuthenticationResult)
+ {
+ resp.sendRedirect(s);
+ }
+ return;
}
- String s = builder.toString();
- log.debug("Redirecting unauthenticated request with token " + token + " to URL " + s);
- resp.sendRedirect(s);
- return;
}
}
@@ -95,4 +95,30 @@
public void destroy()
{
}
+
+ private String privateUri(HttpServletRequest req)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append(req.getContextPath());
+ builder.append("/private");
+ String pathInfo = req.getPathInfo();
+ if (pathInfo != null)
+ {
+ builder.append(pathInfo);
+ }
+ char sep = '?';
+ for (Enumeration<String> e = req.getParameterNames();e.hasMoreElements();)
+ {
+ String parameterName = e.nextElement();
+ for (String parameteValue : req.getParameterValues(parameterName))
+ {
+ builder.append(sep);
+ sep = '&';
+ builder.append(CONVERTER.encode(parameterName));
+ builder.append('=');
+ builder.append(CONVERTER.encode(parameteValue));
+ }
+ }
+ return builder.toString();
+ }
}
Added: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java (rev 0)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java 2010-10-07 14:49:15 UTC (rev 4590)
@@ -0,0 +1,85 @@
+/*
+* Copyright (C) 2003-2009 eXo Platform SAS.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.exoplatform.web.security;
+
+import org.exoplatform.web.login.InitiateLoginServlet;
+import org.exoplatform.web.security.security.AbstractTokenService;
+import org.exoplatform.web.security.security.CookieTokenService;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.security.WCILoginController;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class PortalLoginController extends WCILoginController {
+
+ /** . */
+ private static final Logger log = LoggerFactory.getLogger(PortalLoginController.class);
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ super.doGet(req, resp);
+
+ // Obtain initial URI
+ String uri = req.getParameter("initialURI");
+
+ // otherwise compute one
+ if (uri == null || uri.length() == 0)
+ {
+ uri = req.getContextPath() + "/private/classic";
+ log.debug("No initial URI found, will use default " + uri + " instead ");
+ }
+ else
+ {
+ log.debug("Found initial URI " + uri);
+ }
+
+ // if we do have a remember me
+ String rememberme = req.getParameter("rememberme");
+ if ("true".equals(rememberme))
+ {
+ boolean isRemember = "true".equals(req.getParameter(InitiateLoginServlet.COOKIE_NAME));
+ if (isRemember)
+ {
+ //Create token
+ AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
+ String cookieToken = tokenService.createToken(credentials);
+
+ log.debug("Found a remember me request parameter, created a persistent token " + cookieToken + " for it and set it up " +
+ "in the next response");
+ Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, cookieToken);
+ cookie.setPath(req.getContextPath());
+ cookie.setMaxAge((int)tokenService.getValidityTime() / 1000);
+ resp.addCookie(cookie);
+ }
+ }
+
+ //
+ resp.sendRedirect(uri);
+ }
+}
Modified: portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
===================================================================
--- portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2010-10-07 14:42:11 UTC (rev 4589)
+++ portal/branches/wci/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2010-10-07 14:49:15 UTC (rev 4590)
@@ -100,21 +100,22 @@
String password = new String(((PasswordCallback)callbacks[1]).getPassword());
Credentials c = null;
- ExoContainer container = getContainer();
- Object o =
- ((CookieTokenService)container.getComponentInstanceOfType(CookieTokenService.class)).validateToken(
- password, false);
-
+
//
// For clustered config check credentials stored and propagated in session. This won't work in tomcat because
// of lack of JACC PolicyContext so the code must be a bit defensive
- if (o == null && getContextMethod != null && password.startsWith(InitiateLoginServlet.COOKIE_NAME))
+ if (getContextMethod != null && password.startsWith(InitiateLoginServlet.COOKIE_NAME))
{
HttpServletRequest request;
try
{
request = (HttpServletRequest)getContextMethod.invoke(null, "javax.servlet.http.HttpServletRequest");
- o = request.getSession().getAttribute(AUTHENTICATED_CREDENTIALS);
+ Object o = request.getSession().getAttribute(AUTHENTICATED_CREDENTIALS);
+
+ if (o instanceof Credentials)
+ {
+ c = (Credentials) o;
+ }
}
catch(Throwable e)
{
@@ -122,10 +123,6 @@
log.error("LoginModule error. Turn off session credentials checking with proper configuration option of " +
"LoginModule set to false");
}
-
- if (o instanceof Credentials) {
- c = (Credentials) o;
- }
}
if (c != null)
Modified: portal/branches/wci/examples/portal/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/branches/wci/examples/portal/war/src/main/webapp/WEB-INF/web.xml 2010-10-07 14:42:11 UTC (rev 4589)
+++ portal/branches/wci/examples/portal/war/src/main/webapp/WEB-INF/web.xml 2010-10-07 14:49:15 UTC (rev 4590)
@@ -169,7 +169,7 @@
<servlet>
<servlet-name>PortalLoginController</servlet-name>
- <servlet-class>org.gatein.wci.security.WCILoginController</servlet-class>
+ <servlet-class>org.exoplatform.web.security.PortalLoginController</servlet-class>
</servlet>
<servlet>
<servlet-name>InitiateLoginServlet</servlet-name>
Modified: portal/branches/wci/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/branches/wci/web/portal/src/main/webapp/WEB-INF/web.xml 2010-10-07 14:42:11 UTC (rev 4589)
+++ portal/branches/wci/web/portal/src/main/webapp/WEB-INF/web.xml 2010-10-07 14:49:15 UTC (rev 4590)
@@ -209,7 +209,7 @@
<servlet>
<servlet-name>PortalLoginController</servlet-name>
- <servlet-class>org.gatein.wci.security.WCILoginController</servlet-class>
+ <servlet-class>org.exoplatform.web.security.PortalLoginController</servlet-class>
</servlet>
<servlet>
<servlet-name>InitiateLoginServlet</servlet-name>
14 years, 3 months
gatein SVN: r4589 - in components/wci/branches/adf/wci/src/main/java/org/gatein/wci: impl and 1 other directories.
by do-not-reply@jboss.org
Author: alain_defrance
Date: 2010-10-07 10:42:11 -0400 (Thu, 07 Oct 2010)
New Revision: 4589
Modified:
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java
Log:
Some changes related to events
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-10-07 13:02:46 UTC (rev 4588)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/AuthenticationEvent.java 2010-10-07 14:42:11 UTC (rev 4589)
@@ -19,6 +19,8 @@
package org.gatein.wci.authentication;
+import org.gatein.wci.security.Credentials;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -30,8 +32,7 @@
{
private final HttpServletRequest request;
private final HttpServletResponse response;
- private final String username;
- private final String password;
+ private final Credentials credentials;
public AuthenticationEvent(HttpServletRequest request, HttpServletResponse response)
{
@@ -48,11 +49,10 @@
this.request = request;
this.response = response;
- this.username = null;
- this.password = null;
+ this.credentials = null;
}
- public AuthenticationEvent(HttpServletRequest request, HttpServletResponse response, String username, String password)
+ public AuthenticationEvent(HttpServletRequest request, HttpServletResponse response, Credentials credentials)
{
if (request == null)
@@ -65,20 +65,14 @@
throw new IllegalArgumentException("response is null");
}
- if (username == null)
+ if (credentials == null)
{
- throw new IllegalArgumentException("username is null");
+ throw new IllegalArgumentException("credentials is null");
}
- if (password == null)
- {
- throw new IllegalArgumentException("password is null");
- }
-
this.request = request;
this.response = response;
- this.username = username;
- this.password = password;
+ this.credentials = credentials;
}
public HttpServletRequest getRequest()
@@ -91,13 +85,8 @@
return response;
}
- public String getUsername()
+ public Credentials getCredentials()
{
- return (username != null ? username: "");
+ return credentials;
}
-
- public String getPassword()
- {
- return (password != null ? password: "");
- }
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java 2010-10-07 13:02:46 UTC (rev 4588)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/authentication/GenericAuthenticationResult.java 2010-10-07 14:42:11 UTC (rev 4589)
@@ -56,7 +56,7 @@
Object o = DefaultServletContainerFactory.getInstance().getServletContainer();
if (o instanceof DefaultServletContainer)
{
- ((DefaultServletContainer)o).fireEvent(DefaultServletContainer.EventType.LOGIN, new AuthenticationEvent(req, resp, username, ticket));
+ ((DefaultServletContainer)o).fireEvent(DefaultServletContainer.EventType.LOGIN, new AuthenticationEvent(req, resp, new Credentials(username, ticket)));
}
}
}
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-10-07 13:02:46 UTC (rev 4588)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/impl/DefaultServletContainer.java 2010-10-07 14:42:11 UTC (rev 4589)
@@ -25,8 +25,8 @@
import org.gatein.wci.authentication.AuthenticationEvent;
import org.gatein.wci.authentication.AuthenticationListener;
import org.gatein.wci.authentication.AuthenticationResult;
-import org.gatein.wci.authentication.GenericAuthentication;
import org.gatein.wci.authentication.GenericAuthenticationResult;
+import org.gatein.wci.security.Credentials;
import org.gatein.wci.spi.ServletContainerContext;
import org.gatein.wci.spi.WebAppContext;
import org.gatein.wci.WebAppListener;
@@ -106,7 +106,7 @@
//
if (!(result instanceof GenericAuthenticationResult))
{
- fireEvent(EventType.LOGIN, new AuthenticationEvent(request, response, userName, password));
+ fireEvent(EventType.LOGIN, new AuthenticationEvent(request, response, new Credentials(userName, password)));
}
return result;
Modified: components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java
===================================================================
--- components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java 2010-10-07 13:02:46 UTC (rev 4588)
+++ components/wci/branches/adf/wci/src/main/java/org/gatein/wci/security/WCILoginController.java 2010-10-07 14:42:11 UTC (rev 4589)
@@ -27,6 +27,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
+import java.lang.reflect.Field;
/**
* @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
@@ -37,6 +38,9 @@
/** . */
private static final Logger log = LoggerFactory.getLogger(WCILoginController.class);
+ /** . */
+ protected Credentials credentials;
+
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
String username = req.getParameter("username");
@@ -58,29 +62,13 @@
//
log.debug("Found username and password and set credentials in http session");
- Credentials credentials = new Credentials(username, password);
+ credentials = new Credentials(username, password);
req.getSession().setAttribute(Credentials.CREDENTIALS, credentials);
-
- // Obtain initial URI
- String uri = req.getParameter("initialURI");
-
- // otherwise compute one
- if (uri == null || uri.length() == 0)
- {
- uri = req.getContextPath() + "/private/classic";
- log.debug("No initial URI found, will use default " + uri + " instead ");
- }
- else
- {
- log.debug("Found initial URI " + uri);
- }
-
- //
- resp.sendRedirect(uri);
}
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
doGet(req, resp);
+ Field f;
}
}
14 years, 3 months
gatein SVN: r4588 - portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: vuthelinh
Date: 2010-10-07 09:02:46 -0400 (Thu, 07 Oct 2010)
New Revision: 4588
Modified:
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
Log:
add focus(locator) commands
Modified: portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-10-07 11:23:46 UTC (rev 4587)
+++ portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-10-07 13:02:46 UTC (rev 4588)
@@ -423,7 +423,7 @@
sb.append("\").matches(\"^");
sb.append(param3);
sb.append("$\"));\n");
- } else if (param1.equals("doubleClickAt")) {
+ } else if (param1.equals("doubleClickAt")|| param1.equals("focus") ) {
sb.append("selenium.");
sb.append(param1);
sb.append("(\"");
14 years, 3 months
gatein SVN: r4587 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-10-07 07:23:46 -0400 (Thu, 07 Oct 2010)
New Revision: 4587
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_001_CutPasteNodeToTheSamePlace.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_002_CutPasteNodeToTheSameNavigation.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_004_CutPasteNodeByAddPage.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_005_CutPasteNodeInToTheSameThisSource.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_006_CutPasteSystemNode.html
Log:
TESTVN-1635 - Manage folders in selegen with GTNPORTAL product
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_001_CutPasteNodeToTheSamePlace.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_001_CutPasteNodeToTheSamePlace.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_001_CutPasteNodeToTheSamePlace.html 2010-10-07 11:23:46 UTC (rev 4587)
@@ -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_POR_14_04_001_CutPasteNodeToTheSamePlace</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_04_001_CutPasteNodeToTheSamePlace</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</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>clickAt</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Management pop-up --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Cut node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Paste node to same place--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Verify text Message--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>This node name already exists</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>This node name already exists</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Sign out--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_002_CutPasteNodeToTheSameNavigation.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_002_CutPasteNodeToTheSameNavigation.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_002_CutPasteNodeToTheSameNavigation.html 2010-10-07 11:23:46 UTC (rev 4587)
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_04_002_CutPasteNodeToTheSameNavigation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_04_002_CutPasteNodeToTheSameNavigation</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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>echo</td>
+ <td>--Open Navigation Menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Add a node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>Test_POR_14_04_002</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>Test_POR_14_04_002</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Choose Page Selector--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[2]/div/div/div/div/div/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[2]/div/div/div/div/div/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>//div[@id='UIPageSelector2']/div[3]/table/tbody/tr/td/div[3]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPageSelector2']/div[3]/table/tbody/tr/td/div[3]/div/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//img[@title='Select Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//img[@title='Select Page']</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>-- Copy node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Test_POR_14_04_002</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Test_POR_14_04_002</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_04_002']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_04_002']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Paste node to same navigation--</td>
+ <td></td>
+</tr>
+<!--click at home in Naigation Management-->
+<tr>
+ <td>click</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='NavigationNodePopupMenu']/div/div[2]/div/div/div[7]/a</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>waitForElementPresent</td>
+ <td>//div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='PortalNavigationTopContainer']/div[3]/div/div/div/div/div/div/a</td>
+ <td>Test_POR_14_04_002</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Delete node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[2]/div/div/div[2]/div[2]/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div/div/a</td>
+ <td>Test_POR_14_04_002</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>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[8]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[8]/div/a</td>
+ <td>Test_POR_14_04_002</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>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>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/candidate/Test_POR_14_04_004_CutPasteNodeByAddPage.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_004_CutPasteNodeByAddPage.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_004_CutPasteNodeByAddPage.html 2010-10-07 11:23:46 UTC (rev 4587)
@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_04_004_CutPasteNodeByAddPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_04_004_CutPasteNodeByAddPage</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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>echo</td>
+ <td>--Open Site Menu Editor--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Home</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Add new page --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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_POR_14_04_004</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>Test_POR_14_04_004</td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Click Next to move to step 2</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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 Next to move to step 3, keep Empty layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']/div/div[3]/div/div/div/div[2]/div/table/tbody/tr/td/div[2]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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 Save to complete adding page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Cut a node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div[1]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[2]/div[2]/div[1]/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_04_004']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Test_POR_14_04_004']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Paste node into another node in the same navigation--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[@class='HomeNode']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@class="UIContextMenuContainer"]/div[2]/div/div/div[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Delete node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[7]/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[7]/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Sign out --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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/candidate/Test_POR_14_04_005_CutPasteNodeInToTheSameThisSource.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_005_CutPasteNodeInToTheSameThisSource.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_005_CutPasteNodeInToTheSameThisSource.html 2010-10-07 11:23:46 UTC (rev 4587)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_04_005_CutPasteNodeInToTheSameThisSource</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_04_005_CutPasteNodeInToTheSameThisSource</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Management pop-up --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Cut node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected'and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected'and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Paste node to same place--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Verify text Message--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>The source and the destination must be different.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>The source and the destination must be different.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Sign out--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_006_CutPasteSystemNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_006_CutPasteSystemNode.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_04_006_CutPasteSystemNode.html 2010-10-07 11:23:46 UTC (rev 4587)
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_04_006_CutPasteSystemNode</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_04_006_CutPasteSystemNode</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Management pop-up --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Cut system node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@title='Register']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cut Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Verify text Message--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Cannot cut a system node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Cannot cut a system node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[3]/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[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>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Sign out--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 3 months
gatein SVN: r4586 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-10-07 07:22:24 -0400 (Thu, 07 Oct 2010)
New Revision: 4586
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_04_006_CutPasteSystemNode.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_14_04_006_CutPasteSystemNode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_04_006_CutPasteSystemNode.html 2010-10-07 11:15:43 UTC (rev 4585)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_POR_14_04_006_CutPasteSystemNode.html 2010-10-07 11:22:24 UTC (rev 4586)
@@ -17,6 +17,11 @@
<td></td>
</tr>
<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
<td>echo</td>
<td>--Login portal--</td>
<td></td>
@@ -27,7 +32,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Sign in</td>
<td></td>
</tr>
@@ -57,7 +62,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Site</td>
<td></td>
</tr>
@@ -67,7 +72,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Edit Navigation</td>
<td></td>
</tr>
@@ -77,7 +82,7 @@
<td></td>
</tr>
<tr>
- <td>componentExoContextMenu</td>
+ <td>mouseDownRight</td>
<td>//a[@title='Register']</td>
<td></td>
</tr>
@@ -108,12 +113,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//div[@id='UIPortalNavigationPortlet']/div[2]//div[2]//div[3]/div//div/a</td>
+ <td>//div[3]/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>clickAt</td>
- <td>//div[@id='UIPortalNavigationPortlet']/div[2]//div[2]//div[3]/div//div/a</td>
+ <td>click</td>
+ <td>//div[3]/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>
@@ -122,7 +127,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>//div[@id='UINavigationManagement']//table[@class='ActionContainer']//tr//td[2]//a</td>
<td></td>
</tr>
@@ -137,7 +142,7 @@
<td></td>
</tr>
<tr>
- <td>clickAt</td>
+ <td>click</td>
<td>link=Sign out</td>
<td></td>
</tr>
14 years, 3 months
gatein SVN: r4585 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2010-10-07 07:15:43 -0400 (Thu, 07 Oct 2010)
New Revision: 4585
Added:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_001_CopyPasteNodeIntoTheSameNavigation.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_003_CopyPasteNodeIntoTheSamePlace.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_004_CopyPasteNodeIntoTheSameSource.html
Log:
TESTVN-1635 - Manage folders in selegen with GTNPORTAL product
Added: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_001_CopyPasteNodeIntoTheSameNavigation.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_001_CopyPasteNodeIntoTheSameNavigation.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_001_CopyPasteNodeIntoTheSameNavigation.html 2010-10-07 11:15:43 UTC (rev 4585)
@@ -0,0 +1,192 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_03_001_CopyPasteNodeIntoTheSameNavigation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_03_001_CopyPasteNodeIntoTheSameNavigation</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</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>echo</td>
+ <td>--Open Navigation Menu--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Copy a node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Paste node into another node in the same navigation--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@title='SiteMap']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//a[@title='SiteMap']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='SiteMap']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='SiteMap']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div/div/div[2]/div/div/div[7]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div/div/div[2]/div/div/div[7]//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Delete node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>xpath=//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>xpath=//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[3]/div/div//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Delete Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>assertConfirmation</td>
+ <td>Are you sure you want to delete this node?</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Sign out --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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/candidate/Test_POR_14_03_003_CopyPasteNodeIntoTheSamePlace.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_003_CopyPasteNodeIntoTheSamePlace.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_003_CopyPasteNodeIntoTheSamePlace.html 2010-10-07 11:15:43 UTC (rev 4585)
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_03_003_CopyPasteNodeIntoTheSamePlace</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_03_003_CopyPasteNodeIntoTheSamePlace</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>windowMaximize</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</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>echo</td>
+ <td>--Open Navigation Management pop-up --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Copy node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Paste node to same place--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseDownRight</td>
+ <td>//div[@id='UINavigationNodeSelector']/div/div/div/div[2]/div/div/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Verify text Message--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[2]/div[3]/div/div/div/div/div[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyText</td>
+ <td>//div[2]/div[3]/div/div/div/div/div[2]</td>
+ <td>This node name already exists.</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- 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/candidate/Test_POR_14_03_004_CopyPasteNodeIntoTheSameSource.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_004_CopyPasteNodeIntoTheSameSource.html (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/candidate/Test_POR_14_03_004_CopyPasteNodeIntoTheSameSource.html 2010-10-07 11:15:43 UTC (rev 4585)
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>Test_POR_14_03_004_CopyPasteNodeIntoTheSameSource</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Test_POR_14_03_004_CopyPasteNodeIntoTheSameSource</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Login portal--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Open Navigation Management pop-up --</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Copy node--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//a[@title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>xpath=//div[@id='UINavigationNodeSelector']//a[@class='NodeIcon DefaultPageIcon NodeSelected' and @title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Copy Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Paste node to same place--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>componentExoContextMenu</td>
+ <td>//a[@title='Home']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='UIContextMenuContainer']/div[2]/div/div/div[7]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>--Verify text Message--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>The source and the destination must be different. </td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalApplication']/div[@class='UIPopupWindow UIDragObject']//div[@class='MiddleLeftSideDecorator']//div[@class='UIPopupMessages']/div[@class='MessageActionBar']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>-- Sign out--</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
14 years, 3 months