gatein SVN: r1383 - in portal/trunk/portlet/exoadmin/src/main: java/org/exoplatform/wsrp/webui/component/consumer and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-19 11:58:27 -0500 (Tue, 19 Jan 2010)
New Revision: 1383
Added:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/ConsumerController.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerOverview.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerOverview.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerPropertyEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpRegistrationDetails.java
Removed:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/ConsumerController.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl
Log:
- Created packages to better organize code.
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/ConsumerController.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/ConsumerController.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/ConsumerController.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,85 +0,0 @@
-/*
- * 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.exoplatform.wsrp.webui.component;
-
-import org.gatein.pc.api.PortletInvokerException;
-import org.gatein.wsrp.WSRPConsumer;
-import org.gatein.wsrp.consumer.RefreshResult;
-import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
-
-import java.util.List;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- */
-public class ConsumerController
-{
- private ConsumerRegistry registry;
-
- public ConsumerController(ConsumerRegistry registry)
- {
- this.registry = registry;
- }
-
- public ConsumerRegistry getRegistry()
- {
- return registry;
- }
-
- public WSRPConsumer getConsumer(String id)
- {
- return registry.getConsumer(id);
- }
-
- public List<WSRPConsumer> getConfiguredConsumers()
- {
- return registry.getConfiguredConsumers();
- }
-
- public RefreshResult refreshConsumer(WSRPConsumer consumer) throws PortletInvokerException
- {
- RefreshResult result = consumer.refresh(true);
-
- if (result.hasIssues())
- {
- // refresh had issues, we should deactivate this consumer
- registry.deactivateConsumerWith(consumer.getProducerId());
- }
- else
- {
- // activate the consumer if it's supposed to be active
- if (consumer.isActive())
- {
- registry.activateConsumerWith(consumer.getProducerId());
- }
- else
- {
- registry.deactivateConsumerWith(consumer.getProducerId());
- }
- }
-
- return result;
- }
-}
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,222 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2009, 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.UIGrid;
-import org.exoplatform.webui.core.UIPopupWindow;
-import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.form.UIForm;
-import org.exoplatform.webui.form.UIFormInputBase;
-import org.exoplatform.webui.form.UIFormStringInput;
-import org.exoplatform.webui.form.validator.MandatoryValidator;
-import org.gatein.common.util.ParameterValidation;
-import org.gatein.wsrp.WSRPConsumer;
-import org.gatein.wsrp.consumer.ConsumerException;
-import org.gatein.wsrp.consumer.ProducerInfo;
-import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
-import org.gatein.wsrp.services.ManageableServiceFactory;
-
-/** @author Wesley Hales */
-@ComponentConfig(template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl", lifecycle = UIFormLifecycle.class, events = {
- @EventConfig(listeners = UIWsrpConsumerEditor.SaveActionListener.class)})
-public class UIWsrpConsumerEditor extends UIForm
-{
- protected static final String CONSUMER_NAME = "Consumer name: ";
- protected static final String CACHE_EXPIRATION = "Seconds before cache expiration: ";
- protected static final String TIMEOUT = "Milliseconds before timeout: ";
- protected static final String WSDL_URL = "WSDL URL: ";
- private UIFormInputBase<String> consumerName;
- private UIFormStringInput cache;
- private UIFormStringInput timeoutWS;
- private UIFormStringInput wsdl;
-
- public UIWsrpConsumerEditor() throws Exception
- {
-
- consumerName = new UIFormStringInput(CONSUMER_NAME, CONSUMER_NAME, null).addValidator(MandatoryValidator.class);
- addUIFormInput(consumerName);
- cache = new UIFormStringInput(CACHE_EXPIRATION, CACHE_EXPIRATION, null);
- addUIFormInput(cache);
- timeoutWS = new UIFormStringInput(TIMEOUT, TIMEOUT, null);
- addUIFormInput(timeoutWS);
- wsdl = new UIFormStringInput(WSDL_URL, WSDL_URL, null);
- addUIFormInput(wsdl);
- }
-
- private String getConsumerName()
- {
- return consumerName.getValue();
- }
-
- private Integer getCacheExpiration()
- {
- Integer cacheExp = 0;
- String cacheExpString = cache.getValue();
- if (cacheExpString != null)
- {
- cacheExp = Integer.parseInt(cacheExpString);
- }
- return cacheExp;
- }
-
- private Integer getTimeout()
- {
- int timeout = ManageableServiceFactory.DEFAULT_TIMEOUT_MS;
- String timeoutString = timeoutWS.getValue();
- if (!ParameterValidation.isNullOrEmpty(timeoutString))
- {
- timeout = Integer.parseInt(timeoutString);
- }
-
- return timeout;
- }
-
- private String getWSDLURL()
- {
- return wsdl.getValue();
- }
-
- private Boolean newConsumer;
-
- public Boolean isNewConsumer()
- {
- return newConsumer;
- }
-
- public void setNewConsumer(Boolean newConsumer)
- {
- this.newConsumer = newConsumer;
- }
-
- public void setConsumer(WSRPConsumer consumer)
- {
- if (consumer == null)
- {
- consumerName.setEditable(UIFormStringInput.ENABLE);
- setNewConsumer(true);
- return;
- }
- consumerName.setEditable(UIFormStringInput.ENABLE);
-
- consumerName.setValue(consumer.getProducerId());
- ProducerInfo producerInfo = consumer.getProducerInfo();
- cache.setValue(producerInfo.getExpirationCacheSeconds().toString());
- timeoutWS.setValue("" + producerInfo.getEndpointConfigurationInfo().getWSOperationTimeOut());
- wsdl.setValue(producerInfo.getEndpointConfigurationInfo().getWsdlDefinitionURL());
- setNewConsumer(false);
- }
-
- static public class SaveActionListener extends EventListener<UIWsrpConsumerEditor>
- {
- public void execute(Event<UIWsrpConsumerEditor> event) throws Exception
- {
- UIWsrpConsumerEditor consumerEditor = event.getSource();
-
- UIWsrpConsumerOverview consumerOverview = consumerEditor.getAncestorOfType(UIWsrpConsumerOverview.class);
-
- WebuiRequestContext ctx = event.getRequestContext();
- if (consumerEditor.isNewConsumer())
- {
- consumerEditor.save(ctx);
- }
- else
- {
- consumerEditor.edit(ctx);
- }
-
- consumerEditor.reset();
-
- UIPopupWindow popup = consumerEditor.getParent();
- popup.setRendered(false);
- popup.setShow(false);
-
- //temp way to refresh list, should call broadcast event (below)
- LazyPageList pageList = consumerOverview.createPageList(consumerOverview.getConfiguredConsumers());
- UIGrid uiGrid = consumerOverview.getChild(UIGrid.class);
- uiGrid.getUIPageIterator().setPageList(pageList);
- //uiGrid.configure()
- //try to broadcast an event back to consumerOverview to refresh grid... works but shows error
- //PortalRequestContext portalContext = org.exoplatform.portal.webui.util.Util.getPortalRequestContext();
- //Event<UIWsrpConsumerOverview> pnevent = new Event<UIWsrpConsumerOverview>(consumerOverview, "RefreshGrid", portalContext);
- //consumerOverview.broadcast(pnevent, Event.Phase.PROCESS);
-
- ctx.addUIComponentToUpdateByAjax(consumerOverview);
- }
- }
-
- public boolean save(WebuiRequestContext context) throws Exception
- {
- ExoContainer manager = ExoContainerContext.getCurrentContainer();
- ConsumerRegistry consumerRegistry = (ConsumerRegistry)manager.getComponentInstanceOfType(ConsumerRegistry.class);
-
- UIApplication uiApp = context.getUIApplication();
-
- try
- {
- consumerRegistry.createConsumer(getConsumerName(), getCacheExpiration(), getWSDLURL());
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.add.success", null));
- }
- catch (ConsumerException ce)
- {
- //todo - add to resource bundle
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.add.exists", null, ApplicationMessage.ERROR));
- }
- return true;
- }
-
- public boolean edit(WebuiRequestContext context) throws Exception
- {
- ExoContainer manager = ExoContainerContext.getCurrentContainer();
- ConsumerRegistry consumerRegistry = (ConsumerRegistry)manager.getComponentInstanceOfType(ConsumerRegistry.class);
- ProducerInfo producerInfo = consumerRegistry.getConsumer(getConsumerName()).getProducerInfo();
-
- producerInfo.setId(getConsumerName());
- producerInfo.setExpirationCacheSeconds(getCacheExpiration());
- producerInfo.getEndpointConfigurationInfo().setWsdlDefinitionURL(getWSDLURL());
- producerInfo.getEndpointConfigurationInfo().setWSOperationTimeOut(getTimeout());
-
- UIApplication uiApp = context.getUIApplication();
-
- try
- {
- consumerRegistry.updateProducerInfo(producerInfo);
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.edit.success", null));
- }
- catch (ConsumerException ce)
- {
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.edit.fail", null, ApplicationMessage.ERROR));
- }
- return true;
- }
-
-}
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,323 +0,0 @@
-/*
- * 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.commons.utils.ListAccess;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.UIContainer;
-import org.exoplatform.webui.core.UIGrid;
-import org.exoplatform.webui.core.UIPageIterator;
-import org.exoplatform.webui.core.UIPopupWindow;
-import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import org.gatein.wsrp.WSRPConsumer;
-import org.gatein.wsrp.consumer.RefreshResult;
-import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
-
-import java.util.List;
-
-/** @author Wesley Hales */
-
-@ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
- template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl",
- events = {
- @EventConfig(listeners = UIWsrpConsumerOverview.CreateConsumerActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.EditActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.DeleteActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.RefreshActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.DeactivateActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.ActivateActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.RefreshGridActionListener.class)
- })
-public class UIWsrpConsumerOverview extends UIContainer
-{
- public static String[] FIELDS = {"producerId", "active", "refreshNeeded"};
-
- //The action names are also your class names on the ui buttons. You should stick with common names like:
- //edit
- //delete
- //
- public static String[] SELECT_ACTIONS = {"Edit", "Delete", "Refresh", "Activate", "Deactivate"};
-
- private ConsumerController controller;
- private UIPopupWindow consumerEditorPopup;
- private UIPageIterator consumersIterator;
-
- public List getConfiguredConsumers() throws Exception
- {
- return controller.getConfiguredConsumers();
- }
-
- public LazyPageList createPageList(final List pageList)
- {
- return new LazyPageList<WSRPConsumer>(new ListAccess<WSRPConsumer>()
- {
-
- public int getSize() throws Exception
- {
- return pageList.size();
- }
-
- public WSRPConsumer[] load(int index, int length) throws Exception
- {
- WSRPConsumer[] pcs = new WSRPConsumer[pageList.size()];
-
- if (index < 0)
- {
- throw new IllegalArgumentException("Illegal index: index must be a positive number");
- }
-
- if (length < 0)
- {
- throw new IllegalArgumentException("Illegal length: length must be a positive number");
- }
-
- if (index + length > pageList.size())
- {
- throw new IllegalArgumentException(
- "Illegal index or length: sum of the index and the length cannot be greater than the list size");
- }
-
- for (int i = 0; i < length; i++)
- {
- pcs[i] = (WSRPConsumer)pageList.get(i + index);
- }
-
- return pcs;
- }
-
- }, 10);
- }
-
- public UIWsrpConsumerOverview() throws Exception
- {
- // controller
- ConsumerRegistry registry = (ConsumerRegistry)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ConsumerRegistry.class);
- controller = new ConsumerController(registry);
-
- //setSelectedTab(1);
- consumerEditorPopup = addChild(UIPopupWindow.class, null, null);
- consumerEditorPopup.setWindowSize(450, 0);
- UIWsrpConsumerEditor consumerForm = createUIComponent(UIWsrpConsumerEditor.class, null, "Consumer Editor");
- consumerEditorPopup.setUIComponent(consumerForm);
- consumerEditorPopup.setRendered(false);
-
- UIGrid consumers = addChild(UIGrid.class, null, null);
- //configure the edit and delete buttons based on an id from the data list - this will also be passed as param to listener
- consumers.configure("producerId", FIELDS, SELECT_ACTIONS);
-
- consumersIterator = consumers.getUIPageIterator();
- consumersIterator.setId("ChangeConsumerPageIterator");
- consumersIterator.setRendered(false);
-
- refreshConsumersList();
- }
-
- static public class RefreshGridActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- consumerOverview.refreshGrid(event);
- }
- }
-
- public void refreshGrid(Event<UIWsrpConsumerOverview> event) throws Exception
- {
- //refresh the list
- refreshConsumersList();
-
- event.getRequestContext().addUIComponentToUpdateByAjax(this);
- }
-
- private void refreshConsumersList() throws Exception
- {
- LazyPageList pageList = createPageList(getConfiguredConsumers());
- consumersIterator.setPageList(pageList);
- }
-
- static public class CreateConsumerActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- consumerOverview.displayConsumerEditor(null);
- }
- }
-
- private void displayConsumerEditor(WSRPConsumer consumer) throws Exception
- {
- UIWsrpConsumerEditor editor = (UIWsrpConsumerEditor)consumerEditorPopup.getUIComponent();
-
- //reset the form
- editor.reset();
- editor.setConsumer(consumer);
- consumerEditorPopup.setRendered(true);
- consumerEditorPopup.setShow(true);
- consumerEditorPopup.setShowCloseButton(true);
- }
-
- static public class EditActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
-
- if (consumer != null)
- {
- consumerOverview.displayConsumerEditor(consumer);
- }
- }
- }
-
- static public class DeleteActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event)
- {
- UIApplication uiApp = event.getRequestContext().getUIApplication();
- try
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
- ConsumerRegistry consumerRegistry = consumerOverview.getConsumerRegistry();
- String id = event.getRequestContext().getRequestParameter(OBJECTID);
- if (consumer != null)
- {
- consumerRegistry.destroyConsumer(id);
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.delete.success", null, ApplicationMessage.INFO));
- consumerOverview.refreshGrid(event);
- }
- }
- catch (Exception e)
- {
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.delete.fail", new String[]{e.getCause().toString()}, ApplicationMessage.ERROR));
- }
-
- }
- }
-
- static public class DeactivateActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
- UIApplication uiApp = event.getRequestContext().getUIApplication();
-
- if (consumer != null)
- {
- if (consumer.isActive())
- {
- ConsumerRegistry registry = consumerOverview.getConsumerRegistry();
- registry.deactivateConsumerWith(consumer.getProducerId());
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.deactivate.success", null));
- consumerOverview.refreshGrid(event);
- }
- else
- {
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.deactivate.fail", null));
- }
- }
- }
- }
-
- static public class ActivateActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
- UIApplication uiApp = event.getRequestContext().getUIApplication();
-
- if (consumer != null && !consumer.isActive())
- {
- try
- {
- ConsumerRegistry registry = consumerOverview.getConsumerRegistry();
- registry.activateConsumerWith(consumer.getProducerId());
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.activate.success", null));
- consumerOverview.refreshGrid(event);
- }
- catch (Exception e)
- {
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.activate.fail", new String[]{e.getCause().toString()}, ApplicationMessage.ERROR));
- e.printStackTrace();
- }
- }
- }
- }
-
- static public class RefreshActionListener extends EventListener<UIWsrpConsumerOverview>
- {
- public void execute(Event<UIWsrpConsumerOverview> event)
- {
- UIApplication uiApp = event.getRequestContext().getUIApplication();
- try
- {
- UIWsrpConsumerOverview consumerOverview = event.getSource();
- WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
-
- if (consumer != null)
- {
- RefreshResult result = consumerOverview.controller.refreshConsumer(consumer);
-
- if (result.hasIssues())
- {
- consumerOverview.displayConsumerEditor(consumer);
- }
- else
- {
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.refresh.success", null, ApplicationMessage.INFO));
- }
-
- // refresh consumers
- consumerOverview.refreshGrid(event);
- }
- }
- catch (Exception e)
- {
- uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.refresh.fail", new String[]{e.getCause().toString()}, ApplicationMessage.ERROR));
- e.printStackTrace();
- }
- }
- }
-
- public WSRPConsumer getConsumerFromEvent(Event<?> event) throws Exception
- {
- String id = event.getRequestContext().getRequestParameter(OBJECTID);
- return controller.getConsumer(id);
- }
-
- public ConsumerRegistry getConsumerRegistry() throws Exception
- {
- return controller.getRegistry();
- }
-}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -26,6 +26,8 @@
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.UITabPane;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
+import org.exoplatform.wsrp.webui.component.consumer.UIWsrpConsumerOverview;
+import org.exoplatform.wsrp.webui.component.producer.UIWsrpProducerOverview;
/** @author Wesley Hales */
@ComponentConfig(
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,177 +0,0 @@
-/*
- * 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.portal.webui.util.Util;
-import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.form.UIForm;
-import org.exoplatform.webui.form.UIFormCheckBoxInput;
-import org.gatein.wsrp.producer.config.ProducerConfiguration;
-import org.gatein.wsrp.producer.config.ProducerConfigurationService;
-import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
-
-/**
- * @author Wesley Hales
- * @author Chris Laprun
- */
-@ComponentConfig(
- lifecycle = UIFormLifecycle.class,
- template = "app:/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl",
- events = {
- @EventConfig(listeners = UIWsrpProducerEditor.SaveActionListener.class),
- @EventConfig(listeners = UIWsrpProducerEditor.RegistrationOnChangeActionListener.class)
- }
-)
-public class UIWsrpProducerEditor extends UIForm
-{
- private static final String REG_REQUIRED_FOR_DESCRIPTION = "registrationrequiredforfulldescription";
- private static final String STRICT_MODE = "strictmode";
- private static final String REQUIRES_REGISTRATION = "requiresregistration";
- private static final String REGISTRATION_DETAILS = "registrationdetails";
-
- private ProducerConfigurationService configService;
- private UIWsrpRegistrationDetails registrationDetails;
- private UIFormCheckBoxInput regReqForDesc;
- private UIFormCheckBoxInput strictMode;
- private UIFormCheckBoxInput<Boolean> regRequired;
-
- public UIWsrpProducerEditor() throws Exception
- {
- configService = Util.getUIPortalApplication().getApplicationComponent(ProducerConfigurationService.class);
-
- regReqForDesc = new UIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION, REG_REQUIRED_FOR_DESCRIPTION, null);
- addUIFormInput(regReqForDesc);
- strictMode = new UIFormCheckBoxInput(STRICT_MODE, STRICT_MODE, null);
- addUIFormInput(strictMode);
-
- // registration required check box with onChange event
- regRequired = new UIFormCheckBoxInput<Boolean>(REQUIRES_REGISTRATION, REQUIRES_REGISTRATION, null);
- regRequired.setOnChange("RegistrationOnChange");
- addUIFormInput(regRequired);
- // because when we use setOnChange method, new eventListener will add to this form, we must re-set the actions of this form.
- // thif form has no action, so i'll put empty string array
- setActions(new String[]{});
-
- // registration details
- // form set to gather registration information
- registrationDetails = addChild(UIWsrpRegistrationDetails.class, null, REGISTRATION_DETAILS);
-
- init(false);
- }
-
- ProducerConfigurationService getService()
- {
- return configService;
- }
-
- private void init(boolean getRegistrationRequiredFromCheckBox) throws Exception
- {
- ProducerConfiguration configuration = configService.getConfiguration();
-
- ProducerRegistrationRequirements registrationRequirements = configuration.getRegistrationRequirements();
- regReqForDesc.setValue(registrationRequirements.isRegistrationRequiredForFullDescription());
- strictMode.setValue(configuration.isUsingStrictMode());
-
- boolean registrationRequired = getRegistrationRequiredFromCheckBox ?
- regRequired.getValue() :
- registrationRequirements.isRegistrationRequired();
- regRequired.setValue(registrationRequired);
-
- // if registration is required then we display more information
- if (registrationRequired)
- {
- registrationDetails.init(registrationRequirements);
- registrationDetails.setRendered(true);
- }
- else
- {
- registrationDetails.setRendered(false);
- }
- }
-
-
- static public class SaveActionListener extends EventListener<UIWsrpProducerEditor>
- {
- public void execute(Event<UIWsrpProducerEditor> event) throws Exception
- {
- UIWsrpProducerEditor source = event.getSource();
- ProducerConfigurationService service = source.getService();
- ProducerConfiguration producerConfiguration = service.getConfiguration();
- ProducerRegistrationRequirements registrationRequirements = producerConfiguration.getRegistrationRequirements();
- registrationRequirements.setRegistrationRequiredForFullDescription(Boolean.parseBoolean(source.regReqForDesc.getValue().toString()));
- producerConfiguration.setUsingStrictMode(Boolean.parseBoolean(source.strictMode.getValue().toString()));
-
- boolean requiresReg = Boolean.parseBoolean(source.regRequired.getValue().toString());
- registrationRequirements.setRegistrationRequired(requiresReg);
- if (requiresReg)
- {
- source.registrationDetails.updateRegistrationDetailsFromForm(registrationRequirements);
- }
-
- try
- {
- service.saveConfiguration();
- }
- catch (Exception e)
- {
- UIApplication uiApp = event.getRequestContext().getUIApplication();
- uiApp.addMessage(new ApplicationMessage("Producer Modification Error", null, ApplicationMessage.ERROR));
- e.printStackTrace();
- }
-
- source.init(false);
- }
- }
-
- /*public static class RegistrationOnChangeActionListener extends EventListener<UIFormCheckBoxInput>
- {
- public void execute(Event<UIFormCheckBoxInput> event) throws Exception
- {
- UIFormCheckBoxInput source = event.getSource();
- UIWsrpProducerEditor parent = source.getAncestorOfType(UIWsrpProducerEditor.class);
- parent.init();
-
- //update only the parent, avoid updating the full portlet
- event.getRequestContext().addUIComponentToUpdateByAjax(parent);
- }
- }*/
-
- public static class RegistrationOnChangeActionListener extends EventListener<UIWsrpProducerEditor>
- {
- public void execute(Event<UIWsrpProducerEditor> event) throws Exception
- {
- UIWsrpProducerEditor source = event.getSource();
- source.init(true);
-
- //update only the parent, avoid updating the full portlet
- event.getRequestContext().addUIComponentToUpdateByAjax(source);
- }
- }
-
-}
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,46 +0,0 @@
-/*
- * 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.core.UIContainer;
-import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
-
-/**
- * @author Wesley Hales
- * @author Chris Laprun
- */
-@ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
- template = "app:/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl"
-)
-public class UIWsrpProducerOverview extends UIContainer
-{
- private UIWsrpProducerEditor producerForm;
-
- public UIWsrpProducerOverview() throws Exception
- {
- producerForm = createUIComponent(UIWsrpProducerEditor.class, null, "Producer Editor");
- addChild(producerForm);
- }
-}
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,145 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.UIPopupWindow;
-import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.form.UIForm;
-import org.exoplatform.webui.form.UIFormStringInput;
-import org.exoplatform.webui.form.validator.MandatoryValidator;
-import org.gatein.wsrp.producer.config.ProducerConfiguration;
-import org.gatein.wsrp.producer.config.ProducerConfigurationService;
-import org.gatein.wsrp.registration.LocalizedString;
-import org.gatein.wsrp.registration.RegistrationPropertyDescription;
-
-
-/** @author Wesley Hales */
-@ComponentConfig(template = "app:/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl", lifecycle = UIFormLifecycle.class,
- events = {
- @EventConfig(listeners = UIWsrpProducerPropertyEditor.SaveActionListener.class)})
-public class UIWsrpProducerPropertyEditor extends UIForm
-{
- protected static final String DESCRIPTION = "description";
- protected static final String LABEL = "label";
- protected static final String HINT = "hint";
- private RegistrationPropertyDescription registrationPropertyDescription_;
-
- public UIWsrpProducerPropertyEditor() throws Exception
- {
- addUIFormInput(new UIFormStringInput(DESCRIPTION, DESCRIPTION, null).addValidator(MandatoryValidator.class));
- addUIFormInput(new UIFormStringInput(LABEL, LABEL, null).addValidator(MandatoryValidator.class));
- addUIFormInput(new UIFormStringInput(HINT, HINT, null).addValidator(MandatoryValidator.class));
- }
-
- public void setRegistrationPropertyDescription(RegistrationPropertyDescription registrationPropertyDescription) throws Exception
- {
-
- this.registrationPropertyDescription_ = registrationPropertyDescription;
-
- if (registrationPropertyDescription_ == null)
- {
- getUIStringInput(DESCRIPTION).setEditable(UIFormStringInput.ENABLE);
- reset();
- return;
- }
- getUIStringInput(DESCRIPTION).setEditable(UIFormStringInput.ENABLE);
-
- invokeGetBindingBean(registrationPropertyDescription_);
-
- }
-
- public RegistrationPropertyDescription getRegistrationPropertyDescription()
- {
- return registrationPropertyDescription_;
- }
-
- static public class SaveActionListener extends EventListener<UIWsrpProducerPropertyEditor>
- {
- public void execute(Event<UIWsrpProducerPropertyEditor> event) throws Exception
- {
- UIWsrpProducerPropertyEditor source = event.getSource();
- source.save(event.getRequestContext());
- UIPopupWindow popup = source.getParent();
- popup.setRendered(false);
- popup.setShow(false);
- }
- }
-
- public boolean save(WebuiRequestContext context) throws Exception
- {
-
- ProducerConfigurationService pconfService = getProducerConfigurationService();
- ProducerConfiguration producerConfiguration = pconfService.getConfiguration();
-
-
- RegistrationPropertyDescription regPropDesc = getRegistrationPropertyDescription();
- if (regPropDesc != null)
- {
- System.out.println("---------old1: " + regPropDesc.getDescription());
- RegistrationPropertyDescription oldRegPropDesc = producerConfiguration.getRegistrationRequirements().getRegistrationProperties().get(regPropDesc);
- invokeSetBindingBean(oldRegPropDesc);
- System.out.println("---------new1: " + oldRegPropDesc.getNameAsString());
- //return;
- }
- else
- {
-
- RegistrationPropertyDescription newRegProcDesc = new RegistrationPropertyDescription();
- newRegProcDesc.setDescription(new LocalizedString(getUIStringInput(DESCRIPTION).getValue()));
- newRegProcDesc.setDescription(new LocalizedString(getUIStringInput(LABEL).getValue()));
- newRegProcDesc.setDescription(new LocalizedString(getUIStringInput(HINT).getValue()));
- System.out.println("---------new2: " + newRegProcDesc);
- producerConfiguration.getRegistrationRequirements().addRegistrationProperty(newRegProcDesc);
- }
-
- UIApplication uiApp = context.getUIApplication();
-
- try
- {
- pconfService.saveConfiguration();
- uiApp.addMessage(new ApplicationMessage("Producer Successfully Changed", null));
- }
- catch (Exception e)
- {
- uiApp.addMessage(new ApplicationMessage("Producer Modification Error", null));
-
- }
-
- return true;
- }
-
- public ProducerConfigurationService getProducerConfigurationService() throws Exception
- {
- ExoContainer manager = ExoContainerContext.getCurrentContainer();
- return (ProducerConfigurationService)manager.getComponentInstanceOfType(ProducerConfigurationService.class);
- }
-}
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,324 +0,0 @@
-/*
- * 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.commons.utils.ListAccess;
-import org.exoplatform.portal.webui.util.Util;
-import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.ComponentConfigs;
-import org.exoplatform.webui.config.annotation.EventConfig;
-import org.exoplatform.webui.core.UIApplication;
-import org.exoplatform.webui.core.UIComponent;
-import org.exoplatform.webui.core.UIGrid;
-import org.exoplatform.webui.core.UIPopupWindow;
-import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
-import org.exoplatform.webui.core.renderers.ValueRenderer;
-import org.exoplatform.webui.event.Event;
-import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.form.UIForm;
-import org.exoplatform.webui.form.UIFormInputBase;
-import org.exoplatform.webui.form.UIFormInputSet;
-import org.exoplatform.webui.form.UIFormStringInput;
-import org.gatein.registration.RegistrationPolicy;
-import org.gatein.registration.policies.DefaultRegistrationPolicy;
-import org.gatein.wsrp.producer.config.ProducerConfigurationService;
-import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
-import org.gatein.wsrp.registration.LocalizedString;
-import org.gatein.wsrp.registration.RegistrationPropertyDescription;
-
-import javax.xml.namespace.QName;
-import java.io.Writer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- */
-@ComponentConfigs({
- @ComponentConfig(id = UIWsrpRegistrationDetails.REGISTRATION_PROPERTIES, type = UIGrid.class, template = "system:/groovy/webui/core/UIGrid.gtmpl"),
- @ComponentConfig(
- lifecycle = UIContainerLifecycle.class,
- events = {
- @EventConfig(listeners = UIWsrpRegistrationDetails.AddPropertyActionListener.class),
- @EventConfig(listeners = UIWsrpRegistrationDetails.EditPropertyActionListener.class),
- @EventConfig(listeners = UIWsrpRegistrationDetails.DeletePropertyActionListener.class)
- })
-})
-public class UIWsrpRegistrationDetails extends UIFormInputSet
-{
- private UIFormInputBase<String> policy;
- private UIFormInputBase<String> validator;
- private UIGrid registrationProperties;
- private static final String NAME = "name";
- static String[] FIELDS = {NAME, "description", "label", "hint"};
-// static String[] PROPERTIES_ACTIONS = {"EditProperty", "DeleteProperty"};
- static String[] PROPERTIES_ACTIONS = {};
- static final String POLICY_CLASS = "policyClassName";
- static final String VALIDATOR_CLASS = "validatorClassName";
- static final String REGISTRATION_PROPERTIES = "registrationproperties";
- static final String REGISTRATION_PROPERTIES_ITERATOR = "registrationpropertiesiterator";
-
- public UIWsrpRegistrationDetails() throws Exception
- {
- //super(name);
-
- // policy
- policy = new UIFormStringInput(POLICY_CLASS, POLICY_CLASS, null);
- addUIFormInput(policy);
-
- // validator
- validator = new UIFormStringInput(VALIDATOR_CLASS, VALIDATOR_CLASS, null);
- addUIFormInput(validator);
-
- // registration properties
- registrationProperties = addChild(UIGrid.class, REGISTRATION_PROPERTIES, REGISTRATION_PROPERTIES);
-
- // add renderer for LocalizedString
- ValueRenderer<LocalizedString> renderer = new ValueRenderer<LocalizedString>()
- {
- @Override
- public String render(LocalizedString value)
- {
- return value.getValue();
- }
- };
- registrationProperties.registerRendererFor(renderer, LocalizedString.class);
-
- //configure the edit and delete buttons based on an id from the data list - this will also be passed as param to listener
- registrationProperties.configure(NAME, FIELDS, PROPERTIES_ACTIONS);
- registrationProperties.getUIPageIterator().setId(REGISTRATION_PROPERTIES_ITERATOR);
- registrationProperties.getUIPageIterator().setRendered(false);
- addChild(registrationProperties.getUIPageIterator());
-
- init(getService().getConfiguration().getRegistrationRequirements());
-
- //add the popup for property edit and adding new properties
- UIPopupWindow popup = addChild(UIPopupWindow.class, null, null);
- popup.setWindowSize(400, 300);
- UIWsrpProducerPropertyEditor propertyForm = createUIComponent(UIWsrpProducerPropertyEditor.class, null, "Producer Property Editor");
- popup.setUIComponent(propertyForm);
- popup.setRendered(false);
- }
-
- void init(ProducerRegistrationRequirements registrationRequirements) throws Exception
- {
- RegistrationPolicy policy = registrationRequirements.getPolicy();
- String policyClassName = policy.getClass().getName();
- this.policy.setValue(policyClassName);
-
- // if policy is the default one, display information about the validator
- if (ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
- {
- DefaultRegistrationPolicy defaultPolicy = (DefaultRegistrationPolicy)policy;
- validator.setValue(defaultPolicy.getValidator().getClass().getName());
- validator.setRendered(true);
- }
- else
- {
- validator.setRendered(false);
- }
-
- // registration properties
- Map<QName, RegistrationPropertyDescription> regProps = registrationRequirements.getRegistrationProperties();
- registrationProperties.getUIPageIterator().setPageList(createPageList(getPropertyList(regProps)));
- }
-
- ProducerConfigurationService getService()
- {
- return Util.getUIPortalApplication().getApplicationComponent(ProducerConfigurationService.class);
- }
-
- private List<RegistrationPropertyDescription> getPropertyList(Map<QName, RegistrationPropertyDescription> descriptions) throws Exception
- {
- Comparator<RegistrationPropertyDescription> descComparator = new Comparator<RegistrationPropertyDescription>()
- {
- public int compare(RegistrationPropertyDescription o1, RegistrationPropertyDescription o2)
- {
- return o1.getName().toString().compareTo(o2.getName().toString());
- }
- };
-
- List<RegistrationPropertyDescription> result = new ArrayList<RegistrationPropertyDescription>(descriptions.values());
- Collections.sort(result, descComparator);
- return result;
- }
-
- private LazyPageList<RegistrationPropertyDescription> createPageList(final List<RegistrationPropertyDescription> pageList)
- {
- return new LazyPageList<RegistrationPropertyDescription>(new ListAccess<RegistrationPropertyDescription>()
- {
-
- public int getSize() throws Exception
- {
- return pageList.size();
- }
-
- public RegistrationPropertyDescription[] load(int index, int length) throws Exception, IllegalArgumentException
- {
- RegistrationPropertyDescription[] pcs = new RegistrationPropertyDescription[pageList.size()];
-
- if (index < 0)
- {
- throw new IllegalArgumentException("Illegal index: index must be a positive number");
- }
-
- if (length < 0)
- {
- throw new IllegalArgumentException("Illegal length: length must be a positive number");
- }
-
- if (index + length > pageList.size())
- {
- throw new IllegalArgumentException(
- "Illegal index or length: sum of the index and the length cannot be greater than the list size");
- }
-
- for (int i = 0; i < length; i++)
- {
- pcs[i] = pageList.get(i + index);
- }
-
- return pcs;
- }
-
- }, 10);
- }
-
- @Override
- public void processRender(WebuiRequestContext context) throws Exception
- {
- /*if (getComponentConfig() != null)
- {
- super.processRender(context);
- return;
- }*/
-
- Writer w = context.getWriter();
- w.write("<div class=\"UIFormInputSet\">");
-
- ResourceBundle res = context.getApplicationResourceBundle();
- UIForm uiForm = getAncestorOfType(UIForm.class);
- for (UIComponent inputEntry : getChildren())
- {
- if (inputEntry.isRendered())
- {
- w.write("<div class=\"row\">");
-
- String label;
- try
- {
- label = uiForm.getLabel(res, inputEntry.getId());
- }
- catch (MissingResourceException ex)
- {
- label = inputEntry.getName();
- System.err.println("\n " + uiForm.getId() + ".label." + inputEntry.getId() + " not found value");
- }
-
- w.write("<label>" + label + "</label>");
- renderUIComponent(inputEntry);
-
- w.write("</div>");
- }
- }
- w.write("</div>");
- }
-
- public void updateRegistrationDetailsFromForm(ProducerRegistrationRequirements registrationRequirements)
- {
- registrationRequirements.reloadPolicyFrom(policy.getValue(), validator.getValue());
- }
-
- static public class EditPropertyActionListener extends EventListener<UIWsrpRegistrationDetails>
- {
- public void execute(Event<UIWsrpRegistrationDetails> event) throws Exception
- {
- UIWsrpRegistrationDetails source = event.getSource();
- UIPopupWindow popup = source.getChild(UIPopupWindow.class);
- UIWsrpProducerPropertyEditor editor = (UIWsrpProducerPropertyEditor)popup.getUIComponent();
- String id = event.getRequestContext().getRequestParameter(OBJECTID);
- try
- {
- editor.setRegistrationPropertyDescription(source.getService().getConfiguration().getRegistrationRequirements().getRegistrationPropertyWith(id));
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- popup.setUIComponent(editor);
- popup.setRendered(true);
- popup.setShow(true);
-
- }
- }
-
- static public class DeletePropertyActionListener extends EventListener<UIWsrpRegistrationDetails>
- {
- public void execute(Event<UIWsrpRegistrationDetails> event)
- {
- UIWsrpRegistrationDetails source = event.getSource();
- String id = event.getRequestContext().getRequestParameter(OBJECTID);
- try
- {
- ProducerConfigurationService service = source.getService();
- service.getConfiguration().getRegistrationRequirements().removeRegistrationProperty(id);
- service.saveConfiguration();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- UIApplication uiApp = event.getRequestContext().getUIApplication();
- uiApp.addMessage(new ApplicationMessage("Failed to delete Producer Property. Cause: " + e.getCause(), null, ApplicationMessage.ERROR));
- }
-
- }
- }
-
- static public class AddPropertyActionListener extends EventListener<UIWsrpRegistrationDetails>
- {
- public void execute(Event<UIWsrpRegistrationDetails> event) throws Exception
- {
- UIWsrpRegistrationDetails source = event.getSource();
- UIPopupWindow popup = source.getChild(UIPopupWindow.class);
- UIWsrpProducerPropertyEditor editor = (UIWsrpProducerPropertyEditor)popup.getUIComponent();
-
- //reset the form
- editor.setRegistrationPropertyDescription(null);
- popup.setRendered(true);
- popup.setShow(true);
- popup.setShowCloseButton(true);
- //popup.setShowMask(true);
-
- }
- }
-}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/ConsumerController.java (from rev 1378, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/ConsumerController.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/ConsumerController.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/ConsumerController.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,85 @@
+/*
+ * 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.exoplatform.wsrp.webui.component.consumer;
+
+import org.gatein.pc.api.PortletInvokerException;
+import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.RefreshResult;
+import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class ConsumerController
+{
+ private ConsumerRegistry registry;
+
+ public ConsumerController(ConsumerRegistry registry)
+ {
+ this.registry = registry;
+ }
+
+ public ConsumerRegistry getRegistry()
+ {
+ return registry;
+ }
+
+ public WSRPConsumer getConsumer(String id)
+ {
+ return registry.getConsumer(id);
+ }
+
+ public List<WSRPConsumer> getConfiguredConsumers()
+ {
+ return registry.getConfiguredConsumers();
+ }
+
+ public RefreshResult refreshConsumer(WSRPConsumer consumer) throws PortletInvokerException
+ {
+ RefreshResult result = consumer.refresh(true);
+
+ if (result.hasIssues())
+ {
+ // refresh had issues, we should deactivate this consumer
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ }
+ else
+ {
+ // activate the consumer if it's supposed to be active
+ if (consumer.isActive())
+ {
+ registry.activateConsumerWith(consumer.getProducerId());
+ }
+ else
+ {
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ }
+ }
+
+ return result;
+ }
+}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerEditor.java (from rev 1378, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerEditor.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerEditor.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerEditor.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,222 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2009, 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.exoplatform.wsrp.webui.component.consumer;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIGrid;
+import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormInputBase;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.gatein.common.util.ParameterValidation;
+import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.ConsumerException;
+import org.gatein.wsrp.consumer.ProducerInfo;
+import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+import org.gatein.wsrp.services.ManageableServiceFactory;
+
+/** @author Wesley Hales */
+@ComponentConfig(template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerEditor.gtmpl", lifecycle = UIFormLifecycle.class, events = {
+ @EventConfig(listeners = UIWsrpConsumerEditor.SaveActionListener.class)})
+public class UIWsrpConsumerEditor extends UIForm
+{
+ protected static final String CONSUMER_NAME = "Consumer name: ";
+ protected static final String CACHE_EXPIRATION = "Seconds before cache expiration: ";
+ protected static final String TIMEOUT = "Milliseconds before timeout: ";
+ protected static final String WSDL_URL = "WSDL URL: ";
+ private UIFormInputBase<String> consumerName;
+ private UIFormStringInput cache;
+ private UIFormStringInput timeoutWS;
+ private UIFormStringInput wsdl;
+
+ public UIWsrpConsumerEditor() throws Exception
+ {
+
+ consumerName = new UIFormStringInput(CONSUMER_NAME, CONSUMER_NAME, null).addValidator(MandatoryValidator.class);
+ addUIFormInput(consumerName);
+ cache = new UIFormStringInput(CACHE_EXPIRATION, CACHE_EXPIRATION, null);
+ addUIFormInput(cache);
+ timeoutWS = new UIFormStringInput(TIMEOUT, TIMEOUT, null);
+ addUIFormInput(timeoutWS);
+ wsdl = new UIFormStringInput(WSDL_URL, WSDL_URL, null);
+ addUIFormInput(wsdl);
+ }
+
+ private String getConsumerName()
+ {
+ return consumerName.getValue();
+ }
+
+ private Integer getCacheExpiration()
+ {
+ Integer cacheExp = 0;
+ String cacheExpString = cache.getValue();
+ if (cacheExpString != null)
+ {
+ cacheExp = Integer.parseInt(cacheExpString);
+ }
+ return cacheExp;
+ }
+
+ private Integer getTimeout()
+ {
+ int timeout = ManageableServiceFactory.DEFAULT_TIMEOUT_MS;
+ String timeoutString = timeoutWS.getValue();
+ if (!ParameterValidation.isNullOrEmpty(timeoutString))
+ {
+ timeout = Integer.parseInt(timeoutString);
+ }
+
+ return timeout;
+ }
+
+ private String getWSDLURL()
+ {
+ return wsdl.getValue();
+ }
+
+ private Boolean newConsumer;
+
+ public Boolean isNewConsumer()
+ {
+ return newConsumer;
+ }
+
+ public void setNewConsumer(Boolean newConsumer)
+ {
+ this.newConsumer = newConsumer;
+ }
+
+ public void setConsumer(WSRPConsumer consumer)
+ {
+ if (consumer == null)
+ {
+ consumerName.setEditable(UIFormStringInput.ENABLE);
+ setNewConsumer(true);
+ return;
+ }
+ consumerName.setEditable(UIFormStringInput.ENABLE);
+
+ consumerName.setValue(consumer.getProducerId());
+ ProducerInfo producerInfo = consumer.getProducerInfo();
+ cache.setValue(producerInfo.getExpirationCacheSeconds().toString());
+ timeoutWS.setValue("" + producerInfo.getEndpointConfigurationInfo().getWSOperationTimeOut());
+ wsdl.setValue(producerInfo.getEndpointConfigurationInfo().getWsdlDefinitionURL());
+ setNewConsumer(false);
+ }
+
+ static public class SaveActionListener extends EventListener<UIWsrpConsumerEditor>
+ {
+ public void execute(Event<UIWsrpConsumerEditor> event) throws Exception
+ {
+ UIWsrpConsumerEditor consumerEditor = event.getSource();
+
+ UIWsrpConsumerOverview consumerOverview = consumerEditor.getAncestorOfType(UIWsrpConsumerOverview.class);
+
+ WebuiRequestContext ctx = event.getRequestContext();
+ if (consumerEditor.isNewConsumer())
+ {
+ consumerEditor.save(ctx);
+ }
+ else
+ {
+ consumerEditor.edit(ctx);
+ }
+
+ consumerEditor.reset();
+
+ UIPopupWindow popup = consumerEditor.getParent();
+ popup.setRendered(false);
+ popup.setShow(false);
+
+ //temp way to refresh list, should call broadcast event (below)
+ LazyPageList pageList = consumerOverview.createPageList(consumerOverview.getConfiguredConsumers());
+ UIGrid uiGrid = consumerOverview.getChild(UIGrid.class);
+ uiGrid.getUIPageIterator().setPageList(pageList);
+ //uiGrid.configure()
+ //try to broadcast an event back to consumerOverview to refresh grid... works but shows error
+ //PortalRequestContext portalContext = org.exoplatform.portal.webui.util.Util.getPortalRequestContext();
+ //Event<UIWsrpConsumerOverview> pnevent = new Event<UIWsrpConsumerOverview>(consumerOverview, "RefreshGrid", portalContext);
+ //consumerOverview.broadcast(pnevent, Event.Phase.PROCESS);
+
+ ctx.addUIComponentToUpdateByAjax(consumerOverview);
+ }
+ }
+
+ public boolean save(WebuiRequestContext context) throws Exception
+ {
+ ExoContainer manager = ExoContainerContext.getCurrentContainer();
+ ConsumerRegistry consumerRegistry = (ConsumerRegistry)manager.getComponentInstanceOfType(ConsumerRegistry.class);
+
+ UIApplication uiApp = context.getUIApplication();
+
+ try
+ {
+ consumerRegistry.createConsumer(getConsumerName(), getCacheExpiration(), getWSDLURL());
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.add.success", null));
+ }
+ catch (ConsumerException ce)
+ {
+ //todo - add to resource bundle
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.add.exists", null, ApplicationMessage.ERROR));
+ }
+ return true;
+ }
+
+ public boolean edit(WebuiRequestContext context) throws Exception
+ {
+ ExoContainer manager = ExoContainerContext.getCurrentContainer();
+ ConsumerRegistry consumerRegistry = (ConsumerRegistry)manager.getComponentInstanceOfType(ConsumerRegistry.class);
+ ProducerInfo producerInfo = consumerRegistry.getConsumer(getConsumerName()).getProducerInfo();
+
+ producerInfo.setId(getConsumerName());
+ producerInfo.setExpirationCacheSeconds(getCacheExpiration());
+ producerInfo.getEndpointConfigurationInfo().setWsdlDefinitionURL(getWSDLURL());
+ producerInfo.getEndpointConfigurationInfo().setWSOperationTimeOut(getTimeout());
+
+ UIApplication uiApp = context.getUIApplication();
+
+ try
+ {
+ consumerRegistry.updateProducerInfo(producerInfo);
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.edit.success", null));
+ }
+ catch (ConsumerException ce)
+ {
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.action.edit.fail", null, ApplicationMessage.ERROR));
+ }
+ return true;
+ }
+
+}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerOverview.java (from rev 1379, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerOverview.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UIWsrpConsumerOverview.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,323 @@
+/*
+ * 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.exoplatform.wsrp.webui.component.consumer;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.commons.utils.ListAccess;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.UIGrid;
+import org.exoplatform.webui.core.UIPageIterator;
+import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.gatein.wsrp.WSRPConsumer;
+import org.gatein.wsrp.consumer.RefreshResult;
+import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+
+import java.util.List;
+
+/** @author Wesley Hales */
+
+@ComponentConfig(
+ lifecycle = UIApplicationLifecycle.class,
+ template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl",
+ events = {
+ @EventConfig(listeners = UIWsrpConsumerOverview.CreateConsumerActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.EditActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.DeleteActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.RefreshActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.DeactivateActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.ActivateActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.RefreshGridActionListener.class)
+ })
+public class UIWsrpConsumerOverview extends UIContainer
+{
+ public static String[] FIELDS = {"producerId", "active", "refreshNeeded"};
+
+ //The action names are also your class names on the ui buttons. You should stick with common names like:
+ //edit
+ //delete
+ //
+ public static String[] SELECT_ACTIONS = {"Edit", "Delete", "Refresh", "Activate", "Deactivate"};
+
+ private ConsumerController controller;
+ private UIPopupWindow consumerEditorPopup;
+ private UIPageIterator consumersIterator;
+
+ public List getConfiguredConsumers() throws Exception
+ {
+ return controller.getConfiguredConsumers();
+ }
+
+ public LazyPageList createPageList(final List pageList)
+ {
+ return new LazyPageList<WSRPConsumer>(new ListAccess<WSRPConsumer>()
+ {
+
+ public int getSize() throws Exception
+ {
+ return pageList.size();
+ }
+
+ public WSRPConsumer[] load(int index, int length) throws Exception
+ {
+ WSRPConsumer[] pcs = new WSRPConsumer[pageList.size()];
+
+ if (index < 0)
+ {
+ throw new IllegalArgumentException("Illegal index: index must be a positive number");
+ }
+
+ if (length < 0)
+ {
+ throw new IllegalArgumentException("Illegal length: length must be a positive number");
+ }
+
+ if (index + length > pageList.size())
+ {
+ throw new IllegalArgumentException(
+ "Illegal index or length: sum of the index and the length cannot be greater than the list size");
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ pcs[i] = (WSRPConsumer)pageList.get(i + index);
+ }
+
+ return pcs;
+ }
+
+ }, 10);
+ }
+
+ public UIWsrpConsumerOverview() throws Exception
+ {
+ // controller
+ ConsumerRegistry registry = (ConsumerRegistry)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ConsumerRegistry.class);
+ controller = new ConsumerController(registry);
+
+ //setSelectedTab(1);
+ consumerEditorPopup = addChild(UIPopupWindow.class, null, null);
+ consumerEditorPopup.setWindowSize(450, 0);
+ UIWsrpConsumerEditor consumerForm = createUIComponent(UIWsrpConsumerEditor.class, null, "Consumer Editor");
+ consumerEditorPopup.setUIComponent(consumerForm);
+ consumerEditorPopup.setRendered(false);
+
+ UIGrid consumers = addChild(UIGrid.class, null, null);
+ //configure the edit and delete buttons based on an id from the data list - this will also be passed as param to listener
+ consumers.configure("producerId", FIELDS, SELECT_ACTIONS);
+
+ consumersIterator = consumers.getUIPageIterator();
+ consumersIterator.setId("ChangeConsumerPageIterator");
+ consumersIterator.setRendered(false);
+
+ refreshConsumersList();
+ }
+
+ static public class RefreshGridActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ consumerOverview.refreshGrid(event);
+ }
+ }
+
+ public void refreshGrid(Event<UIWsrpConsumerOverview> event) throws Exception
+ {
+ //refresh the list
+ refreshConsumersList();
+
+ event.getRequestContext().addUIComponentToUpdateByAjax(this);
+ }
+
+ private void refreshConsumersList() throws Exception
+ {
+ LazyPageList pageList = createPageList(getConfiguredConsumers());
+ consumersIterator.setPageList(pageList);
+ }
+
+ static public class CreateConsumerActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ consumerOverview.displayConsumerEditor(null);
+ }
+ }
+
+ private void displayConsumerEditor(WSRPConsumer consumer) throws Exception
+ {
+ UIWsrpConsumerEditor editor = (UIWsrpConsumerEditor)consumerEditorPopup.getUIComponent();
+
+ //reset the form
+ editor.reset();
+ editor.setConsumer(consumer);
+ consumerEditorPopup.setRendered(true);
+ consumerEditorPopup.setShow(true);
+ consumerEditorPopup.setShowCloseButton(true);
+ }
+
+ static public class EditActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
+
+ if (consumer != null)
+ {
+ consumerOverview.displayConsumerEditor(consumer);
+ }
+ }
+ }
+
+ static public class DeleteActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event)
+ {
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+ try
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
+ ConsumerRegistry consumerRegistry = consumerOverview.getConsumerRegistry();
+ String id = event.getRequestContext().getRequestParameter(OBJECTID);
+ if (consumer != null)
+ {
+ consumerRegistry.destroyConsumer(id);
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.delete.success", null, ApplicationMessage.INFO));
+ consumerOverview.refreshGrid(event);
+ }
+ }
+ catch (Exception e)
+ {
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.delete.fail", new String[]{e.getCause().toString()}, ApplicationMessage.ERROR));
+ }
+
+ }
+ }
+
+ static public class DeactivateActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+
+ if (consumer != null)
+ {
+ if (consumer.isActive())
+ {
+ ConsumerRegistry registry = consumerOverview.getConsumerRegistry();
+ registry.deactivateConsumerWith(consumer.getProducerId());
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.deactivate.success", null));
+ consumerOverview.refreshGrid(event);
+ }
+ else
+ {
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.deactivate.fail", null));
+ }
+ }
+ }
+ }
+
+ static public class ActivateActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+
+ if (consumer != null && !consumer.isActive())
+ {
+ try
+ {
+ ConsumerRegistry registry = consumerOverview.getConsumerRegistry();
+ registry.activateConsumerWith(consumer.getProducerId());
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.activate.success", null));
+ consumerOverview.refreshGrid(event);
+ }
+ catch (Exception e)
+ {
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.activate.fail", new String[]{e.getCause().toString()}, ApplicationMessage.ERROR));
+ e.printStackTrace();
+ }
+ }
+ }
+ }
+
+ static public class RefreshActionListener extends EventListener<UIWsrpConsumerOverview>
+ {
+ public void execute(Event<UIWsrpConsumerOverview> event)
+ {
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+ try
+ {
+ UIWsrpConsumerOverview consumerOverview = event.getSource();
+ WSRPConsumer consumer = consumerOverview.getConsumerFromEvent(event);
+
+ if (consumer != null)
+ {
+ RefreshResult result = consumerOverview.controller.refreshConsumer(consumer);
+
+ if (result.hasIssues())
+ {
+ consumerOverview.displayConsumerEditor(consumer);
+ }
+ else
+ {
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.refresh.success", null, ApplicationMessage.INFO));
+ }
+
+ // refresh consumers
+ consumerOverview.refreshGrid(event);
+ }
+ }
+ catch (Exception e)
+ {
+ uiApp.addMessage(new ApplicationMessage("UIWsrp.consumer.grid.action.refresh.fail", new String[]{e.getCause().toString()}, ApplicationMessage.ERROR));
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public WSRPConsumer getConsumerFromEvent(Event<?> event) throws Exception
+ {
+ String id = event.getRequestContext().getRequestParameter(OBJECTID);
+ return controller.getConsumer(id);
+ }
+
+ public ConsumerRegistry getConsumerRegistry() throws Exception
+ {
+ return controller.getRegistry();
+ }
+}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerEditor.java (from rev 1378, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerEditor.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerEditor.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerEditor.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,177 @@
+/*
+ * 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.exoplatform.wsrp.webui.component.producer;
+
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormCheckBoxInput;
+import org.gatein.wsrp.producer.config.ProducerConfiguration;
+import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
+
+/**
+ * @author Wesley Hales
+ * @author Chris Laprun
+ */
+@ComponentConfig(
+ lifecycle = UIFormLifecycle.class,
+ template = "app:/groovy/wsrp/webui/component/UIWsrpProducerEditor.gtmpl",
+ events = {
+ @EventConfig(listeners = UIWsrpProducerEditor.SaveActionListener.class),
+ @EventConfig(listeners = UIWsrpProducerEditor.RegistrationOnChangeActionListener.class)
+ }
+)
+public class UIWsrpProducerEditor extends UIForm
+{
+ private static final String REG_REQUIRED_FOR_DESCRIPTION = "registrationrequiredforfulldescription";
+ private static final String STRICT_MODE = "strictmode";
+ private static final String REQUIRES_REGISTRATION = "requiresregistration";
+ private static final String REGISTRATION_DETAILS = "registrationdetails";
+
+ private ProducerConfigurationService configService;
+ private UIWsrpRegistrationDetails registrationDetails;
+ private UIFormCheckBoxInput regReqForDesc;
+ private UIFormCheckBoxInput strictMode;
+ private UIFormCheckBoxInput<Boolean> regRequired;
+
+ public UIWsrpProducerEditor() throws Exception
+ {
+ configService = Util.getUIPortalApplication().getApplicationComponent(ProducerConfigurationService.class);
+
+ regReqForDesc = new UIFormCheckBoxInput(REG_REQUIRED_FOR_DESCRIPTION, REG_REQUIRED_FOR_DESCRIPTION, null);
+ addUIFormInput(regReqForDesc);
+ strictMode = new UIFormCheckBoxInput(STRICT_MODE, STRICT_MODE, null);
+ addUIFormInput(strictMode);
+
+ // registration required check box with onChange event
+ regRequired = new UIFormCheckBoxInput<Boolean>(REQUIRES_REGISTRATION, REQUIRES_REGISTRATION, null);
+ regRequired.setOnChange("RegistrationOnChange");
+ addUIFormInput(regRequired);
+ // because when we use setOnChange method, new eventListener will add to this form, we must re-set the actions of this form.
+ // thif form has no action, so i'll put empty string array
+ setActions(new String[]{});
+
+ // registration details
+ // form set to gather registration information
+ registrationDetails = addChild(UIWsrpRegistrationDetails.class, null, REGISTRATION_DETAILS);
+
+ init(false);
+ }
+
+ ProducerConfigurationService getService()
+ {
+ return configService;
+ }
+
+ private void init(boolean getRegistrationRequiredFromCheckBox) throws Exception
+ {
+ ProducerConfiguration configuration = configService.getConfiguration();
+
+ ProducerRegistrationRequirements registrationRequirements = configuration.getRegistrationRequirements();
+ regReqForDesc.setValue(registrationRequirements.isRegistrationRequiredForFullDescription());
+ strictMode.setValue(configuration.isUsingStrictMode());
+
+ boolean registrationRequired = getRegistrationRequiredFromCheckBox ?
+ regRequired.getValue() :
+ registrationRequirements.isRegistrationRequired();
+ regRequired.setValue(registrationRequired);
+
+ // if registration is required then we display more information
+ if (registrationRequired)
+ {
+ registrationDetails.init(registrationRequirements);
+ registrationDetails.setRendered(true);
+ }
+ else
+ {
+ registrationDetails.setRendered(false);
+ }
+ }
+
+
+ static public class SaveActionListener extends EventListener<UIWsrpProducerEditor>
+ {
+ public void execute(Event<UIWsrpProducerEditor> event) throws Exception
+ {
+ UIWsrpProducerEditor source = event.getSource();
+ ProducerConfigurationService service = source.getService();
+ ProducerConfiguration producerConfiguration = service.getConfiguration();
+ ProducerRegistrationRequirements registrationRequirements = producerConfiguration.getRegistrationRequirements();
+ registrationRequirements.setRegistrationRequiredForFullDescription(Boolean.parseBoolean(source.regReqForDesc.getValue().toString()));
+ producerConfiguration.setUsingStrictMode(Boolean.parseBoolean(source.strictMode.getValue().toString()));
+
+ boolean requiresReg = Boolean.parseBoolean(source.regRequired.getValue().toString());
+ registrationRequirements.setRegistrationRequired(requiresReg);
+ if (requiresReg)
+ {
+ source.registrationDetails.updateRegistrationDetailsFromForm(registrationRequirements);
+ }
+
+ try
+ {
+ service.saveConfiguration();
+ }
+ catch (Exception e)
+ {
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("Producer Modification Error", null, ApplicationMessage.ERROR));
+ e.printStackTrace();
+ }
+
+ source.init(false);
+ }
+ }
+
+ /*public static class RegistrationOnChangeActionListener extends EventListener<UIFormCheckBoxInput>
+ {
+ public void execute(Event<UIFormCheckBoxInput> event) throws Exception
+ {
+ UIFormCheckBoxInput source = event.getSource();
+ UIWsrpProducerEditor parent = source.getAncestorOfType(UIWsrpProducerEditor.class);
+ parent.init();
+
+ //update only the parent, avoid updating the full portlet
+ event.getRequestContext().addUIComponentToUpdateByAjax(parent);
+ }
+ }*/
+
+ public static class RegistrationOnChangeActionListener extends EventListener<UIWsrpProducerEditor>
+ {
+ public void execute(Event<UIWsrpProducerEditor> event) throws Exception
+ {
+ UIWsrpProducerEditor source = event.getSource();
+ source.init(true);
+
+ //update only the parent, avoid updating the full portlet
+ event.getRequestContext().addUIComponentToUpdateByAjax(source);
+ }
+ }
+
+}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerOverview.java (from rev 1378, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerOverview.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerOverview.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerOverview.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,46 @@
+/*
+ * 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.exoplatform.wsrp.webui.component.producer;
+
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.core.UIContainer;
+import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
+
+/**
+ * @author Wesley Hales
+ * @author Chris Laprun
+ */
+@ComponentConfig(
+ lifecycle = UIApplicationLifecycle.class,
+ template = "app:/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl"
+)
+public class UIWsrpProducerOverview extends UIContainer
+{
+ private UIWsrpProducerEditor producerForm;
+
+ public UIWsrpProducerOverview() throws Exception
+ {
+ producerForm = createUIComponent(UIWsrpProducerEditor.class, null, "Producer Editor");
+ addChild(producerForm);
+ }
+}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerPropertyEditor.java (from rev 1378, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpProducerPropertyEditor.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerPropertyEditor.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpProducerPropertyEditor.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.exoplatform.wsrp.webui.component.producer;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.gatein.wsrp.producer.config.ProducerConfiguration;
+import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.registration.LocalizedString;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+
+
+/** @author Wesley Hales */
+@ComponentConfig(template = "app:/groovy/wsrp/webui/component/UIWsrpProducerPropertyEditor.gtmpl", lifecycle = UIFormLifecycle.class,
+ events = {
+ @EventConfig(listeners = UIWsrpProducerPropertyEditor.SaveActionListener.class)})
+public class UIWsrpProducerPropertyEditor extends UIForm
+{
+ protected static final String DESCRIPTION = "description";
+ protected static final String LABEL = "label";
+ protected static final String HINT = "hint";
+ private RegistrationPropertyDescription registrationPropertyDescription_;
+
+ public UIWsrpProducerPropertyEditor() throws Exception
+ {
+ addUIFormInput(new UIFormStringInput(DESCRIPTION, DESCRIPTION, null).addValidator(MandatoryValidator.class));
+ addUIFormInput(new UIFormStringInput(LABEL, LABEL, null).addValidator(MandatoryValidator.class));
+ addUIFormInput(new UIFormStringInput(HINT, HINT, null).addValidator(MandatoryValidator.class));
+ }
+
+ public void setRegistrationPropertyDescription(RegistrationPropertyDescription registrationPropertyDescription) throws Exception
+ {
+
+ this.registrationPropertyDescription_ = registrationPropertyDescription;
+
+ if (registrationPropertyDescription_ == null)
+ {
+ getUIStringInput(DESCRIPTION).setEditable(UIFormStringInput.ENABLE);
+ reset();
+ return;
+ }
+ getUIStringInput(DESCRIPTION).setEditable(UIFormStringInput.ENABLE);
+
+ invokeGetBindingBean(registrationPropertyDescription_);
+
+ }
+
+ public RegistrationPropertyDescription getRegistrationPropertyDescription()
+ {
+ return registrationPropertyDescription_;
+ }
+
+ static public class SaveActionListener extends EventListener<UIWsrpProducerPropertyEditor>
+ {
+ public void execute(Event<UIWsrpProducerPropertyEditor> event) throws Exception
+ {
+ UIWsrpProducerPropertyEditor source = event.getSource();
+ source.save(event.getRequestContext());
+ UIPopupWindow popup = source.getParent();
+ popup.setRendered(false);
+ popup.setShow(false);
+ }
+ }
+
+ public boolean save(WebuiRequestContext context) throws Exception
+ {
+
+ ProducerConfigurationService pconfService = getProducerConfigurationService();
+ ProducerConfiguration producerConfiguration = pconfService.getConfiguration();
+
+
+ RegistrationPropertyDescription regPropDesc = getRegistrationPropertyDescription();
+ if (regPropDesc != null)
+ {
+ System.out.println("---------old1: " + regPropDesc.getDescription());
+ RegistrationPropertyDescription oldRegPropDesc = producerConfiguration.getRegistrationRequirements().getRegistrationProperties().get(regPropDesc);
+ invokeSetBindingBean(oldRegPropDesc);
+ System.out.println("---------new1: " + oldRegPropDesc.getNameAsString());
+ //return;
+ }
+ else
+ {
+
+ RegistrationPropertyDescription newRegProcDesc = new RegistrationPropertyDescription();
+ newRegProcDesc.setDescription(new LocalizedString(getUIStringInput(DESCRIPTION).getValue()));
+ newRegProcDesc.setDescription(new LocalizedString(getUIStringInput(LABEL).getValue()));
+ newRegProcDesc.setDescription(new LocalizedString(getUIStringInput(HINT).getValue()));
+ System.out.println("---------new2: " + newRegProcDesc);
+ producerConfiguration.getRegistrationRequirements().addRegistrationProperty(newRegProcDesc);
+ }
+
+ UIApplication uiApp = context.getUIApplication();
+
+ try
+ {
+ pconfService.saveConfiguration();
+ uiApp.addMessage(new ApplicationMessage("Producer Successfully Changed", null));
+ }
+ catch (Exception e)
+ {
+ uiApp.addMessage(new ApplicationMessage("Producer Modification Error", null));
+
+ }
+
+ return true;
+ }
+
+ public ProducerConfigurationService getProducerConfigurationService() throws Exception
+ {
+ ExoContainer manager = ExoContainerContext.getCurrentContainer();
+ return (ProducerConfigurationService)manager.getComponentInstanceOfType(ProducerConfigurationService.class);
+ }
+}
Copied: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpRegistrationDetails.java (from rev 1378, portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpRegistrationDetails.java)
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpRegistrationDetails.java (rev 0)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/producer/UIWsrpRegistrationDetails.java 2010-01-19 16:58:27 UTC (rev 1383)
@@ -0,0 +1,324 @@
+/*
+ * 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.exoplatform.wsrp.webui.component.producer;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.commons.utils.ListAccess;
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.config.annotation.ComponentConfig;
+import org.exoplatform.webui.config.annotation.ComponentConfigs;
+import org.exoplatform.webui.config.annotation.EventConfig;
+import org.exoplatform.webui.core.UIApplication;
+import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIGrid;
+import org.exoplatform.webui.core.UIPopupWindow;
+import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
+import org.exoplatform.webui.core.renderers.ValueRenderer;
+import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIForm;
+import org.exoplatform.webui.form.UIFormInputBase;
+import org.exoplatform.webui.form.UIFormInputSet;
+import org.exoplatform.webui.form.UIFormStringInput;
+import org.gatein.registration.RegistrationPolicy;
+import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.wsrp.producer.config.ProducerConfigurationService;
+import org.gatein.wsrp.producer.config.ProducerRegistrationRequirements;
+import org.gatein.wsrp.registration.LocalizedString;
+import org.gatein.wsrp.registration.RegistrationPropertyDescription;
+
+import javax.xml.namespace.QName;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+@ComponentConfigs({
+ @ComponentConfig(id = UIWsrpRegistrationDetails.REGISTRATION_PROPERTIES, type = UIGrid.class, template = "system:/groovy/webui/core/UIGrid.gtmpl"),
+ @ComponentConfig(
+ lifecycle = UIContainerLifecycle.class,
+ events = {
+ @EventConfig(listeners = UIWsrpRegistrationDetails.AddPropertyActionListener.class),
+ @EventConfig(listeners = UIWsrpRegistrationDetails.EditPropertyActionListener.class),
+ @EventConfig(listeners = UIWsrpRegistrationDetails.DeletePropertyActionListener.class)
+ })
+})
+public class UIWsrpRegistrationDetails extends UIFormInputSet
+{
+ private UIFormInputBase<String> policy;
+ private UIFormInputBase<String> validator;
+ private UIGrid registrationProperties;
+ private static final String NAME = "name";
+ static String[] FIELDS = {NAME, "description", "label", "hint"};
+// static String[] PROPERTIES_ACTIONS = {"EditProperty", "DeleteProperty"};
+ static String[] PROPERTIES_ACTIONS = {};
+ static final String POLICY_CLASS = "policyClassName";
+ static final String VALIDATOR_CLASS = "validatorClassName";
+ static final String REGISTRATION_PROPERTIES = "registrationproperties";
+ static final String REGISTRATION_PROPERTIES_ITERATOR = "registrationpropertiesiterator";
+
+ public UIWsrpRegistrationDetails() throws Exception
+ {
+ //super(name);
+
+ // policy
+ policy = new UIFormStringInput(POLICY_CLASS, POLICY_CLASS, null);
+ addUIFormInput(policy);
+
+ // validator
+ validator = new UIFormStringInput(VALIDATOR_CLASS, VALIDATOR_CLASS, null);
+ addUIFormInput(validator);
+
+ // registration properties
+ registrationProperties = addChild(UIGrid.class, REGISTRATION_PROPERTIES, REGISTRATION_PROPERTIES);
+
+ // add renderer for LocalizedString
+ ValueRenderer<LocalizedString> renderer = new ValueRenderer<LocalizedString>()
+ {
+ @Override
+ public String render(LocalizedString value)
+ {
+ return value.getValue();
+ }
+ };
+ registrationProperties.registerRendererFor(renderer, LocalizedString.class);
+
+ //configure the edit and delete buttons based on an id from the data list - this will also be passed as param to listener
+ registrationProperties.configure(NAME, FIELDS, PROPERTIES_ACTIONS);
+ registrationProperties.getUIPageIterator().setId(REGISTRATION_PROPERTIES_ITERATOR);
+ registrationProperties.getUIPageIterator().setRendered(false);
+ addChild(registrationProperties.getUIPageIterator());
+
+ init(getService().getConfiguration().getRegistrationRequirements());
+
+ //add the popup for property edit and adding new properties
+ UIPopupWindow popup = addChild(UIPopupWindow.class, null, null);
+ popup.setWindowSize(400, 300);
+ UIWsrpProducerPropertyEditor propertyForm = createUIComponent(UIWsrpProducerPropertyEditor.class, null, "Producer Property Editor");
+ popup.setUIComponent(propertyForm);
+ popup.setRendered(false);
+ }
+
+ void init(ProducerRegistrationRequirements registrationRequirements) throws Exception
+ {
+ RegistrationPolicy policy = registrationRequirements.getPolicy();
+ String policyClassName = policy.getClass().getName();
+ this.policy.setValue(policyClassName);
+
+ // if policy is the default one, display information about the validator
+ if (ProducerRegistrationRequirements.DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
+ {
+ DefaultRegistrationPolicy defaultPolicy = (DefaultRegistrationPolicy)policy;
+ validator.setValue(defaultPolicy.getValidator().getClass().getName());
+ validator.setRendered(true);
+ }
+ else
+ {
+ validator.setRendered(false);
+ }
+
+ // registration properties
+ Map<QName, RegistrationPropertyDescription> regProps = registrationRequirements.getRegistrationProperties();
+ registrationProperties.getUIPageIterator().setPageList(createPageList(getPropertyList(regProps)));
+ }
+
+ ProducerConfigurationService getService()
+ {
+ return Util.getUIPortalApplication().getApplicationComponent(ProducerConfigurationService.class);
+ }
+
+ private List<RegistrationPropertyDescription> getPropertyList(Map<QName, RegistrationPropertyDescription> descriptions) throws Exception
+ {
+ Comparator<RegistrationPropertyDescription> descComparator = new Comparator<RegistrationPropertyDescription>()
+ {
+ public int compare(RegistrationPropertyDescription o1, RegistrationPropertyDescription o2)
+ {
+ return o1.getName().toString().compareTo(o2.getName().toString());
+ }
+ };
+
+ List<RegistrationPropertyDescription> result = new ArrayList<RegistrationPropertyDescription>(descriptions.values());
+ Collections.sort(result, descComparator);
+ return result;
+ }
+
+ private LazyPageList<RegistrationPropertyDescription> createPageList(final List<RegistrationPropertyDescription> pageList)
+ {
+ return new LazyPageList<RegistrationPropertyDescription>(new ListAccess<RegistrationPropertyDescription>()
+ {
+
+ public int getSize() throws Exception
+ {
+ return pageList.size();
+ }
+
+ public RegistrationPropertyDescription[] load(int index, int length) throws Exception, IllegalArgumentException
+ {
+ RegistrationPropertyDescription[] pcs = new RegistrationPropertyDescription[pageList.size()];
+
+ if (index < 0)
+ {
+ throw new IllegalArgumentException("Illegal index: index must be a positive number");
+ }
+
+ if (length < 0)
+ {
+ throw new IllegalArgumentException("Illegal length: length must be a positive number");
+ }
+
+ if (index + length > pageList.size())
+ {
+ throw new IllegalArgumentException(
+ "Illegal index or length: sum of the index and the length cannot be greater than the list size");
+ }
+
+ for (int i = 0; i < length; i++)
+ {
+ pcs[i] = pageList.get(i + index);
+ }
+
+ return pcs;
+ }
+
+ }, 10);
+ }
+
+ @Override
+ public void processRender(WebuiRequestContext context) throws Exception
+ {
+ /*if (getComponentConfig() != null)
+ {
+ super.processRender(context);
+ return;
+ }*/
+
+ Writer w = context.getWriter();
+ w.write("<div class=\"UIFormInputSet\">");
+
+ ResourceBundle res = context.getApplicationResourceBundle();
+ UIForm uiForm = getAncestorOfType(UIForm.class);
+ for (UIComponent inputEntry : getChildren())
+ {
+ if (inputEntry.isRendered())
+ {
+ w.write("<div class=\"row\">");
+
+ String label;
+ try
+ {
+ label = uiForm.getLabel(res, inputEntry.getId());
+ }
+ catch (MissingResourceException ex)
+ {
+ label = inputEntry.getName();
+ System.err.println("\n " + uiForm.getId() + ".label." + inputEntry.getId() + " not found value");
+ }
+
+ w.write("<label>" + label + "</label>");
+ renderUIComponent(inputEntry);
+
+ w.write("</div>");
+ }
+ }
+ w.write("</div>");
+ }
+
+ public void updateRegistrationDetailsFromForm(ProducerRegistrationRequirements registrationRequirements)
+ {
+ registrationRequirements.reloadPolicyFrom(policy.getValue(), validator.getValue());
+ }
+
+ static public class EditPropertyActionListener extends EventListener<UIWsrpRegistrationDetails>
+ {
+ public void execute(Event<UIWsrpRegistrationDetails> event) throws Exception
+ {
+ UIWsrpRegistrationDetails source = event.getSource();
+ UIPopupWindow popup = source.getChild(UIPopupWindow.class);
+ UIWsrpProducerPropertyEditor editor = (UIWsrpProducerPropertyEditor)popup.getUIComponent();
+ String id = event.getRequestContext().getRequestParameter(OBJECTID);
+ try
+ {
+ editor.setRegistrationPropertyDescription(source.getService().getConfiguration().getRegistrationRequirements().getRegistrationPropertyWith(id));
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ popup.setUIComponent(editor);
+ popup.setRendered(true);
+ popup.setShow(true);
+
+ }
+ }
+
+ static public class DeletePropertyActionListener extends EventListener<UIWsrpRegistrationDetails>
+ {
+ public void execute(Event<UIWsrpRegistrationDetails> event)
+ {
+ UIWsrpRegistrationDetails source = event.getSource();
+ String id = event.getRequestContext().getRequestParameter(OBJECTID);
+ try
+ {
+ ProducerConfigurationService service = source.getService();
+ service.getConfiguration().getRegistrationRequirements().removeRegistrationProperty(id);
+ service.saveConfiguration();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ UIApplication uiApp = event.getRequestContext().getUIApplication();
+ uiApp.addMessage(new ApplicationMessage("Failed to delete Producer Property. Cause: " + e.getCause(), null, ApplicationMessage.ERROR));
+ }
+
+ }
+ }
+
+ static public class AddPropertyActionListener extends EventListener<UIWsrpRegistrationDetails>
+ {
+ public void execute(Event<UIWsrpRegistrationDetails> event) throws Exception
+ {
+ UIWsrpRegistrationDetails source = event.getSource();
+ UIPopupWindow popup = source.getChild(UIPopupWindow.class);
+ UIWsrpProducerPropertyEditor editor = (UIWsrpProducerPropertyEditor)popup.getUIComponent();
+
+ //reset the form
+ editor.setRegistrationPropertyDescription(null);
+ popup.setRendered(true);
+ popup.setShow(true);
+ popup.setShowCloseButton(true);
+ //popup.setShowMask(true);
+
+ }
+ }
+}
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl 2010-01-19 16:55:52 UTC (rev 1382)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpProducerOverview.gtmpl 2010-01-19 16:58:27 UTC (rev 1383)
@@ -1,6 +1,6 @@
<%
- import org.exoplatform.wsrp.webui.component.UIWsrpProducerEditor;
- import org.exoplatform.wsrp.webui.component.UIWsrpRegistrationDetails;
+ import org.exoplatform.wsrp.webui.component.producer.UIWsrpProducerEditor;
+ import org.exoplatform.wsrp.webui.component.producer.UIWsrpRegistrationDetails;
%>
<div class="<%=uicomponent.getId()%>" id="<%=uicomponent.getId()%>">
14 years, 11 months
gatein SVN: r1382 - portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-19 11:55:52 -0500 (Tue, 19 Jan 2010)
New Revision: 1382
Removed:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerSelector.gtmpl
Modified:
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
Log:
- Copyright update: FAIL!
- Removed unused UIWsrpConsumerSelector.gtmpl
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2010-01-19 16:50:57 UTC (rev 1381)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2010-01-19 16:55:52 UTC (rev 1382)
@@ -1,28 +1,5 @@
-<div class="%{--
- - 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.
- --}%
+<div class="<%=uicomponent.getId()%>" id="<%=uicomponent.getId()%>">
-<%=uicomponent.getId()%>" id="<%=uicomponent.getId()%>">
-
<div class="UIAction">
<table class="ActionContainer">
<tr>
Deleted: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerSelector.gtmpl
===================================================================
14 years, 11 months
gatein SVN: r1381 - in portal/trunk: testsuite and 14 other directories.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-01-19 11:50:57 -0500 (Tue, 19 Jan 2010)
New Revision: 1381
Added:
portal/trunk/testsuite/
portal/trunk/testsuite/ui-tests/
portal/trunk/testsuite/ui-tests/GateIn_v3.0_BasicPortlets_TestDefinition.ods
portal/trunk/testsuite/ui-tests/GateIn_v3.0_MainFucntions_TestDefinition.ods
portal/trunk/testsuite/ui-tests/GateIn_v3.0_SniffTests.ods
portal/trunk/testsuite/ui-tests/sniff-tests/
portal/trunk/testsuite/ui-tests/sniff-tests/Readme.txt
portal/trunk/testsuite/ui-tests/sniff-tests/pom.xml
portal/trunk/testsuite/ui-tests/sniff-tests/src/
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/TestSuite_SNF_PRL.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_02.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_31.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_32.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_34.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/_Test_SNF_PRL_33.html
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_All.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_02.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_03.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_04.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_05.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_06.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_07.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_08.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_09.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_10.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_11.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_13.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_15.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_18.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_19.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_20.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_21.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_22.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_23.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_24.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_25.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_28.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_29.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_30.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_31.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_32.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_34.java
portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_35.java
Log:
GTNPORTAL-509: Selenium Sniff test
* First runnable delivery with Java tests (11 tests performed in Test_All.java)
* Other tests are recorded but need some rework and testing for execution
Added: portal/trunk/testsuite/ui-tests/GateIn_v3.0_BasicPortlets_TestDefinition.ods
===================================================================
(Binary files differ)
Property changes on: portal/trunk/testsuite/ui-tests/GateIn_v3.0_BasicPortlets_TestDefinition.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: portal/trunk/testsuite/ui-tests/GateIn_v3.0_MainFucntions_TestDefinition.ods
===================================================================
(Binary files differ)
Property changes on: portal/trunk/testsuite/ui-tests/GateIn_v3.0_MainFucntions_TestDefinition.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: portal/trunk/testsuite/ui-tests/GateIn_v3.0_SniffTests.ods
===================================================================
(Binary files differ)
Property changes on: portal/trunk/testsuite/ui-tests/GateIn_v3.0_SniffTests.ods
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Property changes on: portal/trunk/testsuite/ui-tests/sniff-tests
___________________________________________________________________
Name: svn:ignore
+ target
Added: portal/trunk/testsuite/ui-tests/sniff-tests/Readme.txt
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/Readme.txt (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/Readme.txt 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,21 @@
+**************
+To run the Selenium tests for GateIn:
+**************
+
+* Fresh install a server (Tomcat or JBoss)
+* Start the server
+* Launch the tests:
+** mvn install -Pselenese to run the html recorded Scripts
+** mvn install -Pjunit to run the Test_ALL suite (which currently represents the whole recorded tests)
+
+
+**************
+Informations:
+**************
+
+* suite/ contains the recorded tests
+** They can be edited using the Selenium IDE
+* src/java/test/ contains generated tests in Java
+** One Test per Selenium test
+** One Test_all.java test which is a all in one (because currently the tests execution order is important) -- should not be the case
+
Added: portal/trunk/testsuite/ui-tests/sniff-tests/pom.xml
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/pom.xml (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/pom.xml 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,137 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>selenium-testcases-gatein</artifactId>
+ <packaging>jar</packaging>
+ <version>3.0.0-CR01-SNAPSHOT</version>
+ <name>Selenium test suite for GateIn 3.0-Beta04</name>
+ <url>http://www.exoplatform.org</url>
+ <description>Selenium test suite for GateIn 3.0-Beta04</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.seleniumhq.selenium.client-drivers</groupId>
+ <artifactId>selenium-java-client-driver</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.seleniumhq.selenium.server</groupId>
+ <artifactId>selenium-server</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>junit</id>
+ <activation><activeByDefault>false</activeByDefault></activation>
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start-server</goal>
+ </goals>
+ <configuration>
+ <background>true</background>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <skip>true</skip>
+ <!-- TODO Use a TestSuite to ensure the Test execution order -->
+ </configuration>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+<!-- <includes><include>**/Test_SNF_PRL_06.java</include></includes>-->
+ <includes><include>**/Test_All.java</include></includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>selenese</id>
+ <activation><activeByDefault>false</activeByDefault></activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>selenium-maven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>selenese</goal>
+ </goals>
+ <configuration>
+ <browser>*firefox</browser>
+ <startURL>http://localhost:8080/</startURL>
+ <suite>src/suite/org/exoplatform/portal/selenium/TestSuite_SNF_PRL.html</suite>
+ <results>target/selenium/TestSuite_SNF_PRL_result.html</results>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/TestSuite_SNF_PRL.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/TestSuite_SNF_PRL.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/TestSuite_SNF_PRL.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,42 @@
+<?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>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
+ <title>Test Suite</title>
+</head>
+<body>
+<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody>
+<tr><td><b>Test Suite</b></td></tr>
+<tr><td><a href="Test_SNF_PRL_02.html">SNF_PRL_02</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_03.html">SNF_PRL_03</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_04.html">SNF_PRL_04</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_05.html">SNF_PRL_05</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_06.html">SNF_PRL_06</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_07.html">SNF_PRL_07</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_08.html">SNF_PRL_08</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_09.html">SNF_PRL_09</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_10.html">SNF_PRL_10</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_11.html">SNF_PRL_11</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_13.html">SNF_PRL_13</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_15.html">SNF_PRL_15</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_18.html">SNF_PRL_18</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_19.html">SNF_PRL_19</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_20.html">SNF_PRL_20</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_21.html">SNF_PRL_21</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_22.html">SNF_PRL_22</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_23.html">SNF_PRL_23</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_24.html">SNF_PRL_24</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_25.html">SNF_PRL_25</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_27_1.html">SNF_PRL_27_1</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_27_2.html">SNF_PRL_27_2</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_28.html">SNF_PRL_28</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_29.html">SNF_PRL_29</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_30.html">SNF_PRL_30</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_31.html">SNF_PRL_31</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_32.html">SNF_PRL_32</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_34.html">SNF_PRL_34</a></td></tr>
+<tr><td><a href="Test_SNF_PRL_35.html">SNF_PRL_35</a></td></tr>
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_02.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_02.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_02.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,72 @@
+<?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="http://localhost:8080/portal/private/classic/" />
+<title>SNF_PRL_02</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_02</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Register</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>User Name:</td>
+ <td>abc123</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>Password:</td>
+ <td>121212</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>Confirm Password:</td>
+ <td>121212</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>First Name:</td>
+ <td>Aha</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>Last Name:</td>
+ <td>Nguyen</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>Email Address:</td>
+ <td>th4nhc0n9z(a)yahoo.com</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Subscribe</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>!!! missing assert to check user exists !!!</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,67 @@
+<?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>ChangeLanguagePublic</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ChangeLanguagePublic</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//a[@class='Language']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Vietnamese</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Vietnamese</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Apply</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>link=Apply</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//a[@class='Language']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UITabContent']//div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UITabContent']//div[2]/a</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Áp dụng</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,62 @@
+<?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="http://localhost:8080" />
+<title>SignInOut</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SignInOut</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>username</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPortalLoginFormAction']//a</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>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,72 @@
+<?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>SNF_PRL_05</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_05</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>rememberme</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a</td>
+ <td>1,1</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>
+<tr>
+ <td>clickAt</td>
+ <td>link=Sign in</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>verifyChecked</td>
+ <td>rememberme</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Discard</td>
+ <td>1,1</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,187 @@
+<?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="http://localhost:8080/portal" />
+<title>SNF_PRL_06</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_06</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>User Name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Last Name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>First Name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Email</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>firstName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>firstName</td>
+ <td>exo2</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>user.name.given</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>user.name.given</td>
+ <td>test</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>user.name.given</td>
+ <td>test05</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>user.name.family</td>
+ <td>test05family</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>user.name.nickName</td>
+ <td>testnick</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>The user profile has been updated.</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>exo2</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>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,199 @@
+<?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>SNF_PRL_07</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_07</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIOrganizationPortlet']//div[@class='ManagementIconContainer']/a[@class='GroupButton']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a</td>
+ <td></td>
+</tr>
+<!--Select "Organization" group from group tree-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIOrganizationPortlet']//div[3]//div[@class='ExpandIcon']/a</td>
+ <td></td>
+</tr>
+<!--Select "Management group" from group tree-->
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIOrganizationPortlet']//div[3]//div[@class='ExpandIcon']/a</td>
+ <td></td>
+</tr>
+<!--Click Add new group icon-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIOrganizationPortlet']//div[@class='TitleBar']/a[@class='TreeActionIcon AddGroupIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>groupName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>groupName</td>
+ <td>testgroup</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>testgroup label</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>testgroup description</td>
+</tr>
+<!--Click "Save" to complete adding new group-->
+<tr>
+ <td>clickAt</td>
+ <td>//form[@id='UIGroupForm']//div[@class='ActionButton LightBlueStyle']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>testgroup label</td>
+ <td></td>
+</tr>
+<!--Click "Select User" icon-->
+<tr>
+ <td>clickAt</td>
+ <td>//form[@id='UIGroupMembershipForm']//div[@class='HorizontalLayout']//table[@class='UIFormGrid']//td[@class='FieldComponent']/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>demo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>john</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>mary</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>root</td>
+ <td></td>
+</tr>
+<!--Click "Add" button-->
+<tr>
+ <td>clickAt</td>
+ <td>//form[@id='UIUserSelector']//div[@class='UIAction']//a[@class='ActionButton LightBlueStyle']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>demo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>john</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>mary</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>root</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>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,123 @@
+<?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>SNF_PRL_08</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_08</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Users and groups management</td>
+ <td></td>
+</tr>
+<!--Choose "Memebership Management" tab-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIOrganizationPortlet']//div[@class='ManagementIconContainer']/a[@class='MembershipButton']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>demomembership</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>demo scripts</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>demomembership</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//table[@class='UIGrid']//tbody/tr[3]/td[5]//img</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>demo scripts add more text</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>demo scripts add more text</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=classic</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>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,82 @@
+<?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>SNF_PRL_09</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_09</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Application Registry</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Import Applications</td>
+ <td></td>
+</tr>
+<tr>
+ <td>chooseOkOnNextConfirmation</td>
+ <td></td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']//div[@class='IconControl ImportIcon']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>storeConfirmation</td>
+ <td>autoimport</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>!! missing assert !!</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>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -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>SNF_PRL_10</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_10</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Application Registry</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']/div[1]</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>category_test</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>displayName</td>
+ <td>Category test name</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>category test description</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@class='WorkingArea']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=manager</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=manager</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIApplicationOrganizer']//a[@class='ControlIcon EditIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIApplicationOrganizer']//a[@class='ControlIcon EditIcon']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>displayName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>displayName</td>
+ <td>category test edit</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>category test edit</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>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,112 @@
+<?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>SNF_PRL_11</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_11</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Application Registry</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='ListContent']//div[@class='SelectedTab']//a[@class='ControlIcon CreateNewIcon']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//input[@name='application' and @value='9']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>displayName</td>
+ <td>test10</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>css=form#UIAddApplicationForm div.UIAction div.ActionButton</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=category test edit</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=category test edit</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Permission</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='ListPermissionSelector']//a[@title='Organization']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=manager</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>test10</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>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,67 @@
+<?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>AddGadget</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AddGadget</td></tr>
+</thead><tbody>
+<tr>
+ <td>clickAt</td>
+ <td>link=Gadget</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='UIControlbar']/div[1]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='UIControlbar']/div[1]</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>url</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>url</td>
+ <td>http://www.google.com/ig/modules/colorjunction.xml</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Gadget Details</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIGadgetInfo']//div[@class='UIBreadcumb']/div[@class='DownLoadIcon ControlIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>echo</td>
+ <td>https://jira.jboss.org/jira/browse/GTNPORTAL-439</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Gadget Details</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,96 @@
+<?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>SiteMapAndLinkToPage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SiteMapAndLinkToPage</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/private/classic/sitemap</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>link=Sign in</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/sitemap</td>
+ <td></td>
+</tr>
+<!--Expand All-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UISiteMap']//div[@class='ClearFix']/div[2]</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Blog</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>New Staff</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Application Registry</td>
+ <td></td>
+</tr>
+<!--Collapse All-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UISiteMap']//div[@class='ClearFix']/div[1]</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>Blog</td>
+ <td></td>
+</tr>
+<!--Expand the first submenu-->
+<tr>
+ <td>clickAt</td>
+ <td>css=div#UISiteMap div.ExpandIcon</td>
+ <td>1,1</td>
+</tr>
+<!--Select the first link of the first submenu-->
+<tr>
+ <td>clickAt</td>
+ <td>css=div#UISiteMap div.ChildrenContainer a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementNotPresent</td>
+ <td>css=div#UISiteMap div.ChildrenContainer a</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,125 @@
+<?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>CreateNewPortal</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">CreateNewPortal</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/private/classic/portalnavigation</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>link=Sign in</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/portalnavigation</td>
+ <td></td>
+</tr>
+<!--Click "Add new Portal" button-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']</td>
+ <td></td>
+</tr>
+<!--Select "Portal Settings" tab-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>New_portal</td>
+</tr>
+<!--Select "Permission Setting" tab-->
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='PermissionSelector']//a[@title='Administrators']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='PermissionSelector']//a[@title='Administrators']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='PermissionSelector']//a[@title='manager']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForTextNotPresent</td>
+ <td>Permission Selector</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//form[@id='UIPortalForm']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']//div[@class='ButtonMiddle']/a</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>New_portal</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,244 @@
+<?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>EditPortalNavigation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">EditPortalNavigation</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<!--Edit Portal layout, currently do not change anything-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>css=div#Administration/ApplicationRegistryPortlet</td>
+ <td></td>
+</tr>
+<tr>
+ <td>dragAndDropToObject</td>
+ <td>css=div#Administration/ApplicationRegistryPortlet</td>
+ <td>css=div#UIPortal div.UIRowContainer</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>classic</td>
+ <td></td>
+</tr>
+<!--Edit nav: add node, actions ...-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Node</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>Node_test</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>New node</td>
+</tr>
+<!--Select Page-->
+<tr>
+ <td>clickAt</td>
+ <td>css=div#UISiteManagement > div.UIPopupWindow div.TabsContainer div.NormalTab div.MiddleTab</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Search and Select Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Search and Select Page</td>
+ <td></td>
+</tr>
+<!--Select the first page-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIRepeater']//table//tbody/tr/td[5]/div[@class='ActionContainer']/img</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIRepeater']//table//tbody/tr/td[5]/div[@class='ActionContainer']/img</td>
+ <td></td>
+</tr>
+<!--Save-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<!--Edit Portal Properties-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Portal's Properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Administrators</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Administrators</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Administrators</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='PermissionSelector']//div[2]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//form[@id='UIPortalForm']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<!--Select new added node to view page-->
+<tr>
+ <td>clickAt</td>
+ <td>link=New node</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>//a[@onclick='eXo.portal.logout();']</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,117 @@
+<?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>DeletePortal</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">DeletePortal</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add New Portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PortalSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PortalSetting')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>Haha</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PermissionSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PermissionSetting')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@class='CollapseIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=exact:*</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextNotPresent</td>
+ <td>Haha</td>
+ <td>1,1</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_21.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,42 @@
+<?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>ChangePortal</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ChangePortal</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=New_portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/portalnavigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=New_portal</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=New_portal</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_22.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,127 @@
+<?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="http://localhost:8080/portal" />
+<title>EditPortalLayOut</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">EditPortalLayOut</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Site</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Layout</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Portal Properties</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Portal Properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>locale</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>locale</td>
+ <td>label=French (France)</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Users</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Users</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=exact:*</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=classic</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=classic</td>
+ <td>1,1</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_23.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,145 @@
+<?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>AddNavigation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AddNavigation</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/public/NewPortal/</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>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Navigation</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Navigation</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>grp_node</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>new_grp_node</td>
+</tr>
+<!--Choose "Page Selector" tab-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<!--Show form to select existing page-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Search and Select Page</td>
+ <td>1,1</td>
+</tr>
+<!--Select the first page from pages list-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIRepeater']//img[@class='SelectPageIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>link=Cancel</td>
+ <td></td>
+</tr>
+<tr>
+ <td>checkAndWait</td>
+ <td>//a[@onclick='eXo.portal.logout();']</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=new_grp_node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=new_grp_node</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_24.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,47 @@
+<?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>Edit_DeleteNavigation</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">Edit_DeleteNavigation</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Group</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//a[@class='EditProIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>description</td>
+ <td>more and more</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td></td>
+ <td>more and more</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_25.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,112 @@
+<?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="http://localhost:8080/" />
+<title>EditNavActions_Rightclickmenu</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">EditNavActions_Rightclickmenu</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Group</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>waitForElementPresent</td>
+ <td>link=Add Node</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</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>Hihizzz</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>label</td>
+ <td>Hohohozzz</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>css=div#UIGroupNavigationManagement div.UIPopupWindow div.TabsContainer div.NormalTab div.MiddleTab</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Search and Select Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Search and Select Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//img[@title='Select Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//img[@title='Select Page']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Hohohozzz</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,156 @@
+<?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>AddEditGroupPageWizard</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AddEditGroupPageWizard</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Page Management</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageBrowser']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add New Page</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>pageName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageName</td>
+ <td>newpage21211</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>new page21211</td>
+</tr>
+<!--Click "Next" to move to step2 to choose page layout-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td>1,1</td>
+</tr>
+<!--Keep "Empty layout" and Click "Next" to move to step 3-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td>1,1</td>
+</tr>
+<!--Open Page Editor pane-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='Administration/AccountPortlet']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=View Page properties</td>
+ <td>1,1</td>
+</tr>
+<!--Select Permission Setting tab-->
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Show Max Window</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td>1,1</td>
+</tr>
+<!--Do not change anything in Page properties-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Cancel</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//img[@alt='']</td>
+ <td></td>
+</tr>
+<!--Click Save to complete adding new page by wizard with no content (no portlet)-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Page</td>
+ <td></td>
+</tr>
+<!--EDIT PAGE: Show form to edit page by wizard-->
+<tr>
+ <td>clickAt</td>
+ <td>link=View Page properties</td>
+ <td>1,1</td>
+</tr>
+<!--Select Permission Setting tab-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>doubleClickAt</td>
+ <td>link=Administrators</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageFormPopupGroupMembershipSelector']//div[@class='MembershipSelector']//a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<!--Click Save & Finish-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,122 @@
+<?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>EditGroupLayout</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">EditGroupLayout</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Group</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Layout</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Portal Properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>locale</td>
+ <td>label=English</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForTextPresent</td>
+ <td>Current Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>link=Edit Permission Setting</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='PermissionSelector']/div/div[2]/div/div[2]/div/div/div[1]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=exact:*</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_28.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,78 @@
+<?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>ActionsDashboardpage</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ActionsDashboardpage</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Dashboard</td>
+ <td>1,1</td>
+</tr>
+<!--Add gadgets into dashboard page-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add Gadgets</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Gadgets</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>//input[@id='url']</td>
+ <td>http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/treefro...</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//img[@class='AddNewNodeIcon']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIAddGadgetPopup']//div[@class='CloseButton']</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>//a[@onclick='eXo.portal.logout();']</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_29.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,165 @@
+<?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>SNF_PRL_29</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SNF_PRL_29</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>username</td>
+ <td>root</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>password</td>
+ <td>gtn</td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div</td>
+ <td></td><br /></tr--><br /><tr><br /> <td>click</td><br /> <td>link=Dashboard</td><br /> <td></td>
+</tr-->
+<!--ADD PAGE: Add new page in dashboard-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<!--Choose "root" node-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>pageName</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageName</td>
+ <td>dashboardpage12</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>dashboard new page12</td>
+</tr>
+<!--Click Next to move to step 2-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td>1,1</td>
+</tr>
+<!--Click Next to move to step 3, keep Empty layout-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td></td>
+</tr>
+<!--Open Editor pane-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@onclick='eXo.portal.UIPortal.toggleComposer(this)']</td>
+ <td></td>
+</tr>
+<!--Click Save to complete adding page-->
+<tr>
+ <td>click</td>
+ <td>//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>dashboard new page</td>
+ <td></td>
+</tr>
+<!--EDIT PAGE: Edit page in dashboard-->
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Page</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=View Page properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>title</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>new dashboard</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']</td>
+ <td>1,1</td>
+</tr>
+<!--EDIT LAYOUT: Edit Dashboard layout-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Layout</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Layout</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Portal Properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>locale</td>
+ <td>label=English</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[(a)onclick="eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')"]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']</td>
+ <td>1,1</td>
+</tr>
+<!--tr>
+ <td>click</td>
+ <td>//a[@onclick='eXo.portal.logout();']</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_30.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,227 @@
+<?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>SiteManagement</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">SiteManagement</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Add New Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add New Page</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageNodeSelector']//div[@class='HomeNode']/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageNodeSelector']//div[@class='HomeNode']/a</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageName</td>
+ <td>test9</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>pageDisplayName</td>
+ <td>test9</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=View Page properties</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=View Page properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>title</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>test9_changed</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>css=a.EdittedSaveButton</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Edit Page</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Page</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=View Page properties</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=View Page properties</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>title</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyValue</td>
+ <td>title</td>
+ <td>test9_changed</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>publicMode</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>publicMode</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Add Permission</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Administrators</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Administrators</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=exact:*</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Edit Permission Setting</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Select Permission</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Select Permission</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Platform</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Platform</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='PermissionSelector']//div[@class='MembershipSelector']//div[@class='OverflowContainer']/div[3]/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']//div[@class='TLPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>test9</td>
+ <td></td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_31.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_31.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_31.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,102 @@
+<?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>ChangeLanguagePrivateMode</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ChangeLanguagePrivateMode</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Change Language</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Change Language</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=French</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=French</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Apply</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Accueil</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Changer la langue</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=anglais</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=anglais</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>link=Appliquer</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>Home</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_32.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_32.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_32.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,72 @@
+<?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>ChangeDisplaySkin</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">ChangeDisplaySkin</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Change Skin</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Change Skin</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UITabContent']//div[@class='ItemListContainer']//div[@class='ItemList']//div[@class='SelectedItem Item']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAtAndWait</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='ActionButton LightBlueStyle']</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>clickAndWait</td>
+ <td>link=Se déconnecter</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_34.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_34.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_34.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,87 @@
+<?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>LogoPortletAccSetting</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">LogoPortletAccSetting</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/public/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Sign in</td>
+ <td></td>
+</tr>
+<tr>
+ <td>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>open</td>
+ <td>/portal/private/classic/</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Root Root</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>email</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>email</td>
+ <td>mytest.exo10(a)gmail.com</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>lastName</td>
+ <td>Root</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=OK</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Close</td>
+ <td>1,1</td>
+</tr>
+<!--tr>
+ <td>clickAndWait</td>
+ <td>//a[@onclick='eXo.portal.logout();']</td>
+ <td></td>
+</tr-->
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_35.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,223 @@
+<?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>CreateEditPageAdvance</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">CreateEditPageAdvance</td></tr>
+</thead><tbody>
+<!--tr>
+ <td>open</td>
+ <td>/portal/private/classic/administration/pageManagement</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>link=Sign in</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/administration/pageManagement</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageBrowser']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>name</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>user_page1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>user_page_title1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<!--Create portal page-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>ownerType</td>
+ <td>label=portal</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>portal_page1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>portal_page_title1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<!--Create group page-->
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>select</td>
+ <td>ownerType</td>
+ <td>label=group</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//option[@value='group']</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>name</td>
+ <td>group_page1</td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>title</td>
+ <td>group_page_title1</td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<!--EDIT PAGE: Click Edit icon of the first page from list-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIRepeater']//img[@class='EditInfoIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIRepeater']//img[@class='EditInfoIcon']</td>
+ <td></td>
+</tr>
+<!--Show form to edit page properties-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageEditor']//div[@class='PageProfileIcon']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']//div[@class='PageProfileIcon']</td>
+ <td>1,1</td>
+</tr>
+<!--Choose Permission Setting tab-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']</td>
+ <td></td>
+</tr>
+<!--Choose public option-->
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIListPermissionSelector']//input[@class='checkbox']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIListPermissionSelector']//input[@class='checkbox']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>link=Save</td>
+ <td>1,1</td>
+</tr>
+<tr>
+ <td>waitForElementPresent</td>
+ <td>//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAt</td>
+ <td>//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']</td>
+ <td></td>
+</tr>
+<!--tr>
+ <td>clickAndWait</td>
+ <td>link=Sign out</td>
+ <td></td>
+</tr-->
+<tr>
+ <td>verifyTextPresent</td>
+ <td>user_page_title1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>group_page_title1</td>
+ <td></td>
+</tr>
+<tr>
+ <td>verifyTextPresent</td>
+ <td>portal_page_title1</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/_Test_SNF_PRL_33.html
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/_Test_SNF_PRL_33.html (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/suite/org/exoplatform/portal/selenium/_Test_SNF_PRL_33.html 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,67 @@
+<?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>AccountSettingStartPorlet</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">AccountSettingStartPorlet</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/portal/private/classic/</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>clickAndWait</td>
+ <td>//div[@id='UIPortalLoginFormAction']/div/div/div/a</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Root Root</td>
+ <td></td>
+</tr>
+<tr>
+ <td>type</td>
+ <td>email</td>
+ <td>root(a)localhost.com</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Save</td>
+ <td></td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>link=Close</td>
+ <td></td>
+</tr>
+<tr>
+ <td>clickAndWait</td>
+ <td>//a[@onclick='eXo.portal.logout();']</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_All.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_All.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_All.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,1902 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+
+public class Test_All extends SeleneseTestCase {
+ public void setUp() throws Exception {
+ setUp("http://localhost:8080/portal/", "*firefox");
+ }
+
+ public void testSNF_PRL_02() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Register");
+ selenium.waitForPageToLoad("30000");
+ selenium.type("User Name:", "abc123");
+ selenium.type("Password:", "121212");
+ selenium.type("Confirm Password:", "121212");
+ selenium.type("First Name:", "Aha");
+ selenium.type("Last Name:", "Nguyen");
+ selenium.type("Email Address:", "th4nhc0n9z(a)yahoo.com");
+ selenium.clickAt("link=Subscribe", "1,1");
+ selenium.open("/portal/public/classic/");
+ System.out.println("!!! missing assert to check user exists !!!");
+ }
+
+ public void testSNF_PRL_03() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.clickAt("//a[@class='Language']", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Vietnamese"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("link=Vietnamese", "1,1");
+ selenium.clickAt("link=Apply", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (!selenium.isElementPresent("link=Apply"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//a[@class='Language']", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("//div[@id='UITabContent']//div[2]/a"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//div[@id='UITabContent']//div[2]/a", "1,1");
+ selenium.click("link=�p d?ng");
+ selenium.waitForPageToLoad("30000");
+ }
+
+ public void testSNF_PRL_04() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("username"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("//div[@id='UIPortalLoginFormAction']//a");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign in"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ }
+
+ public void testSNF_PRL_05() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("rememberme");
+ selenium.clickAt("//div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ selenium.clickAt("link=Sign in", "1,1");
+ verifyTrue(selenium.isChecked("rememberme"));
+ selenium.clickAt("link=Discard", "1,1");
+ }
+
+ public void testSNF_PRL_06() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+ selenium.waitForPageToLoad("30000");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Group"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Group");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Users and groups management"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Users and groups management");
+ selenium.waitForPageToLoad("30000");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("User Name"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ assertTrue(selenium.isTextPresent("Last Name"));
+ assertTrue(selenium.isTextPresent("First Name"));
+ assertTrue(selenium.isTextPresent("Email"));
+ selenium.clickAt("//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("firstName"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.type("firstName", "exo2");
+ selenium.clickAt("link=Save", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("user.name.given"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.type("user.name.given", "test");
+ selenium.type("user.name.given", "test05");
+ selenium.type("user.name.family", "test05family");
+ selenium.type("user.name.nickName", "testnick");
+ selenium.clickAt("link=Save", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ assertTrue(selenium.isTextPresent("The user profile has been updated."));
+ selenium.clickAt("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton",
+ "1,1");
+ selenium.clickAt("link=Cancel", "1,1");
+ assertTrue(selenium.isTextPresent("exo2"));
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ }
+
+ public void testSNF_PRL_07() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+ selenium.waitForPageToLoad("30000");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Group"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Group");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Users and groups management"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Users and groups management");
+ selenium.waitForPageToLoad("30000");
+ selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[@class='ManagementIconContainer']/a[@class='GroupButton']",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[3]//div[@class='ExpandIcon']/a",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("Management"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[3]//div[@class='ExpandIcon']/a",
+ "1,1");
+ selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[@class='TitleBar']/a[@class='TreeActionIcon AddGroupIcon']",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("groupName"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.type("groupName", "testgroup");
+ selenium.type("label", "testgroup label");
+ selenium.type("description", "testgroup description");
+ selenium.clickAt("//form[@id='UIGroupForm']//div[@class='ActionButton LightBlueStyle']", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("testgroup label"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//form[@id='UIGroupMembershipForm']//div[@class='HorizontalLayout']//table[@class='UIFormGrid']//td[@class='FieldComponent']/a",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("//form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("demo");
+ selenium.click("john");
+ selenium.click("mary");
+ selenium.click("root");
+ selenium.clickAt("//form[@id='UIUserSelector']//div[@class='UIAction']//a[@class='ActionButton LightBlueStyle']",
+ "1,1");
+ selenium.clickAt("link=Save", "1,1");
+ assertTrue(selenium.isTextPresent("demo"));
+ assertTrue(selenium.isTextPresent("john"));
+ assertTrue(selenium.isTextPresent("mary"));
+ assertTrue(selenium.isTextPresent("root"));
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ }
+
+ public void testSNF_PRL_08() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+ selenium.waitForPageToLoad("30000");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Group"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Group");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Users and groups management"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Users and groups management");
+ selenium.waitForPageToLoad("30000");
+ selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[@class='ManagementIconContainer']/a[@class='MembershipButton']",
+ "1,1");
+ selenium.type("name", "demomembership");
+ selenium.type("description", "demo scripts");
+ selenium.clickAt("link=Save", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("demomembership"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//table[@class='UIGrid']//tbody/tr[3]/td[5]//img", "1,1");
+ selenium.type("description", "demo scripts add more text");
+ selenium.clickAt("link=Save", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("demo scripts add more text"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=classic");
+ selenium.waitForPageToLoad("30000");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ }
+
+ public void testSNF_PRL_09() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+ selenium.waitForPageToLoad("30000");
+ selenium.clickAt("link=Application Registry", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("Import Applications"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.chooseOkOnNextConfirmation();
+ selenium.clickAt("//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']//div[@class='IconControl ImportIcon']",
+ "1,1");
+ String autoimport = selenium.getConfirmation();
+ System.out.println("!! missing assert !!");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ }
+
+ public void testSNF_PRL_10() throws Exception {
+ selenium.setSpeed("500");
+ selenium.open("/portal/public/classic/");
+ selenium.click("link=Sign in");
+ selenium.type("username", "root");
+ selenium.type("password", "gtn");
+ selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+ selenium.waitForPageToLoad("30000");
+ selenium.clickAt("link=Application Registry", "1,1");
+ selenium.clickAt("//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']/div[1]",
+ "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("name"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.type("name", "category_test");
+ selenium.type("displayName", "Category test name");
+ selenium.type("description", "category test description");
+ selenium.click("//div[@class='WorkingArea']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Add Permission"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("link=Add Permission", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Platform"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("link=Platform", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=manager"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("link=manager", "1,1");
+ selenium.clickAt("link=Save", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("//div[@id='UIApplicationOrganizer']//a[@class='ControlIcon EditIcon']"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.clickAt("//div[@id='UIApplicationOrganizer']//a[@class='ControlIcon EditIcon']", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("displayName"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.type("displayName", "category test edit");
+ selenium.clickAt("link=Save", "1,1");
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isTextPresent("category test edit"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ for (int second = 0;; second++) {
+ if (second >= 30)
+ fail("timeout");
+ try {
+ if (selenium.isElementPresent("link=Sign out"))
+ break;
+ } catch (Exception e) {
+ }
+ Thread.sleep(1000);
+ }
+ selenium.click("link=Sign out");
+ }
+
+// public void testSNF_PRL_11() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/public/classic/");
+// selenium.click("link=Sign in");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+// selenium.waitForPageToLoad("30000");
+// selenium.clickAt("link=Application Registry", "1,1");
+// selenium.clickAt("//div[@class='ListContent']//div[@class='SelectedTab']//a[@class='ControlIcon CreateNewIcon']",
+// "1,1");
+// selenium.clickAt("//input[@name='application' and @value='9']", "1,1");
+// selenium.type("displayName", "test10");
+// selenium.clickAt("css=form#UIAddApplicationForm div.UIAction div.ActionButton", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=category test edit"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=category test edit", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add Permission"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add Permission", "1,1");
+// selenium.clickAt("//div[@id='ListPermissionSelector']//a[@title='Organization']", "1,1");
+// selenium.clickAt("link=manager", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("test10"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Sign out"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.click("link=Sign out");
+// }
+//
+// public void testSNF_PRL_13() throws Exception {
+// selenium.setSpeed("500");
+// selenium.clickAt("link=Gadget", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@class='UIControlbar']/div[1]"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@class='UIControlbar']/div[1]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("url"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("url", "http://www.google.com/ig/modules/colorjunction.xml");
+// selenium.clickAt("link=Add", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("Gadget Details"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIGadgetInfo']//div[@class='UIBreadcumb']/div[@class='DownLoadIcon ControlIcon']",
+// "1,1");
+// System.out.println("https://jira.jboss.org/jira/browse/GTNPORTAL-439");
+// assertTrue(selenium.isTextPresent("Gadget Details"));
+// }
+//
+// public void testSNF_PRL_15() throws Exception {
+// selenium.setSpeed("500");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("link=Sign in");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/sitemap");
+// selenium.clickAt("//div[@id='UISiteMap']//div[@class='ClearFix']/div[2]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("Blog"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// assertTrue(selenium.isTextPresent("New Staff"));
+// assertTrue(selenium.isTextPresent("Application Registry"));
+// selenium.clickAt("//div[@id='UISiteMap']//div[@class='ClearFix']/div[1]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (!selenium.isElementPresent("Blog"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("css=div#UISiteMap div.ExpandIcon", "1,1");
+// selenium.clickAt("css=div#UISiteMap div.ChildrenContainer a", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (!selenium.isElementPresent("css=div#UISiteMap div.ChildrenContainer a"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// }
+//
+// public void testSNF_PRL_18() throws Exception {
+// selenium.setSpeed("500");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("link=Sign in");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/portalnavigation");
+// selenium.clickAt("//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.click("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']");
+// selenium.type("name", "New_portal");
+// selenium.click("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']");
+// selenium.click("publicMode");
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// selenium.clickAt("link=Select Permission", "1,1");
+// selenium.clickAt("link=Platform", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='PermissionSelector']//a[@title='Administrators']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='PermissionSelector']//a[@title='Administrators']", "1,1");
+// selenium.clickAt("//div[@id='PermissionSelector']//a[@title='manager']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (!selenium.isElementPresent("Permission Selector"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//form[@id='UIPortalForm']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']//div[@class='ButtonMiddle']/a",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("New_portal"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// }
+//
+// public void testSNF_PRL_19() throws Exception {
+// selenium.setSpeed("500");
+// selenium.click("link=Sign in");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.open("/portal/private/classic/");
+// selenium.click("link=Site");
+// selenium.waitForPageToLoad("30000");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Edit Layout"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Layout", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("css=div#Administration/ApplicationRegistryPortlet"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.dragAndDropToObject("css=div#Administration/ApplicationRegistryPortlet",
+// "css=div#Administration/ApplicationRegistryPortlet");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("classic"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Navigation", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add Node"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add Node", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("name"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("name", "Node_test");
+// selenium.type("label", "New node");
+// selenium.clickAt("css=div#UISiteManagement > div.UIPopupWindow div.TabsContainer div.NormalTab div.MiddleTab",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Search and Select Page"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Search and Select Page", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIRepeater']//table//tbody/tr/td[5]/div[@class='ActionContainer']/img"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.click("//div[@id='UIRepeater']//table//tbody/tr/td[5]/div[@class='ActionContainer']/img");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=Edit Portal's Properties", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Edit Permission Setting"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Select Permission"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Select Permission", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Platform"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Platform", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Administrators"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Administrators", "1,1");
+// selenium.clickAt("link=Platform", "1,1");
+// selenium.clickAt("link=Administrators", "1,1");
+// selenium.clickAt("//div[@id='PermissionSelector']//div[2]/a", "1,1");
+// selenium.clickAt("//form[@id='UIPortalForm']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']",
+// "1,1");
+// selenium.open("/portal/private/classic/");
+// selenium.clickAt("link=New node", "1,1");
+// }
+//
+// public void testSNF_PRL_20() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// selenium.clickAt("link=Site", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add New Portal"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add New Portal", "1,1");
+// selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PortalSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PortalSetting')\"]",
+// "1,1");
+// selenium.type("name", "Haha");
+// selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')\"]",
+// "1,1");
+// selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PermissionSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PermissionSetting')\"]",
+// "1,1");
+// selenium.clickAt("publicMode", "1,1");
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// selenium.clickAt("link=Select Permission", "1,1");
+// selenium.clickAt("link=Platform", "1,1");
+// selenium.clickAt("link=Platform", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@class='CollapseIcon']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=exact:*", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.click("//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]");
+// selenium.waitForPageToLoad("30000");
+// assertFalse(selenium.isTextPresent("Haha"));
+// }
+//
+// public void testSNF_PRL_21() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// selenium.click("link=New_portal");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/portalnavigation");
+// selenium.click("link=New_portal");
+// selenium.waitForPageToLoad("30000");
+// selenium.clickAt("link=New_portal", "1,1");
+// }
+//
+// public void testSNF_PRL_22() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// selenium.click("link=Site");
+// selenium.waitForPageToLoad("30000");
+// selenium.clickAt("link=Edit Layout", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Portal Properties"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Portal Properties", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("locale"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.select("locale", "label=French (France)");
+// selenium.click("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("publicMode"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.click("publicMode");
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Select Permission"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Select Permission", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Platform"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Platform", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Users"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Users", "1,1");
+// selenium.clickAt("link=exact:*", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=classic"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=classic", "1,1");
+// }
+//
+// public void testSNF_PRL_23() throws Exception {
+// selenium.setSpeed("500");
+// selenium.click("link=Sign in");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/");
+// selenium.click("link=Group");
+// selenium.waitForPageToLoad("30000");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add Navigation"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add Navigation", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Cancel"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Cancel", "1,1");
+// selenium.clickAt("link=Edit Navigation", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add Node"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add Node", "1,1");
+// selenium.type("name", "grp_node");
+// selenium.type("label", "new_grp_node");
+// selenium.clickAt("//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']",
+// "1,1");
+// selenium.clickAt("link=Search and Select Page", "1,1");
+// selenium.clickAt("//div[@id='UIRepeater']//img[@class='SelectPageIcon']", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.check("//a[@onclick='eXo.portal.logout();']");
+// selenium.waitForPageToLoad("30000");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=new_grp_node"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.click("link=new_grp_node");
+// selenium.waitForPageToLoad("30000");
+// }
+//
+// public void testSNF_PRL_24() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// selenium.click("link=Group");
+// selenium.waitForPageToLoad("30000");
+// selenium.clickAt("//a[@class='EditProIcon']", "1,1");
+// selenium.type("description", "more and more");
+// selenium.clickAt("link=Save", "1,1");
+// assertTrue(selenium.isTextPresent(""));
+// }
+//
+// public void testSNF_PRL_25() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// selenium.click("link=Group");
+// selenium.waitForPageToLoad("30000");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Edit Navigation"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Navigation", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add Node"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add Node", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("name"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("name", "Hihizzz");
+// selenium.type("label", "Hohohozzz");
+// selenium.clickAt("css=div#UIGroupNavigationManagement div.UIPopupWindow div.TabsContainer div.NormalTab div.MiddleTab",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Search and Select Page"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Search and Select Page", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//img[@title='Select Page']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//img[@title='Select Page']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Save"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=Hohohozzz", "1,1");
+// selenium.open("/portal/private/classic/");
+// }
+//
+// public void testSNF_PRL_27_1() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// selenium.clickAt("link=Page Management", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPageBrowser']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add New Page", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("pageName"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("pageName", "newpage21211");
+// selenium.type("pageDisplayName", "new page21211");
+// selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+// selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='Administration/AccountPortlet']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=View Page properties", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("Show Max Window"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// selenium.clickAt("link=Cancel", "1,1");
+// selenium.clickAt("//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//img[@alt='']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Page", "1,1");
+// selenium.clickAt("link=View Page properties", "1,1");
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+// selenium.clickAt("link=Add Permission", "1,1");
+// selenium.clickAt("link=Platform", "1,1");
+// selenium.clickAt("//div[@id='UIPageFormPopupGroupMembershipSelector']//div[@class='MembershipSelector']//a",
+// "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]", "1,1");
+// }
+//
+// public void testSNF_PRL_27_2() throws Exception {
+// selenium.setSpeed("500");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+// selenium.waitForPageToLoad("30000");
+// selenium.click("link=Group");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/");
+// selenium.clickAt("link=Edit Layout", "1,1");
+// selenium.clickAt("link=Portal Properties", "1,1");
+// selenium.select("locale", "label=English");
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+// selenium.clickAt("publicMode", "1,1");
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isTextPresent("Current Permission"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Select Permission", "1,1");
+// selenium.click("link=Select Permission");
+// selenium.clickAt("//div[@id='PermissionSelector']/div/div[2]/div/div[2]/div/div/div[1]/a",
+// "1,1");
+// selenium.clickAt("link=Platform", "1,1");
+// selenium.clickAt("link=exact:*", "1,1");
+// selenium.clickAt("//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]", "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// }
+//
+// public void testSNF_PRL_28() throws Exception {
+// selenium.setSpeed("500");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/");
+// selenium.clickAt("link=Dashboard", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add Gadgets"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add Gadgets", "1,1");
+// selenium.type("//input[@id='url']",
+// "http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/treefro...");
+// selenium.clickAt("//img[@class='AddNewNodeIcon']", "1,1");
+// selenium.clickAt("//div[@id='UIAddGadgetPopup']//div[@class='CloseButton']", "1,1");
+// }
+//
+// public void testSNF_PRL_29() throws Exception {
+// selenium.setSpeed("500");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+// selenium.waitForPageToLoad("30000");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add New Page"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add New Page", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("pageName"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("pageName", "dashboardpage12");
+// selenium.type("pageDisplayName", "dashboard new page12");
+// selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+// selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+// selenium.clickAt("//div[@onclick='eXo.portal.UIPortal.toggleComposer(this)']", "1,1");
+// selenium.click("//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]");
+// assertTrue(selenium.isTextPresent("dashboard new page"));
+// selenium.clickAt("link=Edit Page", "1,1");
+// selenium.clickAt("link=View Page properties", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("title"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("title", "new dashboard");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Edit Layout"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Layout", "1,1");
+// selenium.clickAt("link=Portal Properties", "1,1");
+// selenium.select("locale", "label=English");
+// selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')\"]",
+// "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']", "1,1");
+// }
+//
+// public void testSNF_PRL_30() throws Exception {
+// selenium.setSpeed("500");
+// selenium.open("/portal/private/classic/");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Add New Page"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Add New Page", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPageNodeSelector']//div[@class='HomeNode']/a"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIPageNodeSelector']//div[@class='HomeNode']/a", "1,1");
+// selenium.type("pageName", "test9");
+// selenium.type("pageDisplayName", "test9");
+// selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=View Page properties"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=View Page properties", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("title"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("title", "test9_changed");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("css=a.EdittedSaveButton", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Edit Page"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Edit Page", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=View Page properties"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=View Page properties", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("title"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// assertEquals("test9_changed", selenium.getValue("title"));
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("publicMode"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("publicMode", "1,1");
+// selenium.clickAt("link=Add Permission", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Platform"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Platform", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Administrators"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Administrators", "1,1");
+// selenium.clickAt("link=exact:*", "1,1");
+// selenium.clickAt("link=Edit Permission Setting", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Select Permission"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Select Permission", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Platform"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Platform", "1,1");
+// selenium.clickAt("//div[@id='PermissionSelector']//div[@class='MembershipSelector']//div[@class='OverflowContainer']/div[3]/a",
+// "1,1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPageEditor']//div[@class='TLPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']",
+// "1,1");
+// assertTrue(selenium.isTextPresent("test9"));
+// selenium.open("/portal/private/classic/");
+// }
+//
+// public void testSNF_PRL_31() throws Exception {
+// selenium.setSpeed("500");
+// selenium.click("link=Sign in");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Change Language"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Change Language", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=French"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=French", "1,1");
+// selenium.click("link=Apply");
+// selenium.waitForPageToLoad("30000");
+// assertTrue(selenium.isTextPresent("Accueil"));
+// selenium.clickAt("link=Changer la langue", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=anglais"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=anglais", "1,1");
+// selenium.click("link=Appliquer");
+// selenium.waitForPageToLoad("30000");
+// assertTrue(selenium.isTextPresent("Home"));
+// }
+//
+// public void testSNF_PRL_32() throws Exception {
+// selenium.setSpeed("500");
+// selenium.click("link=Sign in");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Change Skin"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Change Skin", "1,1");
+// selenium.clickAt("//div[@id='UITabContent']//div[@class='ItemListContainer']//div[@class='ItemList']//div[@class='SelectedItem Item']",
+// "1,1");
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[@class='ActionButton LightBlueStyle']",
+// "1,1");
+// selenium.waitForPageToLoad("30000");
+// }
+//
+// public void testSNF_PRL_34() throws Exception {
+// selenium.setSpeed("500");
+// selenium.click("link=Sign in");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+// selenium.waitForPageToLoad("30000");
+// selenium.open("/portal/private/classic/");
+// selenium.clickAt("link=Root Root", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("email"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("email", "mytest.exo10(a)gmail.com");
+// selenium.type("lastName", "Root");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("link=OK", "1,1");
+// selenium.clickAt("link=Close", "1,1");
+// }
+//
+// public void testSNF_PRL_35() throws Exception {
+// selenium.setSpeed("500");
+// selenium.type("username", "root");
+// selenium.type("password", "gtn");
+// selenium.clickAt("link=Sign in", "1,1");
+// selenium.open("/portal/private/classic/administration/pageManagement");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPageBrowser']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("name"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.type("name", "user_page1");
+// selenium.type("title", "user_page_title1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.select("ownerType", "label=portal");
+// selenium.type("name", "portal_page1");
+// selenium.type("title", "portal_page_title1");
+// selenium.clickAt("link=Save", "1,1");
+// selenium.clickAt("//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.select("ownerType", "label=group");
+// selenium.clickAt("//option[@value='group']", "1,1");
+// selenium.type("name", "group_page1");
+// selenium.type("title", "group_page_title1");
+// selenium.clickAt("link=Save", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIRepeater']//img[@class='EditInfoIcon']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIRepeater']//img[@class='EditInfoIcon']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPageEditor']//div[@class='PageProfileIcon']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIPageEditor']//div[@class='PageProfileIcon']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']",
+// "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIListPermissionSelector']//input[@class='checkbox']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIListPermissionSelector']//input[@class='checkbox']", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("link=Save"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("link=Save", "1,1");
+// for (int second = 0;; second++) {
+// if (second >= 30)
+// fail("timeout");
+// try {
+// if (selenium.isElementPresent("//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']"))
+// break;
+// } catch (Exception e) {
+// }
+// Thread.sleep(1000);
+// }
+// selenium.clickAt("//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']",
+// "1,1");
+// assertTrue(selenium.isTextPresent("user_page_title1"));
+// assertTrue(selenium.isTextPresent("group_page_title1"));
+// assertTrue(selenium.isTextPresent("portal_page_title1"));
+// }
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_02.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_02.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_02.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,26 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_02 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_02() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Register");
+selenium.waitForPageToLoad("30000");
+selenium.type("User Name:", "abc123");
+selenium.type("Password:", "121212");
+selenium.type("Confirm Password:", "121212");
+selenium.type("First Name:", "Aha");
+selenium.type("Last Name:", "Nguyen");
+selenium.type("Email Address:", "th4nhc0n9z(a)yahoo.com");
+selenium.clickAt("link=Subscribe", "1,1");
+selenium.open("/portal/public/classic/");
+System.out.println("!!! missing assert to check user exists !!!");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_03.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_03.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_03.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,47 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_03 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_03() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.clickAt("//a[@class='Language']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Vietnamese"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Vietnamese", "1,1");
+selenium.clickAt("link=Apply", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+if (!selenium.isElementPresent("link=Apply"))
+ break;
+ }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//a[@class='Language']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UITabContent']//div[2]/a"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UITabContent']//div[2]/a", "1,1");
+selenium.click("link=�p d?ng");
+selenium.waitForPageToLoad("30000");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_04.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_04.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_04.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,44 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_04 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_04() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("username"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']//a");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign in"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_05.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_05.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_05.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,32 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_05 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_05() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("rememberme");
+selenium.clickAt("//div[@id='UIPortalLoginFormAction']//div[@class='ButtonMiddle']/a", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+selenium.clickAt("link=Sign in", "1,1");
+verifyTrue(selenium.isChecked("rememberme"));
+selenium.clickAt("link=Discard", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_06.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_06.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_06.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,113 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_06 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_06() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Group"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Group");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Users and groups management"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Users and groups management");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("User Name"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+assertTrue(selenium.isTextPresent("Last Name"));
+assertTrue(selenium.isTextPresent("First Name"));
+assertTrue(selenium.isTextPresent("Email"));
+selenium.clickAt("//div[@id='UIListUsersGird']//tbody/tr[3]//td[5]//div//img", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("firstName"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("firstName", "exo2");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIUserManagement']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("user.name.given"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("user.name.given", "test");
+selenium.type("user.name.given", "test05");
+selenium.type("user.name.family", "test05family");
+selenium.type("user.name.nickName", "testnick");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+assertTrue(selenium.isTextPresent("The user profile has been updated."));
+selenium.clickAt("css=div#UIOrganizationPortlet div.ManagementTabContent > div.UIPopupWindow div.ActionButton", "1,1");
+selenium.clickAt("link=Cancel", "1,1");
+assertTrue(selenium.isTextPresent("exo2"));
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_07.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_07.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_07.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,107 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_07 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_07() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Group"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Group");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Users and groups management"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Users and groups management");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[@class='ManagementIconContainer']/a[@class='GroupButton']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIOrganizationPortlet']/div[2]/div[2]/div[1]/div[2]/div[1]/div[2]/div/div/div/div[3]/div/a"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[3]//div[@class='ExpandIcon']/a", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("Management"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[3]//div[@class='ExpandIcon']/a", "1,1");
+selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[@class='TitleBar']/a[@class='TreeActionIcon AddGroupIcon']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("groupName"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("groupName", "testgroup");
+selenium.type("label", "testgroup label");
+selenium.type("description", "testgroup description");
+selenium.clickAt("//form[@id='UIGroupForm']//div[@class='ActionButton LightBlueStyle']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("testgroup label"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//form[@id='UIGroupMembershipForm']//div[@class='HorizontalLayout']//table[@class='UIFormGrid']//td[@class='FieldComponent']/a", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//form[@id='UIUserSelector']/div[2]/div[2]/table/tbody/tr/td/a[1]/div/div/div"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("demo");
+selenium.click("john");
+selenium.click("mary");
+selenium.click("root");
+selenium.clickAt("//form[@id='UIUserSelector']//div[@class='UIAction']//a[@class='ActionButton LightBlueStyle']", "1,1");
+selenium.clickAt("link=Save", "1,1");
+assertTrue(selenium.isTextPresent("demo"));
+assertTrue(selenium.isTextPresent("john"));
+assertTrue(selenium.isTextPresent("mary"));
+assertTrue(selenium.isTextPresent("root"));
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_08.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_08.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_08.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,73 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_08 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_08() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Group"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Group");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Users and groups management"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Users and groups management");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("//div[@id='UIOrganizationPortlet']//div[@class='ManagementIconContainer']/a[@class='MembershipButton']", "1,1");
+selenium.type("name", "demomembership");
+selenium.type("description", "demo scripts");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("demomembership"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//table[@class='UIGrid']//tbody/tr[3]/td[5]//img", "1,1");
+selenium.type("description", "demo scripts add more text");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("demo scripts add more text"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=classic");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_09.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_09.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_09.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,42 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_09 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_09() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("link=Application Registry", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("Import Applications"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.chooseOkOnNextConfirmation();
+selenium.clickAt("//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']//div[@class='IconControl ImportIcon']", "1,1");
+String autoimport = selenium.getConfirmation();
+System.out.println("!! missing assert !!");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_10.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_10.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_10.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,98 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_10 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_10() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("link=Application Registry", "1,1");
+selenium.clickAt("//div[@id='UIApplicationOrganizer']//div[@class='UIControlbar']/div[1]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("name"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("name", "category_test");
+selenium.type("displayName", "Category test name");
+selenium.type("description", "category test description");
+selenium.click("//div[@class='WorkingArea']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Permission"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Permission", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Platform"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Platform", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=manager"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=manager", "1,1");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIApplicationOrganizer']//a[@class='ControlIcon EditIcon']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIApplicationOrganizer']//a[@class='ControlIcon EditIcon']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("displayName"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("displayName", "category test edit");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("category test edit"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_11.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_11.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_11.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,62 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_11 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_11() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/public/classic/");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("link=Application Registry", "1,1");
+selenium.clickAt("//div[@class='ListContent']//div[@class='SelectedTab']//a[@class='ControlIcon CreateNewIcon']", "1,1");
+selenium.clickAt("//input[@name='application' and @value='9']", "1,1");
+selenium.type("displayName", "test10");
+selenium.clickAt("css=form#UIAddApplicationForm div.UIAction div.ActionButton", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=category test edit"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=category test edit", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Permission"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Permission", "1,1");
+selenium.clickAt("//div[@id='ListPermissionSelector']//a[@title='Organization']", "1,1");
+selenium.clickAt("link=manager", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("test10"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Sign out"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=Sign out");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_13.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_13.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_13.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,45 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_13 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_13() throws Exception {
+selenium.setSpeed("500");
+selenium.clickAt("link=Gadget", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@class='UIControlbar']/div[1]"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@class='UIControlbar']/div[1]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("url"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("url", "http://www.google.com/ig/modules/colorjunction.xml");
+selenium.clickAt("link=Add", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("Gadget Details"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIGadgetInfo']//div[@class='UIBreadcumb']/div[@class='DownLoadIcon ControlIcon']", "1,1");
+System.out.println("https://jira.jboss.org/jira/browse/GTNPORTAL-439");
+assertTrue(selenium.isTextPresent("Gadget Details"));
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_15.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_15.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_15.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,51 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_15 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_15() throws Exception {
+selenium.setSpeed("500");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("link=Sign in");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/sitemap");
+selenium.clickAt("//div[@id='UISiteMap']//div[@class='ClearFix']/div[2]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("Blog"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+assertTrue(selenium.isTextPresent("New Staff"));
+assertTrue(selenium.isTextPresent("Application Registry"));
+selenium.clickAt("//div[@id='UISiteMap']//div[@class='ClearFix']/div[1]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+if (!selenium.isElementPresent("Blog"))
+ break;
+ }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("css=div#UISiteMap div.ExpandIcon", "1,1");
+selenium.clickAt("css=div#UISiteMap div.ChildrenContainer a", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+if (!selenium.isElementPresent("css=div#UISiteMap div.ChildrenContainer a"))
+ break;
+ }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_18.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_18.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_18.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,63 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_18 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_18() throws Exception {
+selenium.setSpeed("500");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("link=Sign in");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/portalnavigation");
+selenium.clickAt("//div[@id='UISiteManagement']//div[@class='UIAction']//div[@class='ActionButton BlueButton']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[2]//div[@class='MiddleTab']");
+selenium.type("name", "New_portal");
+selenium.click("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[4]//div[@class='MiddleTab']");
+selenium.click("publicMode");
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+selenium.clickAt("link=Select Permission", "1,1");
+selenium.clickAt("link=Platform", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='PermissionSelector']//a[@title='Administrators']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='PermissionSelector']//a[@title='Administrators']", "1,1");
+selenium.clickAt("//div[@id='PermissionSelector']//a[@title='manager']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+if (!selenium.isElementPresent("Permission Selector"))
+ break;
+ }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//form[@id='UIPortalForm']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']//div[@class='ButtonMiddle']/a", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("New_portal"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_19.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_19.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_19.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,148 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_19 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_19() throws Exception {
+selenium.setSpeed("500");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.open("/portal/private/classic/");
+selenium.click("link=Site");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Edit Layout"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Layout", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("css=div#Administration/ApplicationRegistryPortlet"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.dragAndDropToObject("css=div#Administration/ApplicationRegistryPortlet","css=div#Administration/ApplicationRegistryPortlet");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("classic"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Navigation", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Node"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Node", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("name"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("name", "Node_test");
+selenium.type("label", "New node");
+selenium.clickAt("css=div#UISiteManagement > div.UIPopupWindow div.TabsContainer div.NormalTab div.MiddleTab", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Search and Select Page"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Search and Select Page", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIRepeater']//table//tbody/tr/td[5]/div[@class='ActionContainer']/img"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("//div[@id='UIRepeater']//table//tbody/tr/td[5]/div[@class='ActionContainer']/img");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=Edit Portal's Properties", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Edit Permission Setting"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Select Permission"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Select Permission", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Platform"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Platform", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Administrators"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Administrators", "1,1");
+selenium.clickAt("link=Platform", "1,1");
+selenium.clickAt("link=Administrators", "1,1");
+selenium.clickAt("//div[@id='PermissionSelector']//div[2]/a", "1,1");
+selenium.clickAt("//form[@id='UIPortalForm']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']", "1,1");
+selenium.open("/portal/private/classic/");
+selenium.clickAt("link=New node", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_20.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_20.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_20.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,56 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_20 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_20() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+selenium.clickAt("link=Site", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add New Portal"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add New Portal", "1,1");
+selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PortalSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PortalSetting')\"]", "1,1");
+selenium.type("name", "Haha");
+selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')\"]", "1,1");
+selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'PermissionSetting');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=PermissionSetting')\"]", "1,1");
+selenium.clickAt("publicMode", "1,1");
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+selenium.clickAt("link=Select Permission", "1,1");
+selenium.clickAt("link=Platform", "1,1");
+selenium.clickAt("link=Platform", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@class='CollapseIcon']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=exact:*", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("//div[@id='UISiteManagement']/table[2]/tbody/tr/td[3]/a[4]");
+selenium.waitForPageToLoad("30000");
+assertFalse(selenium.isTextPresent("Haha"));
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_21.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_21.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_21.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,21 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_21 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_21() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+selenium.click("link=New_portal");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/portalnavigation");
+selenium.click("link=New_portal");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("link=New_portal", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_22.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_22.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_22.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,86 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_22 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_22() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+selenium.click("link=Site");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("link=Edit Layout", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Portal Properties"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Portal Properties", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("locale"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.select("locale", "label=French (France)");
+selenium.click("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("publicMode"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("publicMode");
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Select Permission"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Select Permission", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Platform"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Platform", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Users"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Users", "1,1");
+selenium.clickAt("link=exact:*", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=classic"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=classic", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_23.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_23.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_23.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,69 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_23 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_23() throws Exception {
+selenium.setSpeed("500");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/");
+selenium.click("link=Group");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Navigation"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Navigation", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Cancel"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Cancel", "1,1");
+selenium.clickAt("link=Edit Navigation", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Node"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Node", "1,1");
+selenium.type("name", "grp_node");
+selenium.type("label", "new_grp_node");
+selenium.clickAt("//div[@class='CenterHorizontalTabs']//div[@class='NormalTab']//div[@class='MiddleTab']", "1,1");
+selenium.clickAt("link=Search and Select Page", "1,1");
+selenium.clickAt("//div[@id='UIRepeater']//img[@class='SelectPageIcon']", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.check("//a[@onclick='eXo.portal.logout();']");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=new_grp_node"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.click("link=new_grp_node");
+selenium.waitForPageToLoad("30000");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_24.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_24.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_24.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,21 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_24 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_24() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+selenium.click("link=Group");
+selenium.waitForPageToLoad("30000");
+selenium.clickAt("//a[@class='EditProIcon']", "1,1");
+selenium.type("description", "more and more");
+selenium.clickAt("link=Save", "1,1");
+assertTrue(selenium.isTextPresent(""));
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_25.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_25.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_25.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,76 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_25 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_25() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+selenium.click("link=Group");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Edit Navigation"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Navigation", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Node"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Node", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("name"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("name", "Hihizzz");
+selenium.type("label", "Hohohozzz");
+selenium.clickAt("css=div#UIGroupNavigationManagement div.UIPopupWindow div.TabsContainer div.NormalTab div.MiddleTab", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Search and Select Page"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Search and Select Page", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//img[@title='Select Page']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//img[@title='Select Page']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Save"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=Hohohozzz", "1,1");
+selenium.open("/portal/private/classic/");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_1.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,74 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_27_1 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_27_1() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+selenium.clickAt("link=Page Management", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPageBrowser']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add New Page", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("pageName"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("pageName", "newpage21211");
+selenium.type("pageDisplayName", "new page21211");
+selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='Administration/AccountPortlet']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=View Page properties", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("Show Max Window"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+selenium.clickAt("link=Cancel", "1,1");
+selenium.clickAt("//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//img[@alt='']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Page", "1,1");
+selenium.clickAt("link=View Page properties", "1,1");
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+selenium.clickAt("link=Add Permission", "1,1");
+selenium.clickAt("link=Platform", "1,1");
+selenium.clickAt("//div[@id='UIPageFormPopupGroupMembershipSelector']//div[@class='MembershipSelector']//a", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_27_2.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,42 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_27_2 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_27_2() throws Exception {
+selenium.setSpeed("500");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+selenium.click("link=Group");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/");
+selenium.clickAt("link=Edit Layout", "1,1");
+selenium.clickAt("link=Portal Properties", "1,1");
+selenium.select("locale", "label=English");
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[3]//div[@class='MiddleTab']", "1,1");
+selenium.clickAt("publicMode", "1,1");
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isTextPresent("Current Permission"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Select Permission", "1,1");
+selenium.click("link=Select Permission");
+selenium.clickAt("//div[@id='PermissionSelector']/div/div[2]/div/div[2]/div/div/div[1]/a", "1,1");
+selenium.clickAt("link=Platform", "1,1");
+selenium.clickAt("link=exact:*", "1,1");
+selenium.clickAt("//div[@id='UIPortalComposer']/div[1]/div/div/div/a[2]", "1,1");
+selenium.clickAt("link=Save", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_28.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_28.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_28.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,32 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_28 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_28() throws Exception {
+selenium.setSpeed("500");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/");
+selenium.clickAt("link=Dashboard", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add Gadgets"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add Gadgets", "1,1");
+selenium.type("//input[@id='url']", "http://hosting.gmodules.com/ig/gadgets/file/112581010116074801021/treefro...");
+selenium.clickAt("//img[@class='AddNewNodeIcon']", "1,1");
+selenium.clickAt("//div[@id='UIAddGadgetPopup']//div[@class='CloseButton']", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_29.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_29.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_29.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,69 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_29 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_29() throws Exception {
+selenium.setSpeed("500");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div");
+selenium.waitForPageToLoad("30000");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add New Page"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add New Page", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("pageName"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("pageName", "dashboardpage12");
+selenium.type("pageDisplayName", "dashboard new page12");
+selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+selenium.clickAt("//div[@onclick='eXo.portal.UIPortal.toggleComposer(this)']", "1,1");
+selenium.click("//div[@id='UIPageEditor']/div[1]/div/div/div/a[2]");
+assertTrue(selenium.isTextPresent("dashboard new page"));
+selenium.clickAt("link=Edit Page", "1,1");
+selenium.clickAt("link=View Page properties", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("title"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("title", "new dashboard");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Edit Layout"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Layout", "1,1");
+selenium.clickAt("link=Portal Properties", "1,1");
+selenium.select("locale", "label=English");
+selenium.clickAt("//div[@onclick=\"eXo.webui.UIHorizontalTabs.changeTabForUIFormTabpane(this, 'UIPortalForm', 'Properties');javascript:eXo.webui.UIForm.submitEvent('UIPortalForm','SelectTab','&objectId=Properties')\"]", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPortalComposer']//a[@class='EdittedSaveButton']", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_30.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_30.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_30.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,154 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_30 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_30() throws Exception {
+selenium.setSpeed("500");
+selenium.open("/portal/private/classic/");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Add New Page"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Add New Page", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPageNodeSelector']//div[@class='HomeNode']/a"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIPageNodeSelector']//div[@class='HomeNode']/a", "1,1");
+selenium.type("pageName", "test9");
+selenium.type("pageDisplayName", "test9");
+selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIPageCreationWizard']//div[@class='UIAction']//div[2]", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=View Page properties"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=View Page properties", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("title"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("title", "test9_changed");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("css=a.EdittedSaveButton", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Edit Page"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Edit Page", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=View Page properties"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=View Page properties", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("title"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+assertEquals("test9_changed", selenium.getValue("title"));
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']/div[3]//div[@class='MiddleTab']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("publicMode"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("publicMode", "1,1");
+selenium.clickAt("link=Add Permission", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Platform"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Platform", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Administrators"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Administrators", "1,1");
+selenium.clickAt("link=exact:*", "1,1");
+selenium.clickAt("link=Edit Permission Setting", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Select Permission"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Select Permission", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Platform"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Platform", "1,1");
+selenium.clickAt("//div[@id='PermissionSelector']//div[@class='MembershipSelector']//div[@class='OverflowContainer']/div[3]/a", "1,1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPageEditor']//div[@class='TLPortalComposer']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']", "1,1");
+assertTrue(selenium.isTextPresent("test9"));
+selenium.open("/portal/private/classic/");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_31.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_31.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_31.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,54 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_31 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_31() throws Exception {
+selenium.setSpeed("500");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Change Language"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Change Language", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=French"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=French", "1,1");
+selenium.click("link=Apply");
+selenium.waitForPageToLoad("30000");
+assertTrue(selenium.isTextPresent("Accueil"));
+selenium.clickAt("link=Changer la langue", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=anglais"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=anglais", "1,1");
+selenium.click("link=Appliquer");
+selenium.waitForPageToLoad("30000");
+assertTrue(selenium.isTextPresent("Home"));
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_32.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_32.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_32.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,32 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_32 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_32() throws Exception {
+selenium.setSpeed("500");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Change Skin"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Change Skin", "1,1");
+selenium.clickAt("//div[@id='UITabContent']//div[@class='ItemListContainer']//div[@class='ItemList']//div[@class='SelectedItem Item']", "1,1");
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[@class='ActionButton LightBlueStyle']", "1,1");
+selenium.waitForPageToLoad("30000");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_34.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_34.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_34.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,34 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_34 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_34() throws Exception {
+selenium.setSpeed("500");
+selenium.click("link=Sign in");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.click("//div[@id='UIPortalLoginFormAction']/div/div/div/a");
+selenium.waitForPageToLoad("30000");
+selenium.open("/portal/private/classic/");
+selenium.clickAt("link=Root Root", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("email"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("email", "mytest.exo10(a)gmail.com");
+selenium.type("lastName", "Root");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("link=OK", "1,1");
+selenium.clickAt("link=Close", "1,1");
+}
+
+}
Added: portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_35.java
===================================================================
--- portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_35.java (rev 0)
+++ portal/trunk/testsuite/ui-tests/sniff-tests/src/test/java/org/exoplatform/portal/selenium/Test_SNF_PRL_35.java 2010-01-19 16:50:57 UTC (rev 1381)
@@ -0,0 +1,122 @@
+package org.exoplatform.portal.selenium;
+
+import com.thoughtworks.selenium.*;
+import java.util.regex.Pattern;
+public class Test_SNF_PRL_35 extends SeleneseTestCase {
+public void setUp() throws Exception {
+setUp("http://localhost:8080/portal/", "*firefox");
+}
+
+public void testSNF_PRL_35() throws Exception {
+selenium.setSpeed("500");
+selenium.type("username", "root");
+selenium.type("password", "gtn");
+selenium.clickAt("link=Sign in", "1,1");
+selenium.open("/portal/private/classic/administration/pageManagement");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPageBrowser']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("name"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.type("name", "user_page1");
+selenium.type("title", "user_page_title1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.select("ownerType", "label=portal");
+selenium.type("name", "portal_page1");
+selenium.type("title", "portal_page_title1");
+selenium.clickAt("link=Save", "1,1");
+selenium.clickAt("//div[@id='UIPageBrowser']//div[@class='UIAction']//div[@class='ActionButton LightBlueStyle']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.select("ownerType", "label=group");
+selenium.clickAt("//option[@value='group']", "1,1");
+selenium.type("name", "group_page1");
+selenium.type("title", "group_page_title1");
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIRepeater']//img[@class='EditInfoIcon']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIRepeater']//img[@class='EditInfoIcon']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPageEditor']//div[@class='PageProfileIcon']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIPageEditor']//div[@class='PageProfileIcon']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIMaskWorkspace']//div[@class='TabsContainer']//div[3]//div[@class='MiddleTab']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIListPermissionSelector']//input[@class='checkbox']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIListPermissionSelector']//input[@class='checkbox']", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("link=Save"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("link=Save", "1,1");
+for (int second = 0;; second++) {
+if (second >= 30) fail("timeout");
+try {
+ if (selenium.isElementPresent("//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']"))
+break; }
+ catch (Exception e) {}
+Thread.sleep(1000);
+}
+selenium.clickAt("//div[@id='UIPageEditor']//div[@class='OverflowContainer']/a[@class='EdittedSaveButton']", "1,1");
+assertTrue(selenium.isTextPresent("user_page_title1"));
+assertTrue(selenium.isTextPresent("group_page_title1"));
+assertTrue(selenium.isTextPresent("portal_page_title1"));
+}
+
+}
14 years, 11 months
gatein SVN: r1380 - in portal/trunk/component/test: jcr and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-01-19 11:43:00 -0500 (Tue, 19 Jan 2010)
New Revision: 1380
Modified:
portal/trunk/component/test/core/
portal/trunk/component/test/jcr/
portal/trunk/component/test/organization/
Log:
Ignore 'target' directories
Property changes on: portal/trunk/component/test/core
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: portal/trunk/component/test/jcr
___________________________________________________________________
Name: svn:ignore
+ target
Property changes on: portal/trunk/component/test/organization
___________________________________________________________________
Name: svn:ignore
+ target
14 years, 11 months
gatein SVN: r1379 - in portal/trunk/portlet/exoadmin/src/main: webapp/groovy/wsrp/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-19 11:32:39 -0500 (Tue, 19 Jan 2010)
New Revision: 1379
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
Log:
- Renamed OpenPopup action to CreateConsumer action as it is more appropriate.
- More clean-ups.
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2010-01-19 15:54:47 UTC (rev 1378)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsumerOverview.java 2010-01-19 16:32:39 UTC (rev 1379)
@@ -27,7 +27,6 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIContainer;
@@ -44,24 +43,19 @@
import java.util.List;
/** @author Wesley Hales */
-@ComponentConfigs({
- @ComponentConfig(id = "ConsumerSelector", type = UIGrid.class, template = "system:/groovy/webui/core/UIGrid.gtmpl",
- events = { //make note in doc not to put grid listeners here
- }),
- @ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
- template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl",
- events = {
- @EventConfig(listeners = UIWsrpConsumerOverview.OpenPopupActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.EditActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.DeleteActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.RefreshActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.DeactivateActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.ActivateActionListener.class),
- @EventConfig(listeners = UIWsrpConsumerOverview.RefreshGridActionListener.class)
- })
-})
+@ComponentConfig(
+ lifecycle = UIApplicationLifecycle.class,
+ template = "app:/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl",
+ events = {
+ @EventConfig(listeners = UIWsrpConsumerOverview.CreateConsumerActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.EditActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.DeleteActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.RefreshActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.DeactivateActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.ActivateActionListener.class),
+ @EventConfig(listeners = UIWsrpConsumerOverview.RefreshGridActionListener.class)
+ })
public class UIWsrpConsumerOverview extends UIContainer
{
public static String[] FIELDS = {"producerId", "active", "refreshNeeded"};
@@ -135,7 +129,7 @@
consumerEditorPopup.setUIComponent(consumerForm);
consumerEditorPopup.setRendered(false);
- UIGrid consumers = addChild(UIGrid.class, "ConsumerSelector", null);
+ UIGrid consumers = addChild(UIGrid.class, null, null);
//configure the edit and delete buttons based on an id from the data list - this will also be passed as param to listener
consumers.configure("producerId", FIELDS, SELECT_ACTIONS);
@@ -169,7 +163,7 @@
consumersIterator.setPageList(pageList);
}
- static public class OpenPopupActionListener extends EventListener<UIWsrpConsumerOverview>
+ static public class CreateConsumerActionListener extends EventListener<UIWsrpConsumerOverview>
{
public void execute(Event<UIWsrpConsumerOverview> event) throws Exception
{
Modified: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2010-01-19 15:54:47 UTC (rev 1378)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsumerOverview.gtmpl 2010-01-19 16:32:39 UTC (rev 1379)
@@ -1,10 +1,33 @@
-<div class="<%=uicomponent.getId()%>" id="<%=uicomponent.getId()%>">
+<div class="%{--
+ - 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.
+ --}%
+<%=uicomponent.getId()%>" id="<%=uicomponent.getId()%>">
+
<div class="UIAction">
<table class="ActionContainer">
<tr>
<td>
- <div onclick="<%=uicomponent.event("OpenPopup", "")%>" class="ActionButton LightBlueStyle">
+ <div onclick="<%=uicomponent.event("CreateConsumer", "")%>" class="ActionButton LightBlueStyle">
<div class="ButtonLeft">
<div class="ButtonRight">
<div class="ButtonMiddle">
14 years, 11 months
gatein SVN: r1378 - in portal/trunk: webui/core/src/main/java/org/exoplatform/webui/form and 1 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-19 10:54:47 -0500 (Tue, 19 Jan 2010)
New Revision: 1378
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
Log:
GTNPORTAL-538 : New account application replication
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java 2010-01-19 15:53:42 UTC (rev 1377)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java 2010-01-19 15:54:47 UTC (rev 1378)
@@ -19,12 +19,14 @@
package org.exoplatform.account.webui.component;
+import org.exoplatform.webui.application.replication.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
import org.exoplatform.webui.organization.UIAccountForm;
@ComponentConfig(lifecycle = UIApplicationLifecycle.class)
+@Serialized
public class UIAccountPortlet extends UIPortletApplication
{
public UIAccountPortlet() throws Exception
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java 2010-01-19 15:53:42 UTC (rev 1377)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java 2010-01-19 15:54:47 UTC (rev 1378)
@@ -20,8 +20,12 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.replication.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import java.io.Serializable;
import java.io.Writer;
import java.util.HashMap;
import java.util.List;
@@ -35,12 +39,20 @@
* minh.dang(a)exoplatform.com
* Sep 20, 2006
*/
-
+@Serialized
public class UIFormInputWithActions extends UIFormInputSet
{
+
+ /** . */
+ private static final Logger log = LoggerFactory.getLogger(UIFormInputWithActions.class);
+
Map<String, List<ActionData>> actionField = new HashMap<String, List<ActionData>>();
+ public UIFormInputWithActions()
+ {
+ }
+
public UIFormInputWithActions(String id)
{
super.setId(id);
@@ -76,7 +88,7 @@
catch (MissingResourceException ex)
{
label = inputEntry.getId();
- System.err.println("\n " + uiForm.getId() + ".label." + inputEntry.getId() + " not found value");
+ log.error("\n " + uiForm.getId() + ".label." + inputEntry.getId() + " not found value");
}
w.write("<tr>");
w.write("<td class=\"FieldLabel\">");
@@ -135,7 +147,7 @@
w.write("</div>");
}
- static public class ActionData
+ static public class ActionData implements Serializable
{
final public static int TYPE_ICON = 0;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java 2010-01-19 15:53:42 UTC (rev 1377)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java 2010-01-19 15:54:47 UTC (rev 1378)
@@ -22,6 +22,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.replication.api.annotations.Serialized;
import org.exoplatform.webui.config.InitParams;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -54,6 +55,7 @@
@EventConfig(listeners = UIAccountForm.SaveActionListener.class),
@EventConfig(listeners = UIAccountForm.ResetActionListener.class, phase = Phase.DECODE),
@EventConfig(listeners = UIAccountForm.SearchUserActionListener.class, phase = Phase.DECODE)})
+@Serialized
public class UIAccountForm extends UIFormTabPane
{
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2010-01-19 15:53:42 UTC (rev 1377)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2010-01-19 15:54:47 UTC (rev 1378)
@@ -25,6 +25,7 @@
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
+import org.exoplatform.webui.application.replication.api.annotations.Serialized;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.form.UIFormInputWithActions;
import org.exoplatform.webui.form.UIFormStringInput;
@@ -41,6 +42,7 @@
* minhdv81(a)yahoo.com
* Jun 28, 2006
*/
+@Serialized
public class UIAccountInputSet extends UIFormInputWithActions
{
@@ -50,6 +52,10 @@
final static String PASSWORD2X = "Confirmpassword";
+ public UIAccountInputSet()
+ {
+ }
+
public UIAccountInputSet(String name) throws Exception
{
super(name);
14 years, 11 months
gatein SVN: r1377 - in portal/trunk/portlet/exoadmin/src/main: webapp/groovy/wsrp/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-19 10:53:42 -0500 (Tue, 19 Jan 2010)
New Revision: 1377
Removed:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java
portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java
Log:
- Removed useless UIWsrpConsole and associated template.
Deleted: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java 2010-01-19 15:50:36 UTC (rev 1376)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpConsole.java 2010-01-19 15:53:42 UTC (rev 1377)
@@ -1,47 +0,0 @@
-/*
- * 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.exoplatform.wsrp.webui.component;
-
-import org.exoplatform.webui.config.annotation.ComponentConfig;
-import org.exoplatform.webui.core.UIContainer;
-import org.exoplatform.webui.core.UITabPane;
-import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
-
-@ComponentConfig(
- lifecycle = UIApplicationLifecycle.class,
- template = "app:/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl"
-)
-public class UIWsrpConsole extends UIContainer
-{
- public UIWsrpConsole() throws Exception
- {
- UITabPane uiTabPane = addChild(UITabPane.class, null, null);
- uiTabPane.addChild(UIWsrpConsumerOverview.class, null, "Manage Consumers");
- uiTabPane.addChild(UIWsrpProducerOverview.class, null, "Producer Configuration");
-
- if (uiTabPane.getSelectedTabId().equals(""))
- {
- uiTabPane.setSelectedTab(1);
- }
- }
-}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java 2010-01-19 15:50:36 UTC (rev 1376)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/UIWsrpPortlet.java 2010-01-19 15:53:42 UTC (rev 1377)
@@ -1,41 +1,48 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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. *
- ******************************************************************************/
+/*
+ * 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.exoplatform.wsrp.webui.component;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIPortletApplication;
+import org.exoplatform.webui.core.UITabPane;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
/** @author Wesley Hales */
@ComponentConfig(
lifecycle = UIApplicationLifecycle.class
)
-
public class UIWsrpPortlet extends UIPortletApplication
{
public UIWsrpPortlet() throws Exception
{
- addChild(UIWsrpConsole.class, null, null);
+ UITabPane uiTabPane = addChild(UITabPane.class, null, null);
+ uiTabPane.addChild(UIWsrpConsumerOverview.class, null, "Manage Consumers");
+ uiTabPane.addChild(UIWsrpProducerOverview.class, null, "Producer Configuration");
+
+ if (uiTabPane.getSelectedTabId().equals(""))
+ {
+ uiTabPane.setSelectedTab(1);
+ }
}
Deleted: portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl 2010-01-19 15:50:36 UTC (rev 1376)
+++ portal/trunk/portlet/exoadmin/src/main/webapp/groovy/wsrp/webui/component/UIWsrpConsole.gtmpl 2010-01-19 15:53:42 UTC (rev 1377)
@@ -1,3 +0,0 @@
-
-
-<% uicomponent.renderChildren(); %>
14 years, 11 months
gatein SVN: r1376 - portal/branches.
by do-not-reply@jboss.org
Author: mpodolin
Date: 2010-01-19 10:50:36 -0500 (Tue, 19 Jan 2010)
New Revision: 1376
Added:
portal/branches/EPP_5_0_0_ER02_Branch/
Log:
Creating a branch of the 3.0.0-Beta05
Copied: portal/branches/EPP_5_0_0_ER02_Branch (from rev 1375, portal/tags/3.0.0-Beta05)
14 years, 11 months
gatein SVN: r1375 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2010-01-19 10:46:49 -0500 (Tue, 19 Jan 2010)
New Revision: 1375
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
Log:
GTNPORTAL-307: Support for derivated languages (French from France, French from Canada...)
Wrong display of languages in the form
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-01-19 15:44:34 UTC (rev 1374)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-01-19 15:46:49 UTC (rev 1375)
@@ -62,21 +62,17 @@
{
LocaleConfig localeConfig = (LocaleConfig)object;
Locale locale = localeConfig.getLocale();
- String displayName = locale.getDisplayLanguage(currentLocale);
+ String displayName = capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale));
String lang = locale.getLanguage();
String country = locale.getCountry();
- String localedName;
+ String localedName = capitalizeFirstLetter(locale.getDisplayLanguage(locale));;
if (country != null && country.length() > 0)
{
- localedName =
- capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale) + " (" + locale.getDisplayCountry(currentLocale) + ")");
+ displayName = capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale)) + " - " + capitalizeFirstLetter(locale.getDisplayCountry(currentLocale));
+ localedName = capitalizeFirstLetter(locale.getDisplayLanguage(locale)) + " - " + capitalizeFirstLetter(locale.getDisplayCountry(locale));
lang = lang + "_" + country;
}
- else
- {
- localedName = capitalizeFirstLetter(locale.getDisplayLanguage(currentLocale));
- }
if (localedName == null || localedName.length() == 0)
localedName = "???";
14 years, 11 months
gatein SVN: r1374 - portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm.
by do-not-reply@jboss.org
Author: bdaw
Date: 2010-01-19 10:44:34 -0500 (Tue, 19 Jan 2010)
New Revision: 1374
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
Log:
- small bug
Modified: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2010-01-19 15:19:58 UTC (rev 1373)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2010-01-19 15:44:34 UTC (rev 1374)
@@ -414,11 +414,22 @@
if (parents.size() == 0)
{
+
+ String id = orgService.getConfiguration().getParentId(jbidGroup.getGroupType());
+
+ if (id != null && orgService.getConfiguration().isForceMembershipOfMappedTypes())
+ {
+ if (id.endsWith("/*"))
+ {
+ id = id.substring(0, id.length() - 2);
+ }
+
+ return id + jbidGroup.getName();
+ }
+
//As there is special root group this shouldn't happen:
throw new IllegalStateException("Group present that is not connected to the root: " + jbidGroup.getName());
- // This group is at the root
- //return "/" + groupName;
}
String parentGroupId = getGroupId(((org.picketlink.idm.api.Group)parents.iterator().next()));
14 years, 11 months