JBoss Portal SVN: r13277 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium: cms and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-04-28 04:23:18 -0400 (Tue, 28 Apr 2009)
New Revision: 13277
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
Log:
[selenium] - errors fixes
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-04-27 19:01:13 UTC (rev 13276)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-04-28 08:23:18 UTC (rev 13277)
@@ -55,19 +55,23 @@
* Generic timeout in miliseconds used in every selenium function
* waitForPageToLoad()}
*/
- public static final String PAGE_LOAD = "180000";
+ public static String PAGE_LOAD = "180000";
/** Generic timeout in miliseconds used for AJAX timeouts } */
- public static final long AJAX_LOAD = 3000;
+ public static long AJAX_LOAD = 3000;
// protected static final String PAGE_LOAD = "60000";
// protected static final long AJAX_LOAD = 2000;
/** Element timeout in seconds used in waitForElement functions */
- public static final int ELEM_TIMEOUT = 220;
+ public static int ELEM_TIMEOUT = 220;
@BeforeClass
protected void setupChromeForLogin() throws Exception {
-
+
+ PAGE_LOAD = getMess("selenium.timeout.page", PAGE_LOAD);
+ AJAX_LOAD = Integer.valueOf(getMess("selenium.timeout.elem", String.valueOf(AJAX_LOAD)));
+ ELEM_TIMEOUT = Integer.valueOf(getMess("selenium.timeout.elem", String.valueOf(ELEM_TIMEOUT+"")));
+
String browser = System.getProperty("browser");
selenium = new DefaultSelenium("127.0.0.1", 44444, browser, "http://localhost:8080/portal/");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-27 19:01:13 UTC (rev 13276)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-28 08:23:18 UTC (rev 13277)
@@ -1,3 +1,8 @@
+selenium.timeout.page=180000
+selenium.timeout.ajax=3000
+selenium.timeout.elem=220
+
+
cms.sec.denied=You are not allowed to access the resource
samples.ajax.p3.l3=$256.00
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-04-27 19:01:13 UTC (rev 13276)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-04-28 08:23:18 UTC (rev 13277)
@@ -269,7 +269,6 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
- System.out.println(MSG_ACCESS_DENIED);
Assert.assertTrue(selenium.isTextPresent(MSG_ACCESS_DENIED), "Secured resource is visible after logout.");
login("user", "user");
@@ -464,7 +463,6 @@
selenium.waitForPageToLoad(PAGE_LOAD);
// selenium.setSpeed("5000");
selenium.type(INP_SEARCH_USER, username);
- // System.out.println(SUB_SEARCH_USER);
selenium.click(SUB_SEARCH_USER);
try {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-04-27 19:01:13 UTC (rev 13276)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-04-28 08:23:18 UTC (rev 13277)
@@ -577,7 +577,7 @@
samples.ajax.pub.div.3.juu=//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input
samples.ajax.pub.div.2.juu=juu
samples.ajax.pub.div.2.foo=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input
-samples.ajax.pub.div.1.bar=barsamples.url.lnk=link=URL portlet
+samples.ajax.pub.div.1.bar=//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/input
samples.ajax.pub.div.1.foo=foo
samples.ajax.pub.lnk=//ul[@id='tabsHeader']/li[4]/ul/li[12]/a
samples.ajax.pevt.div.p3.max=//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a
@@ -626,8 +626,7 @@
samples.ajax.enc.inp.act=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div/form[2]/input
samples.ajax.enc.textarea2=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/textarea
samples.ajax.enc.textarea1=//textarea[@name='text']
-samples.ajax.char.all.sub.check=//hsamples.url.lnk=link=URL portlet
-
+samples.ajax.char.all.sub.check=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[8]/form/input[3]
samples.ajax.char.inp.text.sub.check=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[6]/form/input[4]
samples.ajax.char.lnk.textarea.check=//input[@value='check']
samples.ajax.char.inp.text=//input[@name='text']
15 years
JBoss Portal SVN: r13276 - in modules/jopr-plugin/trunk: plugin/src/main/resources/META-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-04-27 15:01:13 -0400 (Mon, 27 Apr 2009)
New Revision: 13276
Added:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java
Modified:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java
Log:
- Added support for displaying portlet information.
- Extracted Portal management proxy creation to PortalServer.
Modified: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -25,7 +25,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.portal.jems.as.JMX;
import org.jboss.portal.management.Portal;
import org.jboss.portal.management.PortalServer;
import org.rhq.core.domain.configuration.Configuration;
@@ -60,10 +59,8 @@
EventContext eventContext;
- private static final String PORTAL_MANAGEMENT_SERVICE = "portal.management:service=Management,type=Portal,name=Default";
private Portal portal;
-
/**
* Return availability of this resource
*
@@ -85,18 +82,11 @@
Configuration conf = context.getPluginConfiguration();
- try
- {
- portal = (Portal)JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
- }
- catch (Exception e)
- {
- log.info("Failed to start PortalComponent: " + e.getLocalizedMessage(), e);
- }
+ portal = PortalServer.getPortalManagement();
/*eventContext = context.getEventContext();
- PortalEventPoller eventPoller = new PortalEventPoller();
- eventContext.registerEventPoller(eventPoller, 60);*/
+ PortalEventPoller eventPoller = new PortalEventPoller();
+ eventContext.registerEventPoller(eventPoller, 60);*/
}
Added: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java (rev 0)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletComponent.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -0,0 +1,115 @@
+/******************************************************************************
+ * 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.jboss.portal.jopr;
+
+import org.jboss.portal.management.Portal;
+import org.jboss.portal.management.PortalServer;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+import org.rhq.core.domain.measurement.AvailabilityType;
+import org.rhq.core.domain.measurement.MeasurementDataNumeric;
+import org.rhq.core.domain.measurement.MeasurementReport;
+import org.rhq.core.domain.measurement.MeasurementScheduleRequest;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceComponent;
+import org.rhq.core.pluginapi.inventory.ResourceContext;
+import org.rhq.core.pluginapi.measurement.MeasurementFacet;
+
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class PortletComponent implements ResourceComponent, MeasurementFacet
+{
+ private LocalPortletManagementMBean portlet;
+ private final static Portal portal;
+
+ static
+ {
+ portal = PortalServer.getPortalManagement();
+ }
+
+ public void start(ResourceContext resourceContext) throws InvalidPluginConfigurationException, Exception
+ {
+ portlet = portal.getRegisteredPortletManagements().get(resourceContext.getResourceKey());
+ }
+
+ public void stop()
+ {
+ //To change body of implemented methods use File | Settings | File Templates.
+ }
+
+ public AvailabilityType getAvailability()
+ {
+ return AvailabilityType.UP;
+ }
+
+ public void getValues(MeasurementReport report, Set<MeasurementScheduleRequest> metrics) throws Exception
+ {
+ for (MeasurementScheduleRequest req : metrics)
+ {
+ if (req.getName().equals("actionErrorCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getActionErrorCount());
+ report.addData(res);
+ }
+ else if (req.getName().equals("actionRequestCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getActionRequestCount());
+ report.addData(res);
+ }
+ else if (req.getName().equals("averageActionTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getAverageActionTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("averageRenderTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getAverageRenderTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("maxActionTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getMaxActionTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("maxRenderTime"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getMaxRenderTime());
+ report.addData(res);
+ }
+ else if (req.getName().equals("renderErrorCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getRenderErrorCount());
+ report.addData(res);
+ }
+ else if (req.getName().equals("renderRequestCount"))
+ {
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portlet.getRenderRequestCount());
+ report.addData(res);
+ }
+ }
+ }
+}
Added: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java (rev 0)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortletDiscovery.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.jboss.portal.jopr;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.portal.management.PortalServer;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
+import org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
+import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class PortletDiscovery implements ResourceDiscoveryComponent
+{
+ private final Log log = LogFactory.getLog(this.getClass());
+
+ public Set discoverResources(ResourceDiscoveryContext discoveryContext) throws InvalidPluginConfigurationException, Exception
+ {
+ if (PortalServer.isRunning())
+ {
+
+ Map<String, LocalPortletManagementMBean> portlets = PortalServer.getPortalManagement().getRegisteredPortletManagements();
+
+
+ if (portlets.isEmpty())
+ {
+ return Collections.emptySet();
+ }
+
+ Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>(portlets.size());
+
+ for (String portletName : portlets.keySet())
+ {
+
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), portletName,
+ portletName, "N/A", "Monitoring of Portlet " + portletName, null, null);
+
+
+ // Add to return values
+ discoveredResources.add(detail);
+ log.info("Discovered new portlet: " + portletName);
+ }
+
+ return discoveredResources;
+ }
+
+ return Collections.emptySet();
+ }
+}
Modified: modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-27 19:01:13 UTC (rev 13276)
@@ -1,24 +1,24 @@
<?xml version="1.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
+ ~ 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. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -33,9 +33,7 @@
<server name="portal-jopr-plugin"
discovery="PortalDiscovery"
class="PortalComponent"
- singleton="true"
- supportsManualAdd="true"
- createDeletePolicy="both">
+ singleton="true">
<!--<plugin-configuration>
--><!-- TODO add your own here --><!--
@@ -46,14 +44,26 @@
<metric property="portletNumber" displayName="Display the number of currently deployed portlets"/>
+ <service name="Portlet" class="PortletComponent" discovery="PortletDiscovery">
+ <metric property="averageRenderTime" displayName="Average render time" units="milliseconds"/>
+ <metric property="averageActionTime" displayName="Average action time" units="milliseconds"/>
+ <metric property="maxRenderTime" displayName="Maximum render time" units="milliseconds"/>
+ <metric property="maxActionTime" displayName="Maximum action time" units="milliseconds"/>
+ <metric property="renderRequestCount" displayName="Number of render requests" measurementType="trendsup"
+ units="none"/>
+ <metric property="actionRequestCount" displayName="Number of action requests" measurementType="trendsup"
+ units="none"/>
+ <metric property="renderErrorCount" displayName="Number of render errors" measurementType="trendsup"
+ units="none"/>
+ <metric property="actionErrorCount" displayName="Number of action errors" measurementType="trendsup"
+ units="none"/>
+ </service>
+
+
<!--<event name="portal-jopr-pluginDummyEvent"/>-->
<!--<resource-configuration>
--><!-- TODO supply your configuration parameters --><!--
</resource-configuration>-->
-
-
</server>
-
-
</plugin>
\ No newline at end of file
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/Portal.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * 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. *
@@ -22,7 +22,8 @@
******************************************************************************/
package org.jboss.portal.management;
-import javax.management.ObjectName;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+
import java.util.Map;
/**
@@ -34,5 +35,5 @@
public int getNbInstances();
- Map<String, ObjectName> getRegisteredPortletMappings();
+ Map<String, LocalPortletManagementMBean> getRegisteredPortletManagements();
}
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -20,12 +20,13 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
* 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
******************************************************************************/
+
package org.jboss.portal.management;
import org.jboss.portal.core.impl.model.instance.InstanceContainerContext;
import org.jboss.portal.jems.as.system.AbstractJBossService;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
-import javax.management.ObjectName;
import javax.naming.InitialContext;
import javax.transaction.UserTransaction;
import java.util.Map;
@@ -60,8 +61,17 @@
return nbInstances;
}
- public Map<String, ObjectName> getRegisteredPortletMappings()
+ public Map<String, LocalPortletManagementMBean> getRegisteredPortletManagements()
{
+ try
+ {
+ discoveryService.processPortletDiscovery();
+ }
+ catch (Exception e)
+ {
+ log.debug(e);
+ log.info("Could not refresh list of portlets: " + e.getLocalizedMessage());
+ }
return discoveryService.getRegisteredPortlets();
}
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -23,6 +23,8 @@
package org.jboss.portal.management;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.portal.jems.as.JMX;
import org.jboss.portal.server.Server;
@@ -37,6 +39,11 @@
*/
public class PortalServer
{
+ private static final Log log = LogFactory.getLog(PortalServer.class);
+
+ private static final String PORTAL_MANAGEMENT_SERVICE = "portal.management:service=Management,type=Portal,name=Default";
+ private static Portal portal;
+
private static final String PORTAL_SERVICE_SERVER = "portal:service=Server";
private static Server portalServer;
@@ -46,7 +53,15 @@
static
{
- portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
+ try
+ {
+ portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
+ portal = (Portal)JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
+ }
+ catch (Exception e)
+ {
+ log.info("Failed to start PortalComponent: " + e.getLocalizedMessage(), e);
+ }
}
public static boolean isRunning()
@@ -83,4 +98,9 @@
return portalServer.getVersion().toString();
}
+
+ public static Portal getPortalManagement()
+ {
+ return portal;
+ }
}
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -23,7 +23,8 @@
package org.jboss.portal.management;
-import javax.management.ObjectName;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
+
import java.util.Map;
/**
@@ -34,5 +35,5 @@
{
void processPortletDiscovery() throws Exception;
- Map<String, ObjectName> getRegisteredPortlets();
+ Map<String, LocalPortletManagementMBean> getRegisteredPortlets();
}
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-04-27 15:51:21 UTC (rev 13275)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-04-27 19:01:13 UTC (rev 13276)
@@ -27,6 +27,7 @@
import org.jboss.portal.portlet.federation.FederatedPortletInvoker;
import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import org.jboss.portal.portlet.management.LocalPortletManagement;
+import org.jboss.portal.portlet.management.LocalPortletManagementMBean;
import org.jboss.portal.portlet.management.PortletContainerManagementInterceptor;
import org.jboss.system.ServiceMBeanSupport;
@@ -45,7 +46,8 @@
private FederatingPortletInvoker federatingPortletInvoker;
- private Map<String, ObjectName> registeredPortlets = new HashMap<String, ObjectName>();
+ private Map<String, ObjectName> registeredPortletsNames = new HashMap<String, ObjectName>();
+ private Map<String, LocalPortletManagementMBean> registeredPortlets = new HashMap<String, LocalPortletManagementMBean>();
public void start()
{
@@ -61,7 +63,7 @@
public void stop()
{
- for (ObjectName objectName : registeredPortlets.values())
+ for (ObjectName objectName : registeredPortletsNames.values())
{
try
{
@@ -72,7 +74,7 @@
e.printStackTrace();
}
}
- if (registeredPortlets.size() != 0)
+ if (registeredPortletsNames.size() != 0)
{
log.error("Unable to remove all the Portlet management MBeans");
}
@@ -109,7 +111,7 @@
}
}
- public Map<String, ObjectName> getRegisteredPortlets()
+ public Map<String, LocalPortletManagementMBean> getRegisteredPortlets()
{
return Collections.unmodifiableMap(registeredPortlets);
}
@@ -120,13 +122,11 @@
{
String portletId = portlet.getContext().getId();
- boolean used = interceptor.getPortletInfo(portletId).isUsed();
- if ((!registeredPortlets.containsKey(portletId)) && (used))
+ if (!registeredPortletsNames.containsKey(portletId))
{
try
{
- ObjectName objectName = createManagementMBean(portlet, wsrp);
- registeredPortlets.put(portletId, objectName);
+ registerPortlet(portlet, wsrp);
}
catch (Exception e)
{
@@ -136,9 +136,9 @@
}
}
- private ObjectName createManagementMBean(Portlet portlet, boolean wsrp) throws Exception
+ private ObjectName registerPortlet(Portlet portlet, boolean wsrp) throws Exception
{
- Object management;
+ LocalPortletManagementMBean management;
if (wsrp)
{
management = new WSRPPortletManagement(portlet, interceptor);
@@ -150,6 +150,10 @@
String id = portlet.getContext().getId();
ObjectName objectName = new ObjectName(getMBeanName(id, wsrp));
getServer().registerMBean(management, objectName);
+
+ registeredPortletsNames.put(id, objectName);
+ registeredPortlets.put(id, management);
+
log.debug("Registered Management MBean for: " + id);
return objectName;
}
15 years
JBoss Portal SVN: r13275 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-04-27 11:51:21 -0400 (Mon, 27 Apr 2009)
New Revision: 13275
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
Log:
[selenium] - assert in assert properties fixed
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-27 15:39:30 UTC (rev 13274)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-27 15:51:21 UTC (rev 13275)
@@ -1,4 +1,4 @@
-cms.sec.denied=Access to this resource is denied
+cms.sec.denied=You are not allowed to access the resource
samples.ajax.p3.l3=$256.00
samples.ajax.p3.l2=SANTA CRUZ ALLSTAR
15 years
JBoss Portal SVN: r13274 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-04-27 11:39:30 -0400 (Mon, 27 Apr 2009)
New Revision: 13274
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
Log:
[JBPORTAL-2313] - selenium; url test, ajax and static, addded
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java 2009-04-27 10:59:14 UTC (rev 13273)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java 2009-04-27 15:39:30 UTC (rev 13274)
@@ -154,6 +154,21 @@
private final String CACHE_DIV_1_RENDER = getLoc(casePfx + "cache.div.1.render",
"//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
+ private final String URL_LNK = getLoc(casePfx + "url.lnk", "");
+ private final String URL_INP_NAME1 = getLoc(casePfx + "url.inp.name1", "");
+ private final String URL_INP_VALUE1 = getLoc(casePfx + "url.inp.value1", "");
+ private final String URL_SUB1 = getLoc(casePfx + "url.sub1", "");
+ private final String URL_DIV1 = getLoc(casePfx + "url.div1", "");
+ private final String URL_LNK1_R = getLoc(casePfx + "url.lnk1.red", "");
+ private final String URL_LNK1_B = getLoc(casePfx + "url.lnk1.blue", "");
+ private final String URL_LNK1_W = getLoc(casePfx + "url.lnk1.white", "");
+ private final String URL_INP_NAME2 = getLoc(casePfx + "url.inp.name2", "");
+ private final String URL_INP_VALUE2 = getLoc(casePfx + "url.inp.value2", "");
+ private final String URL_SUB2 = getLoc(casePfx + "url.sub2", "");
+ private final String URL_DIV2 = getLoc(casePfx + "url.div2", "");
+ private final String URL_LNK2_R = getLoc(casePfx + "url.lnk2.red", "");
+ private final String URL_LNK2_B = getLoc(casePfx + "url.lnk2.blue", "");
+ private final String URL_LNK2_W = getLoc(casePfx + "url.lnk2.white", "");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
selenium.open("/portal/portal/default/default");
@@ -539,12 +554,27 @@
}
/**
- * Url portlet test.
+ * Url portlet test. Fills in the two input boxes with "name" and "viliam" values. Then it clicks on the "red" link in the second box. Finally, it is asserted
+ * that the table in the second portlet is red and values are filled right as they were before clicking the "red" link.
*/
- // TODO enable test - more information needed
- @Test(enabled = false)
+ @Test(enabled = true)
public void urlPortletTest() {
+ selenium.click(URL_LNK);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ selenium.type(URL_INP_NAME1, "name");
+ selenium.type(URL_INP_VALUE1, "viliam");
+
+ assertTrue(selenium.isElementPresent(URL_DIV2));
+
+ selenium.click(URL_LNK2_R);
+ waitFor(AJAX_TIMEOUT);
+
+ assertTrue(selenium.isElementPresent(URL_DIV2));
+
+ assertEquals(selenium.getValue(URL_INP_NAME1), "name");
+ assertEquals(selenium.getValue(URL_INP_VALUE1), "viliam");
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java 2009-04-27 10:59:14 UTC (rev 13273)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java 2009-04-27 15:39:30 UTC (rev 13274)
@@ -132,7 +132,23 @@
private final String CACHE_LNK_1ACT = getLoc(casePfx + "cache.lnk.1act", "link=action");
private final String CACHE_2RENDER = getLoc(casePfx + "cache.2render", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[2]/div");
private final String CACHE_1RENDER = getLoc(casePfx + "cache.1render", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/div[2]/div");
-
+
+ private final String URL_LNK = getLoc(casePfx + "url.lnk", "");
+ private final String URL_INP_NAME1 = getLoc(casePfx + "url.inp.name1", "");
+ private final String URL_INP_VALUE1 = getLoc(casePfx + "url.inp.value1", "");
+ private final String URL_SUB1 = getLoc(casePfx + "url.sub1", "");
+ private final String URL_DIV1 = getLoc(casePfx + "url.div1", "");
+ private final String URL_LNK1_R = getLoc(casePfx + "url.lnk1.red", "");
+ private final String URL_LNK1_B = getLoc(casePfx + "url.lnk1.blue", "");
+ private final String URL_LNK1_W = getLoc(casePfx + "url.lnk1.white", "");
+ private final String URL_INP_NAME2 = getLoc(casePfx + "url.inp.name2", "");
+ private final String URL_INP_VALUE2 = getLoc(casePfx + "url.inp.value2", "");
+ private final String URL_SUB2 = getLoc(casePfx + "url.sub2", "");
+ private final String URL_DIV2 = getLoc(casePfx + "url.div2", "");
+ private final String URL_LNK2_R = getLoc(casePfx + "url.lnk2.red", "");
+ private final String URL_LNK2_B = getLoc(casePfx + "url.lnk2.blue", "");
+ private final String URL_LNK2_W = getLoc(casePfx + "url.lnk2.white", "");
+
/**
* Login before test.
*/
@@ -545,12 +561,30 @@
}
/**
- * Url portlet test.
+ * Url portlet test. Fills in the two input boxes with "name" and "viliam" values. Then it clicks on the "red" link in the second box. Finally, it is asserted
+ * that the table in the second portlet is red and values are filled right as they were before clicking the "red" link.
*/
// TODO enable test - more information needed
- @Test(enabled = false)
+ @Test(enabled = true)
public void urlPortletTest() {
+ selenium.click(URL_LNK);
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ selenium.type(URL_INP_NAME1, "name");
+ selenium.type(URL_INP_VALUE1, "viliam");
+
+ assertTrue(selenium.isElementPresent(URL_DIV2));
+
+ selenium.click(URL_LNK2_R);
+
+ selenium.waitForPageToLoad(PAGE_LOAD);
+
+ assertTrue(selenium.isElementPresent(URL_DIV2));
+
+ assertEquals(selenium.getValue(URL_INP_NAME1), "");
+ assertEquals(selenium.getValue(URL_INP_VALUE1), "");
+
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-04-27 10:59:14 UTC (rev 13273)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/locator.properties 2009-04-27 15:39:30 UTC (rev 13274)
@@ -533,6 +533,22 @@
samples.cache.2render=//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[2]/div
samples.cache.1render=//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/div[2]/div
+samples.url.lnk=link=URL portlet
+samples.url.inp.name1=name
+samples.url.inp.value1=value
+samples.url.sub1=
+samples.url.div1=
+samples.url.lnk1.blue
+samples.url.lnk1.red=
+samples.url.lnk1.white
+samples.url.inp.name2=
+samples.url.inp.value2=
+samples.url.sub2=
+samples.url.div2=//html/body/div[2]/div/div/div[2]/div[2]/div[2]/table/tbody/tr[2]/td[2]/div/table
+samples.url.lnk2.blue=
+samples.url.lnk2.red=//html/body/div[2]/div/div/div[2]/div[2]/div[2]/table/tbody/tr[2]/td[2]/div/a[2]
+samples.url.lnk2.white=
+
# PortalAjaxSamplesTestCase
samples.ajax.ses.lnk.invalidate=link=invalidate
@@ -561,7 +577,7 @@
samples.ajax.pub.div.3.juu=//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input
samples.ajax.pub.div.2.juu=juu
samples.ajax.pub.div.2.foo=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input
-samples.ajax.pub.div.1.bar=bar
+samples.ajax.pub.div.1.bar=barsamples.url.lnk=link=URL portlet
samples.ajax.pub.div.1.foo=foo
samples.ajax.pub.lnk=//ul[@id='tabsHeader']/li[4]/ul/li[12]/a
samples.ajax.pevt.div.p3.max=//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a
@@ -610,7 +626,8 @@
samples.ajax.enc.inp.act=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div/form[2]/input
samples.ajax.enc.textarea2=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/textarea
samples.ajax.enc.textarea1=//textarea[@name='text']
-samples.ajax.char.all.sub.check=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[8]/form/input[3]
+samples.ajax.char.all.sub.check=//hsamples.url.lnk=link=URL portlet
+
samples.ajax.char.inp.text.sub.check=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[6]/form/input[4]
samples.ajax.char.lnk.textarea.check=//input[@value='check']
samples.ajax.char.inp.text=//input[@name='text']
@@ -626,3 +643,19 @@
samples.ajax.cache.lnk.1act=link=action
samples.ajax.cache.div.2.render=//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div
samples.ajax.cache.div.1.render=//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div
+
+samples.ajax.url.lnk=//ul[@id='tabsHeader']/li[4]/ul/li[15]/a
+samples.ajax.url.inp.name1=name
+samples.ajax.url.inp.value1=value
+samples.ajax.url.sub1=
+samples.ajax.url.div1=
+samples.ajax.url.lnk1.blue
+samples.ajax.url.lnk1.red=
+samples.ajax.url.lnk1.white
+samples.ajax.url.inp.name2=
+samples.ajax.url.inp.value2=
+samples.ajax.url.sub2=
+samples.ajax.url.div2=//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/table
+samples.ajax.url.lnk2.blue=
+samples.ajax.url.lnk2.red=//div[contains(@id,'expander')]/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/a[2]
+samples.ajax.url.lnk2.white=
\ No newline at end of file
15 years
JBoss Portal SVN: r13273 - modules/jopr-plugin/trunk/plugin.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-04-27 06:59:14 -0400 (Mon, 27 Apr 2009)
New Revision: 13273
Modified:
modules/jopr-plugin/trunk/plugin/pom.xml
Log:
- Renamed artifact to jopr-jboss-portal-plugin to be more in sync with conventions.
Modified: modules/jopr-plugin/trunk/plugin/pom.xml
===================================================================
--- modules/jopr-plugin/trunk/plugin/pom.xml 2009-04-27 10:34:53 UTC (rev 13272)
+++ modules/jopr-plugin/trunk/plugin/pom.xml 2009-04-27 10:59:14 UTC (rev 13273)
@@ -1,3 +1,26 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
<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">
<parent>
@@ -7,7 +30,7 @@
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>plugin</artifactId>
+ <artifactId>jopr-jboss-portal-plugin</artifactId>
<packaging>jar</packaging>
<name>JBoss Portal JOPR Plugin</name>
15 years
JBoss Portal SVN: r13272 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-04-27 06:34:53 -0400 (Mon, 27 Apr 2009)
New Revision: 13272
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
Log:
[selenium] - portal samples tests fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java 2009-04-27 10:18:18 UTC (rev 13271)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/CoordinationSamplesFullTestCase.java 2009-04-27 10:34:53 UTC (rev 13272)
@@ -7,8 +7,6 @@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-import com.sun.corba.se.impl.protocol.giopmsgheaders.Message;
-
@Test(groups = { "coordination_samples" }, enabled = false)
public class CoordinationSamplesFullTestCase extends JBossPortalSeleniumTestCase {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java 2009-04-27 10:18:18 UTC (rev 13271)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java 2009-04-27 10:34:53 UTC (rev 13272)
@@ -5,114 +5,155 @@
import org.testng.annotations.Test;
import static org.testng.Assert.*;
-
/**
- * The Class PortalAjaxSamplesTestCase is used for testing of ajax line of portlets from portal-basic-samples.sar.
+ * The Class PortalAjaxSamplesTestCase is used for testing of ajax line of
+ * portlets from portal-basic-samples.sar.
*/
@Test(groups = { "test_samples" }, enabled = true)
public class PortalAjaxSamplesTestCase extends JBossPortalSeleniumTestCase {
/** The AJAX_ timeout. */
public static long AJAX_TIMEOUT = 10000;
-
- /** prefix for locator properties = samples.ajax.*/
+
+ /** prefix for locator properties = samples.ajax. */
public static String casePfx = "samples.ajax.";
-
- private final String SES_LNK_INVALIDATE = getLoc(casePfx+"ses.lnk.invalidate","link=invalidate");
- private final String RES_DIV_RTEXT = getLoc(casePfx+"res.div.rtext","repeat-text");
- private final String RES_DIV_PTEXT = getLoc(casePfx+"res.div.ptext","product-text");
- private final String RES_LNK_P3 = getLoc(casePfx+"res.lnk.p3","link=Product3");
- private final String RES_LNK_P2 = getLoc(casePfx+"res.lnk.p2","link=Product2");
- private final String RES_LNK_P1 = getLoc(casePfx+"res.lnk.p1","link=Product1");
- private final String RES_INP = getLoc(casePfx+"res.inp","repeat");
- private final String RES_LNK = getLoc(casePfx+"res.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[17]/a");
- private final String WIN_DIV_CON = getLoc(casePfx+"win.div.con","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String WIN_LNK = getLoc(casePfx+"win.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[16]/a");
- private final String SES_TAB_PSCOPE = getLoc(casePfx+"ses.tab.pscope","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table");
- private final String SES_TAB_ASCOPE = getLoc(casePfx+"ses.tab.ascope","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table[2]");
- private final String SES_SUB_ASCOPE = getLoc(casePfx+"ses.sub.ascope","application");
- private final String SES_SUB_PSCOPE = getLoc(casePfx+"ses.sub.pscope","portlet");
- private final String SES_INP_VAL = getLoc(casePfx+"ses.inp.val","value");
- private final String SES_INP_NAM = getLoc(casePfx+"ses.inp.nam","name");
- private final String SES_LNK = getLoc(casePfx+"ses.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[14]/a");
- private final String PUB_1_LNK_FOO_REM = getLoc(casePfx+"pub.1.lnk.foo.rem","//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
- private final String PUB_3_LNK_BAR_REM = getLoc(casePfx+"pub.3.lnk.bar.rem","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/a");
- private final String PUB_3_LNK_JUU_REM = getLoc(casePfx+"pub.3.lnk.juu.rem","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
- private final String PUB_SUB_2 = getLoc(casePfx+"pub.sub.2","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[3]/td/input");
- private final String PUB_SUB_1 = getLoc(casePfx+"pub.sub.1","//input[@value='Update']");
- private final String PUB_DIV_3_BAR = getLoc(casePfx+"pub.div.3.bar","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/input");
- private final String PUB_DIV_3_JUU = getLoc(casePfx+"pub.div.3.juu","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
- private final String PUB_DIV_2_JUU = getLoc(casePfx+"pub.div.2.juu","juu");
- private final String PUB_DIV_2_FOO = getLoc(casePfx+"pub.div.2.foo","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
- private final String PUB_DIV_1_BAR = getLoc(casePfx+"pub.div.1.bar","bar");
- private final String PUB_DIV_1_FOO = getLoc(casePfx+"pub.div.1.foo","foo");
- private final String PUB_LNK = getLoc(casePfx+"pub.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[12]/a");
- private final String PEVT_DIV_P3_MAX = getLoc(casePfx+"pevt.div.p3.max","//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_P2_MAX = getLoc(casePfx+"pevt.div.p2.max","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_L3_MAX = getLoc(casePfx+"pevt.div.l3.max","//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_L2_MAX = getLoc(casePfx+"pevt.div.l2.max","//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_P3 = getLoc(casePfx+"pevt.div.p3","//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_P2 = getLoc(casePfx+"pevt.div.p2","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_P1 = getLoc(casePfx+"pevt.div.p1","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_L3 = getLoc(casePfx+"pevt.div.l3","//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_L2 = getLoc(casePfx+"pevt.div.l2","//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_L1 = getLoc(casePfx+"pevt.div.l1","//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_LNK = getLoc(casePfx+"pevt.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[11]/a");
- private final String MOD_DIV_CON = getLoc(casePfx+"mod.div.con","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String MOD_LNK = getLoc(casePfx+"mod.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[10]/a");
- private final String MPOR_DIV_CON = getLoc(casePfx+"mpor.div.con","content-container");
- private final String MPOR_LNK = getLoc(casePfx+"mpor.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[9]/a");
- private final String MINS_DIV_CON = getLoc(casePfx+"mins.div.con","content-container");
- private final String MINS_LNK = getLoc(casePfx+"mins.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[8]/a");
- private final String JS_LNK_SUBMIT = getLoc(casePfx+"js.lnk.submit","link=submit");
- private final String JS_OPT_3 = getLoc(casePfx+"js.opt.3","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[3]");
- private final String JS_OPT_2 = getLoc(casePfx+"js.opt.2","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[2]");
- private final String JS_OPT_1 = getLoc(casePfx+"js.opt.1","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[1]");
- private final String JS_LAB_C = getLoc(casePfx+"js.lab.c","label=C");
- private final String JS_LAB_B = getLoc(casePfx+"js.lab.b","label=B");
- private final String JS_LAB_A = getLoc(casePfx+"js.lab.a","label=A");
- private final String JS_SEL_LETTER = getLoc(casePfx+"js.sel.letter","//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]");
- private final String JS_LNK = getLoc(casePfx+"js.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[7]/a");
- private final String HEAD_INP_CONTENT = getLoc(casePfx+"head.inp.content","Introducing-HeaderContentInput");
- private final String HEAD_DIV_CONTENT = getLoc(casePfx+"head.div.content","Introducing-HeaderContent");
- private final String HEAD_LNK = getLoc(casePfx+"head.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[6]/a");
- private final String EXC_LNK_PORTLET = getLoc(casePfx+"exc.lnk.portlet","link=render PortletException");
- private final String EXC_LNK = getLoc(casePfx+"exc.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[5]/a");
- private final String EVT_SUB_COLOR = getLoc(casePfx+"evt.sub.color","//input[@type='submit']");
- private final String EVT_DIV_BLACK = getLoc(casePfx+"evt.div.black","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'black')]");
- private final String EVT_DIV_RED = getLoc(casePfx+"evt.div.red","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'red')]");
- private final String EVT_DIV_BLUE = getLoc(casePfx+"evt.div.blue","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'blue')]");
- private final String EVT_SEL_LAB_BLACK = getLoc(casePfx+"evt.sel.lab.black","label=black");
- private final String EVT_SEL_LAB_RED = getLoc(casePfx+"evt.sel.lab.red","label=red");
- private final String EVT_SEL_LAB_BLUE = getLoc(casePfx+"evt.sel.lab.blue","label=blue");
- private final String EVT_SEL_COL = getLoc(casePfx+"evt.sel.col","color");
- private final String EVT_LNK = getLoc(casePfx+"evt.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[4]/a");
- private final String ENC_LNK = getLoc(casePfx+"enc.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[3]/a");
- private final String ENC_INP_REN = getLoc(casePfx+"enc.inp.ren","text");
- private final String ENC_SUB_ACT = getLoc(casePfx+"enc.sub.act","//input[@value='Submit to action phase']");
- private final String ENC_INP_ACT = getLoc(casePfx+"enc.inp.act","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div/form[2]/input");
- private final String ENC_TEXTAREA2 = getLoc(casePfx+"enc.textarea2","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/textarea");
- private final String ENC_TEXTAREA1 = getLoc(casePfx+"enc.textarea1","//textarea[@name='text']");
- private final String CHAR_ALL_SUB_CHECK = getLoc(casePfx+"char.all.sub.check","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[8]/form/input[3]");
- private final String CHAR_INP_TEXT_SUB_CHECK = getLoc(casePfx+"char.inp.text.sub.check","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[6]/form/input[4]");
- private final String CHAR_LNK_TEXTAREA_CHECK = getLoc(casePfx+"char.lnk.textarea.check","//input[@value='check']");
- private final String CHAR_INP_TEXT = getLoc(casePfx+"char.inp.text","//input[@name='text']");
- private final String CHAR_TEXTAREA = getLoc(casePfx+"char.textarea","text");
- private final String CHAR_SUB_CHANGE = getLoc(casePfx+"char.sub.change","//input[@value='change']");
- private final String CHAR_INP_TO = getLoc(casePfx+"char.inp.to","to");
- private final String CHAR_INP_FROM = getLoc(casePfx+"char.inp.from","from");
- private final String CHAR_LNK = getLoc(casePfx+"char.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[2]/a");
- private final String CACHE_LNK = getLoc(casePfx+"cache.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[1]/a");
- private final String CACHE_LNK_2REN = getLoc(casePfx+"cache.lnk.2ren","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/a");
- private final String CACHE_LNK_2ACT = getLoc(casePfx+"cache.lnk.2act","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[4]/a");
- private final String CACHE_LNK_1REN = getLoc(casePfx+"cache.lnk.1ren","link=render");
- private final String CACHE_LNK_1ACT = getLoc(casePfx+"cache.lnk.1act","link=action");
- private final String CACHE_DIV_2_RENDER = getLoc(casePfx+"cache.div.2.render","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
- private final String CACHE_DIV_1_RENDER = getLoc(casePfx+"cache.div.1.render","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
+ private final String MSG_P3_L3 = getMess(casePfx + "p3.l3", "$256.00");
+ private final String MSG_P3_L2 = getMess(casePfx + "p3.l2", "SANTA CRUZ ALLSTAR");
+ private final String MSG_P3_L1 = getMess(casePfx + "p3.l1", "Product ID: 3");
-
-
+ private final String MSG_P2_L3 = getMess(casePfx + "p2.l3", "$319.99");
+ private final String MSG_P2_L2 = getMess(casePfx + "p2.l2", "FORUM DESTROYER LTD");
+ private final String MSG_P2_L1 = getMess(casePfx + "p2.l1", "Product ID: 2");
+
+ private final String MSG_P1_L3 = getMess(casePfx + "p1.l3", "Sale Price: $314.96");
+ private final String MSG_P1_L2 = getMess(casePfx + "p1.l2", "B BY BURTON ALPHA");
+ private final String MSG_P1_L1 = getMess(casePfx + "p1.l1", "Product ID: 1");
+
+ private final String SES_LNK_INVALIDATE = getLoc(casePfx + "ses.lnk.invalidate", "link=invalidate");
+ private final String RES_DIV_RTEXT = getLoc(casePfx + "res.div.rtext", "repeat-text");
+ private final String RES_DIV_PTEXT = getLoc(casePfx + "res.div.ptext", "product-text");
+ private final String RES_LNK_P3 = getLoc(casePfx + "res.lnk.p3", "link=Product3");
+ private final String RES_LNK_P2 = getLoc(casePfx + "res.lnk.p2", "link=Product2");
+ private final String RES_LNK_P1 = getLoc(casePfx + "res.lnk.p1", "link=Product1");
+ private final String RES_INP = getLoc(casePfx + "res.inp", "repeat");
+ private final String RES_LNK = getLoc(casePfx + "res.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[17]/a");
+ private final String WIN_DIV_CON = getLoc(casePfx + "win.div.con",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String WIN_LNK = getLoc(casePfx + "win.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[16]/a");
+ private final String SES_TAB_PSCOPE = getLoc(casePfx + "ses.tab.pscope",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table");
+ private final String SES_TAB_ASCOPE = getLoc(casePfx + "ses.tab.ascope",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table[2]");
+ private final String SES_SUB_ASCOPE = getLoc(casePfx + "ses.sub.ascope", "application");
+ private final String SES_SUB_PSCOPE = getLoc(casePfx + "ses.sub.pscope", "portlet");
+ private final String SES_INP_VAL = getLoc(casePfx + "ses.inp.val", "value");
+ private final String SES_INP_NAM = getLoc(casePfx + "ses.inp.nam", "name");
+ private final String SES_LNK = getLoc(casePfx + "ses.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[14]/a");
+ private final String PUB_1_LNK_FOO_REM = getLoc(casePfx + "pub.1.lnk.foo.rem",
+ "//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
+ private final String PUB_3_LNK_BAR_REM = getLoc(casePfx + "pub.3.lnk.bar.rem",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/a");
+ private final String PUB_3_LNK_JUU_REM = getLoc(casePfx + "pub.3.lnk.juu.rem",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
+ private final String PUB_SUB_2 = getLoc(casePfx + "pub.sub.2",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[3]/td/input");
+ private final String PUB_SUB_1 = getLoc(casePfx + "pub.sub.1", "//input[@value='Update']");
+ private final String PUB_DIV_3_BAR = getLoc(casePfx + "pub.div.3.bar",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/input");
+ private final String PUB_DIV_3_JUU = getLoc(casePfx + "pub.div.3.juu",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
+ private final String PUB_DIV_2_JUU = getLoc(casePfx + "pub.div.2.juu", "juu");
+ private final String PUB_DIV_2_FOO = getLoc(casePfx + "pub.div.2.foo",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
+ private final String PUB_DIV_1_BAR = getLoc(casePfx + "pub.div.1.bar", "bar");
+ private final String PUB_DIV_1_FOO = getLoc(casePfx + "pub.div.1.foo", "foo");
+ private final String PUB_LNK = getLoc(casePfx + "pub.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[12]/a");
+ private final String PEVT_DIV_P3_MAX = getLoc(casePfx + "pevt.div.p3.max",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_P2_MAX = getLoc(casePfx + "pevt.div.p2.max",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_L3_MAX = getLoc(casePfx + "pevt.div.l3.max",
+ "//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_L2_MAX = getLoc(casePfx + "pevt.div.l2.max",
+ "//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_P3 = getLoc(casePfx + "pevt.div.p3",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_P2 = getLoc(casePfx + "pevt.div.p2",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_P1 = getLoc(casePfx + "pevt.div.p1",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_L3 = getLoc(casePfx + "pevt.div.l3",
+ "//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_L2 = getLoc(casePfx + "pevt.div.l2",
+ "//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_L1 = getLoc(casePfx + "pevt.div.l1", "//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_LNK = getLoc(casePfx + "pevt.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[11]/a");
+ private final String MOD_DIV_CON = getLoc(casePfx + "mod.div.con",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String MOD_LNK = getLoc(casePfx + "mod.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[10]/a");
+ private final String MPOR_DIV_CON = getLoc(casePfx + "mpor.div.con", "content-container");
+ private final String MPOR_LNK = getLoc(casePfx + "mpor.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[9]/a");
+ private final String MINS_DIV_CON = getLoc(casePfx + "mins.div.con", "content-container");
+ private final String MINS_LNK = getLoc(casePfx + "mins.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[8]/a");
+ private final String JS_LNK_SUBMIT = getLoc(casePfx + "js.lnk.submit", "link=submit");
+ private final String JS_OPT_3 = getLoc(casePfx + "js.opt.3", "//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[3]");
+ private final String JS_OPT_2 = getLoc(casePfx + "js.opt.2", "//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[2]");
+ private final String JS_OPT_1 = getLoc(casePfx + "js.opt.1", "//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[1]");
+ private final String JS_LAB_C = getLoc(casePfx + "js.lab.c", "label=C");
+ private final String JS_LAB_B = getLoc(casePfx + "js.lab.b", "label=B");
+ private final String JS_LAB_A = getLoc(casePfx + "js.lab.a", "label=A");
+ private final String JS_SEL_LETTER = getLoc(casePfx + "js.sel.letter",
+ "//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]");
+ private final String JS_LNK = getLoc(casePfx + "js.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[7]/a");
+ private final String HEAD_INP_CONTENT = getLoc(casePfx + "head.inp.content", "Introducing-HeaderContentInput");
+ private final String HEAD_DIV_CONTENT = getLoc(casePfx + "head.div.content", "Introducing-HeaderContent");
+ private final String HEAD_LNK = getLoc(casePfx + "head.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[6]/a");
+ private final String EXC_LNK_PORTLET = getLoc(casePfx + "exc.lnk.portlet", "link=render PortletException");
+ private final String EXC_LNK = getLoc(casePfx + "exc.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[5]/a");
+ private final String EVT_SUB_COLOR = getLoc(casePfx + "evt.sub.color", "//input[@type='submit']");
+ private final String EVT_DIV_BLACK = getLoc(casePfx + "evt.div.black",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'black')]");
+ private final String EVT_DIV_RED = getLoc(casePfx + "evt.div.red",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'red')]");
+ private final String EVT_DIV_BLUE = getLoc(casePfx + "evt.div.blue",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'blue')]");
+ private final String EVT_SEL_LAB_BLACK = getLoc(casePfx + "evt.sel.lab.black", "label=black");
+ private final String EVT_SEL_LAB_RED = getLoc(casePfx + "evt.sel.lab.red", "label=red");
+ private final String EVT_SEL_LAB_BLUE = getLoc(casePfx + "evt.sel.lab.blue", "label=blue");
+ private final String EVT_SEL_COL = getLoc(casePfx + "evt.sel.col", "color");
+ private final String EVT_LNK = getLoc(casePfx + "evt.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[4]/a");
+ private final String ENC_LNK = getLoc(casePfx + "enc.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[3]/a");
+ private final String ENC_INP_REN = getLoc(casePfx + "enc.inp.ren", "text");
+ private final String ENC_SUB_ACT = getLoc(casePfx + "enc.sub.act", "//input[@value='Submit to action phase']");
+ private final String ENC_INP_ACT = getLoc(casePfx + "enc.inp.act",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div/form[2]/input");
+ private final String ENC_TEXTAREA2 = getLoc(casePfx + "enc.textarea2",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/textarea");
+ private final String ENC_TEXTAREA1 = getLoc(casePfx + "enc.textarea1", "//textarea[@name='text']");
+ private final String CHAR_ALL_SUB_CHECK = getLoc(casePfx + "char.all.sub.check",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[8]/form/input[3]");
+ private final String CHAR_INP_TEXT_SUB_CHECK = getLoc(casePfx + "char.inp.text.sub.check",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[6]/form/input[4]");
+ private final String CHAR_LNK_TEXTAREA_CHECK = getLoc(casePfx + "char.lnk.textarea.check", "//input[@value='check']");
+ private final String CHAR_INP_TEXT = getLoc(casePfx + "char.inp.text", "//input[@name='text']");
+ private final String CHAR_TEXTAREA = getLoc(casePfx + "char.textarea", "text");
+ private final String CHAR_SUB_CHANGE = getLoc(casePfx + "char.sub.change", "//input[@value='change']");
+ private final String CHAR_INP_TO = getLoc(casePfx + "char.inp.to", "to");
+ private final String CHAR_INP_FROM = getLoc(casePfx + "char.inp.from", "from");
+ private final String CHAR_LNK = getLoc(casePfx + "char.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[2]/a");
+ private final String CACHE_LNK = getLoc(casePfx + "cache.lnk", "//ul[@id='tabsHeader']/li[4]/ul/li[1]/a");
+ private final String CACHE_LNK_2REN = getLoc(casePfx + "cache.lnk.2ren",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/a");
+ private final String CACHE_LNK_2ACT = getLoc(casePfx + "cache.lnk.2act",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[4]/a");
+ private final String CACHE_LNK_1REN = getLoc(casePfx + "cache.lnk.1ren", "link=render");
+ private final String CACHE_LNK_1ACT = getLoc(casePfx + "cache.lnk.1act", "link=action");
+ private final String CACHE_DIV_2_RENDER = getLoc(casePfx + "cache.div.2.render",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
+ private final String CACHE_DIV_1_RENDER = getLoc(casePfx + "cache.div.1.render",
+ "//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
+
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
selenium.open("/portal/portal/default/default");
@@ -123,9 +164,10 @@
protected void logoutAfterTest() {
}
-
+
/**
- * Cache test. Test clicks on action and render links in both portlets and assert the change of render call count values accordingly.
+ * Cache test. Test clicks on action and render links in both portlets and
+ * assert the change of render call count values accordingly.
*/
@Test(enabled = true)
public void cacheTest() {
@@ -133,30 +175,30 @@
selenium.waitForPageToLoad(PAGE_LOAD);
assertEquals("0", selenium.getText(CACHE_DIV_1_RENDER));
assertEquals("0", selenium.getText(CACHE_DIV_2_RENDER));
-
+
selenium.click(CACHE_LNK_1ACT);
waitFor(AJAX_TIMEOUT);
assertEquals("1", selenium.getText(CACHE_DIV_1_RENDER));
assertEquals("0", selenium.getText(CACHE_DIV_2_RENDER));
-
+
selenium.click(CACHE_LNK_1REN);
waitFor(AJAX_TIMEOUT);
assertEquals("1", selenium.getText(CACHE_DIV_1_RENDER));
assertEquals("0", selenium.getText(CACHE_DIV_2_RENDER));
-
+
selenium.click(CACHE_LNK_2ACT);
waitFor(AJAX_TIMEOUT);
assertEquals("1", selenium.getText(CACHE_DIV_1_RENDER));
assertEquals("1", selenium.getText(CACHE_DIV_2_RENDER));
-
+
selenium.click(CACHE_LNK_2REN);
waitFor(AJAX_TIMEOUT);
assertEquals("1", selenium.getText(CACHE_DIV_1_RENDER));
- assertEquals("2", selenium.getText(CACHE_DIV_2_RENDER));
+ assertEquals("2", selenium.getText(CACHE_DIV_2_RENDER));
}
-
+
/**
- * Charset test.
+ * Charset test.
* <ul>
* <li>set the testing range and check</li>
* <li>change the testing range and check</li>
@@ -191,11 +233,12 @@
selenium.type(CHAR_INP_TEXT, "789:;<=>?@f");
selenium.click(CHAR_ALL_SUB_CHECK);
waitFor(AJAX_TIMEOUT);
- assertTrue(selenium.isTextPresent("Test result: The input matched the expected result"));
+ assertTrue(selenium.isTextPresent("Test result: The input matched the expected result"));
}
-
+
/**
- * Encoding test. Test fills in inputs for "text to pass" and submit them to render and action phase. The text in textareas is asserted accordingly.
+ * Encoding test. Test fills in inputs for "text to pass" and submit them to
+ * render and action phase. The text in textareas is asserted accordingly.
*/
@Test(enabled = true)
public void encodingTest() {
@@ -212,11 +255,12 @@
selenium.click("//input[@value='Submit to render phase']");
waitFor(AJAX_TIMEOUT);
assertEquals("", selenium.getValue(ENC_TEXTAREA1));
- assertEquals("action", selenium.getValue(ENC_TEXTAREA2));
+ assertEquals("action", selenium.getValue(ENC_TEXTAREA2));
}
-
+
/**
- * Event test. The tests changes the colors for text and asserts that color was really changed.
+ * Event test. The tests changes the colors for text and asserts that color
+ * was really changed.
*/
@Test(enabled = true)
public void eventTest() {
@@ -235,9 +279,10 @@
waitFor(AJAX_LOAD);
assertTrue(selenium.isElementPresent(EVT_DIV_BLACK));
}
-
+
/**
- * Exception test. After accessing the portlet, the string "javax.portlet.PortletException" is asserted to appear on the screen.
+ * Exception test. After accessing the portlet, the string
+ * "javax.portlet.PortletException" is asserted to appear on the screen.
*/
@Test(enabled = true)
public void exceptionTest() {
@@ -245,23 +290,25 @@
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.click(EXC_LNK_PORTLET);
waitFor(AJAX_TIMEOUT);
- assertTrue(selenium.isTextPresent("javax.portlet.PortletException"));
+ assertTrue(selenium.isTextPresent("javax.portlet.PortletException"));
}
-
+
/**
- * File system content test. After accessing the portlet, the string "Bar content" is asserted to appear on the screen.
+ * File system content test. After accessing the portlet, the string
+ * "Bar content" is asserted to appear on the screen.
*/
@Test(enabled = true)
public void headerTest() {
selenium.click(HEAD_LNK);
selenium.waitForPageToLoad(PAGE_LOAD);
- assertTrue(selenium.isElementPresent(HEAD_DIV_CONTENT));
+ assertTrue(selenium.isElementPresent(HEAD_DIV_CONTENT));
selenium.click(HEAD_INP_CONTENT);
assertEquals("hello from the injected java script!", selenium.getAlert());
}
-
+
/**
- * Javascript test. Selects some values from the list and after refresh asserts that nothing was selected.
+ * Javascript test. Selects some values from the list and after refresh
+ * asserts that nothing was selected.
*/
@Test(enabled = true)
public void javascriptTest() {
@@ -271,51 +318,54 @@
waitFor(AJAX_TIMEOUT);
selenium.click(JS_OPT_1);
waitFor(AJAX_TIMEOUT);
-
+
assertFalse(selenium.isSomethingSelected(JS_SEL_LETTER));
-
+
selenium.addSelection(JS_SEL_LETTER, JS_LAB_B);
waitFor(AJAX_TIMEOUT);
selenium.click(JS_OPT_2);
waitFor(AJAX_TIMEOUT);
-
+
assertFalse(selenium.isSomethingSelected(JS_SEL_LETTER));
-
+
selenium.addSelection(JS_SEL_LETTER, JS_LAB_C);
waitFor(AJAX_TIMEOUT);
selenium.click(JS_OPT_3);
waitFor(AJAX_TIMEOUT);
-
+
assertFalse(selenium.isSomethingSelected(JS_SEL_LETTER));
-
+
selenium.click(JS_LNK_SUBMIT);
waitFor(AJAX_TIMEOUT);
-
+
assertFalse(selenium.isSomethingSelected(JS_SEL_LETTER));
}
-
+
/**
- * Missing instance test. The page is opened and it is asserted, that no portlet is on the screen.
+ * Missing instance test. The page is opened and it is asserted, that no
+ * portlet is on the screen.
*/
@Test(enabled = true)
public void missingInstanceTest() {
selenium.click(MINS_LNK);
selenium.waitForPageToLoad(PAGE_LOAD);
- assertEquals("", selenium.getText(MINS_DIV_CON));
+ assertEquals("", selenium.getText(MINS_DIV_CON));
}
-
+
/**
- * Missing portlet test. The page is opened and it is asserted, that no portlet is on the screen.
+ * Missing portlet test. The page is opened and it is asserted, that no
+ * portlet is on the screen.
*/
@Test(enabled = true)
public void missingPortletTest() {
selenium.click(MPOR_LNK);
selenium.waitForPageToLoad(PAGE_LOAD);
- assertEquals("", selenium.getText(MPOR_DIV_CON));
+ assertEquals("", selenium.getText(MPOR_DIV_CON));
}
-
+
/**
- * Mode test. The page is opened and it is asserted, that only a text "view" is present in portlet content.
+ * Mode test. The page is opened and it is asserted, that only a text "view"
+ * is present in portlet content.
*/
@Test(enabled = true)
public void modeTest() {
@@ -323,62 +373,66 @@
selenium.waitForPageToLoad(PAGE_LOAD);
assertEquals("View", selenium.getText(MOD_DIV_CON));
}
-
+
/**
- * Page event test. The test clicks on "normal" button for each portlet on the screen and asserts, that every other portlet in the column is minimalised.
+ * Page event test. The test clicks on "normal" button for each portlet on
+ * the screen and asserts, that every other portlet in the column is
+ * minimalised.
*/
@Test(enabled = true)
public void pageEventTest() {
final String portletText = "This is a simple showcase of Portal Node Event Listener. For this portal page it ensures that in every column, only one portlet window is in NORMAL state. Try to change the window state of other portlets and see what happens. To learn more, read InterPortlet Communication (IPC) chapter in JBoss Portal Reference Guide.";
final String emptyText = "";
-
+
selenium.click(PEVT_LNK);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
// Left column
-
+
assertEquals(portletText, selenium.getText(PEVT_DIV_L1));
assertEquals(emptyText, selenium.getText(PEVT_DIV_L2));
assertEquals(emptyText, selenium.getText(PEVT_DIV_L3));
-
+
selenium.click(PEVT_DIV_L2_MAX);
waitFor(AJAX_TIMEOUT);
-
+
assertEquals(emptyText, selenium.getText(PEVT_DIV_L1));
assertEquals(portletText, selenium.getText(PEVT_DIV_L2));
assertEquals(emptyText, selenium.getText(PEVT_DIV_L3));
-
+
selenium.click(PEVT_DIV_L3_MAX);
waitFor(AJAX_TIMEOUT);
-
+
assertEquals(emptyText, selenium.getText(PEVT_DIV_L1));
assertEquals(emptyText, selenium.getText(PEVT_DIV_L2));
assertEquals(portletText, selenium.getText(PEVT_DIV_L3));
-
+
// Right column
-
+
assertEquals(portletText, selenium.getText(PEVT_DIV_P1));
assertEquals(emptyText, selenium.getText(PEVT_DIV_P2));
assertEquals(emptyText, selenium.getText(PEVT_DIV_P3));
-
+
selenium.click(PEVT_DIV_P2_MAX);
waitFor(AJAX_TIMEOUT);
-
+
assertEquals(emptyText, selenium.getText(PEVT_DIV_P1));
assertEquals(portletText, selenium.getText(PEVT_DIV_P2));
assertEquals(emptyText, selenium.getText(PEVT_DIV_P3));
-
+
selenium.click(PEVT_DIV_P3_MAX);
waitFor(AJAX_TIMEOUT);
-
+
assertEquals(emptyText, selenium.getText(PEVT_DIV_P1));
assertEquals(emptyText, selenium.getText(PEVT_DIV_P2));
assertEquals(portletText, selenium.getText(PEVT_DIV_P3));
-
+
}
-
+
/**
- * Public parameters test. Test is adding values for each parameter and asserting that they appear in valid inputs. Then it removes all values and asserts that they not appear in valid inputs.
+ * Public parameters test. Test is adding values for each parameter and
+ * asserting that they appear in valid inputs. Then it removes all values
+ * and asserts that they not appear in valid inputs.
*/
@Test(enabled = true)
public void publicParametersTest() {
@@ -442,19 +496,19 @@
assertEquals("", selenium.getValue(PUB_DIV_3_JUU));
assertEquals("", selenium.getValue(PUB_DIV_3_BAR));
}
-
+
/**
* Secure test. Test is disabled. More information needed.
*/
- //TODO enable test - more information needed
+ // TODO enable test - more information needed
@Test(enabled = false)
public void secureTest() {
-
-
+
}
-
+
/**
- * Session test. Test adds parameters to portlet and application scope and asserts that they appear in attributes tables accordingly.
+ * Session test. Test adds parameters to portlet and application scope and
+ * asserts that they appear in attributes tables accordingly.
*/
@Test(enabled = true)
public void sessionTest() {
@@ -464,72 +518,84 @@
selenium.type(SES_INP_VAL, "scopeval1");
selenium.click(SES_SUB_PSCOPE);
waitFor(AJAX_TIMEOUT);
-
+
int r = findTableRow(SES_TAB_PSCOPE, "scope1", 0);
- assertTrue(r>0);
+ assertTrue(r > 0);
assertEquals(findTableRow(SES_TAB_PSCOPE, "scopeval1", 1), r);
-
+
selenium.type(SES_INP_NAM, "app1");
selenium.type(SES_INP_VAL, "appval1");
selenium.click(SES_SUB_ASCOPE);
waitFor(AJAX_TIMEOUT);
-
+
r = findTableRow(SES_TAB_ASCOPE, "app1", 0);
- assertTrue(r>0);
+ assertTrue(r > 0);
assertEquals(findTableRow(SES_TAB_ASCOPE, "appval1", 1), r);
-
-
+
selenium.click(SES_LNK_INVALIDATE);
waitFor(AJAX_TIMEOUT);
-
+
assertFalse(selenium.isTextPresent("Session id"));
}
-
+
/**
* Url portlet test.
*/
- //TODO enable test - more information needed
+ // TODO enable test - more information needed
@Test(enabled = false)
public void urlPortletTest() {
-
-
+
}
-
+
/**
- * Window id test. The page is opened and it is asserted, that only a text "Window ID is equals to /default/Test/Window id test/WindowIDPortletWindow" is present in portlet content.
+ * Window id test. The page is opened and it is asserted, that only a text
+ * "Window ID is equals to /default/Test/Window id test/WindowIDPortletWindow"
+ * is present in portlet content.
*/
@Test(enabled = true)
public void windowIdTest() {
selenium.click(WIN_LNK);
selenium.waitForPageToLoad(PAGE_LOAD);
- assertEquals("Window ID is equals to /default/TestWithAjax/Window id test/WindowIDPortletWindow", selenium.getText(WIN_DIV_CON));
+ assertEquals("Window ID is equals to /default/TestWithAjax/Window id test/WindowIDPortletWindow", selenium.getText(WIN_DIV_CON));
}
-
+
/**
- * Serve resource demo test. Tests that repeat input really rewrites the text on screen, and clicks on all product links and assert that right addresses have appeared on screen.
- */
+ * Serve resource demo test. Tests that repeat input really rewrites the
+ * text on screen, and clicks on all product links and assert that right
+ * addresses have appeared on screen.
+ */
@Test(enabled = true)
public void serveResourceDemoTest() {
-
+
selenium.click(RES_LNK);
selenium.waitForPageToLoad(PAGE_LOAD);
selenium.type(RES_INP, "valtest");
selenium.typeKeys(RES_INP, " ");
-
+
waitFor(AJAX_TIMEOUT);
-
+
assertEquals("valtest", selenium.getText(RES_DIV_RTEXT));
selenium.click(RES_LNK_P1);
waitFor(AJAX_TIMEOUT);
- assertEquals("Product ID: 1\n B BY BURTON ALPHA\nSale Price: $314.96", selenium.getText(RES_DIV_PTEXT));
+
+ assertTrue(selenium.isTextPresent(MSG_P1_L1));
+ assertTrue(selenium.isTextPresent(MSG_P1_L2));
+ assertTrue(selenium.isTextPresent(MSG_P1_L3));
+
selenium.click(RES_LNK_P2);
waitFor(AJAX_TIMEOUT);
- assertEquals("Product ID: 2\nFORUM DESTROYER LTD\n$319.99", selenium.getText(RES_DIV_PTEXT));
+
+ assertTrue(selenium.isTextPresent(MSG_P2_L1));
+ assertTrue(selenium.isTextPresent(MSG_P2_L2));
+ assertTrue(selenium.isTextPresent(MSG_P2_L3));
+
selenium.click(RES_LNK_P3);
waitFor(AJAX_TIMEOUT);
- assertEquals("Product ID: 3\n SANTA CRUZ ALLSTAR\n$256.00", selenium.getText(RES_DIV_PTEXT));
-
+
+ assertTrue(selenium.isTextPresent(MSG_P3_L1));
+ assertTrue(selenium.isTextPresent(MSG_P3_L2));
+ assertTrue(selenium.isTextPresent(MSG_P3_L3));
+
}
-
-
+
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java 2009-04-27 10:18:18 UTC (rev 13271)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java 2009-04-27 10:34:53 UTC (rev 13272)
@@ -12,12 +12,24 @@
@Test(groups = { "test_samples" }, enabled = true)
public class PortalSamplesTestCase extends JBossPortalSeleniumTestCase {
+ /** prefix for locator properties = samples. */
+ public static String casePfx = "samples.";
+
+ private final String MSG_P3_L3 = getMess(casePfx + "p3.l3", "$256.00");
+ private final String MSG_P3_L2 = getMess(casePfx + "p3.l2", "SANTA CRUZ ALLSTAR");
+ private final String MSG_P3_L1 = getMess(casePfx + "p3.l1", "Product ID: 3");
+
+ private final String MSG_P2_L3 = getMess(casePfx + "p2.l3", "$319.99");
+ private final String MSG_P2_L2 = getMess(casePfx + "p2.l2", "FORUM DESTROYER LTD");
+ private final String MSG_P2_L1 = getMess(casePfx + "p2.l1", "Product ID: 2");
+
+ private final String MSG_P1_L3 = getMess(casePfx + "p1.l3", "Sale Price: $314.96");
+ private final String MSG_P1_L2 = getMess(casePfx + "p1.l2", "B BY BURTON ALPHA");
+ private final String MSG_P1_L1 = getMess(casePfx + "p1.l1", "Product ID: 1");
+
/** The AJAX timeout. */
public static long AJAX_TIMEOUT = 4500;
- /** prefix for locator properties = samples.*/
- public static String casePfx = "samples.";
-
private final String SES_LNK_INVALIDATE = getLoc(casePfx + "ses.lnk.invalidate", "link=invalidate");
private final String RES_DIV_RTEXT = getLoc(casePfx + "res.div.rtext", "repeat-text");
private final String RES_DIV_PTEXT = getLoc(casePfx + "res.div.ptext", "product-text");
@@ -90,8 +102,7 @@
private final String EVT_DIV_BLACK = getLoc(casePfx + "evt.div.black",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'black')]");
private final String EVT_DIV_RED = getLoc(casePfx + "evt.div.red", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'red')]");
- private final String EVT_DIV_BLUE = getLoc(casePfx + "evt.div.blue",
- "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'blue')]");
+ private final String EVT_DIV_BLUE = getLoc(casePfx + "evt.div.blue", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'blue')]");
private final String EVT_SEL_LAB_BLACK = getLoc(casePfx + "evt.sel.lab.black", "label=black");
private final String EVT_SEL_LAB_RED = getLoc(casePfx + "evt.sel.lab.red", "label=red");
private final String EVT_SEL_LAB_BLUE = getLoc(casePfx + "evt.sel.lab.blue", "label=blue");
@@ -140,7 +151,8 @@
}
/**
- * Cache test. Test clicks on action and render links in both portlets and assert the change of render call count values accordingly.
+ * Cache test. Test clicks on action and render links in both portlets and
+ * assert the change of render call count values accordingly.
*/
@Test(enabled = true)
public void cacheTest() {
@@ -171,7 +183,7 @@
}
/**
- * Charset test.
+ * Charset test.
* <ul>
* <li>set the testing range and check</li>
* <li>change the testing range and check</li>
@@ -187,40 +199,41 @@
selenium.type(CHAR_INP_TO, "75");
selenium.click(CHAR_SUB_CHANGE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
assertEquals("ABCDEFGHIJ", selenium.getText(CHAR_TEXTAREA));
-
+
selenium.click(CHAR_LNK_TEXTAREA_CHECK);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
assertTrue(selenium.isTextPresent("Test result: The input matched the expected result"));
assertEquals("ABCDEFGHIJ", selenium.getValue(CHAR_INP_TEXT));
-
+
selenium.click(CHAR_INP_TEXT_SUB_CHECK);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
selenium.type(CHAR_INP_FROM, "55");
selenium.type(CHAR_INP_TO, "65");
selenium.click(CHAR_SUB_CHANGE);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
assertEquals("789:;<=>?@", selenium.getValue(CHAR_INP_TEXT));
-
+
selenium.type(CHAR_TEXTAREA, "789:;<=>?@4");
selenium.click(CHAR_LNK_TEXTAREA_CHECK);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
assertTrue(selenium.isTextPresent("Test result: The input did not matched the expected result"));
-
+
selenium.type(CHAR_INP_TEXT, "789:;<=>?@f");
selenium.click(CHAR_ALL_SUB_CHECK);
selenium.waitForPageToLoad(PAGE_LOAD);
-
+
assertTrue(selenium.isTextPresent("Test result: The input matched the expected result"));
}
/**
- * Encoding test. Test fills in inputs for "text to pass" and submit them to render and action phase. The text in textareas is asserted accordingly.
+ * Encoding test. Test fills in inputs for "text to pass" and submit them to
+ * render and action phase. The text in textareas is asserted accordingly.
*/
@Test(enabled = true)
public void encodingTest() {
@@ -241,7 +254,8 @@
}
/**
- * Event test. The tests changes the colors for text and asserts that color was really changed.
+ * Event test. The tests changes the colors for text and asserts that color
+ * was really changed.
*/
@Test(enabled = true)
public void eventTest() {
@@ -262,7 +276,8 @@
}
/**
- * Exception test. After accessing the portlet, the string "javax.portlet.PortletException" is asserted to appear on the screen.
+ * Exception test. After accessing the portlet, the string
+ * "javax.portlet.PortletException" is asserted to appear on the screen.
*/
@Test(enabled = true)
public void exceptionTest() {
@@ -274,7 +289,8 @@
}
/**
- * File system content test. After accessing the portlet, the string "Bar content" is asserted to appear on the screen.
+ * File system content test. After accessing the portlet, the string
+ * "Bar content" is asserted to appear on the screen.
*/
@Test(enabled = true)
public void fileSystemContentTest() {
@@ -284,7 +300,8 @@
}
/**
- * Header test. Clicks on "call injected javascript" button and asserts that the correct alert message was popped up.
+ * Header test. Clicks on "call injected javascript" button and asserts that
+ * the correct alert message was popped up.
*/
@Test(enabled = true)
public void headerTest() {
@@ -296,7 +313,8 @@
}
/**
- * Javascript test. Selects some values from the list and after refresh asserts that nothing was selected.
+ * Javascript test. Selects some values from the list and after refresh
+ * asserts that nothing was selected.
*/
@Test(enabled = true)
public void javascriptTest() {
@@ -330,7 +348,8 @@
}
/**
- * Missing instance test. The page is opened and it is asserted, that no portlet is on the screen.
+ * Missing instance test. The page is opened and it is asserted, that no
+ * portlet is on the screen.
*/
@Test(enabled = true)
public void missingInstanceTest() {
@@ -340,7 +359,8 @@
}
/**
- * Missing portlet test. The page is opened and it is asserted, that no portlet is on the screen.
+ * Missing portlet test. The page is opened and it is asserted, that no
+ * portlet is on the screen.
*/
@Test(enabled = true)
public void missingPortletTest() {
@@ -350,7 +370,8 @@
}
/**
- * Mode test. The page is opened and it is asserted, that only a text "view" is present in portlet content.
+ * Mode test. The page is opened and it is asserted, that only a text "view"
+ * is present in portlet content.
*/
@Test(enabled = true)
public void modeTest() {
@@ -360,7 +381,9 @@
}
/**
- * Page event test. The test clicks on "normal" button for each portlet on the screen and asserts, that every other portlet in the column is minimalised.
+ * Page event test. The test clicks on "normal" button for each portlet on
+ * the screen and asserts, that every other portlet in the column is
+ * minimalised.
*/
@Test(enabled = true)
public void pageEventTest() {
@@ -413,7 +436,9 @@
}
/**
- * Public parameters test. Test is adding values for each parameter and asserting that they appear in valid inputs. Then it removes all values and asserts that they not appear in valid inputs.
+ * Public parameters test. Test is adding values for each parameter and
+ * asserting that they appear in valid inputs. Then it removes all values
+ * and asserts that they not appear in valid inputs.
*/
@Test(enabled = true)
public void publicParametersTest() {
@@ -481,14 +506,15 @@
/**
* Secure test. Test is disabled. More information needed.
*/
- //TODO enable test - more information needed
+ // TODO enable test - more information needed
@Test(enabled = false)
public void secureTest() {
}
/**
- * Session test. Test adds parameters to portlet and application scope and asserts that they appear in attributes tables accordingly.
+ * Session test. Test adds parameters to portlet and application scope and
+ * asserts that they appear in attributes tables accordingly.
*/
@Test(enabled = true)
public void sessionTest() {
@@ -521,14 +547,16 @@
/**
* Url portlet test.
*/
- //TODO enable test - more information needed
+ // TODO enable test - more information needed
@Test(enabled = false)
public void urlPortletTest() {
}
/**
- * Window id test. The page is opened and it is asserted, that only a text "Window ID is equals to /default/Test/Window id test/WindowIDPortletWindow" is present in portlet content.
+ * Window id test. The page is opened and it is asserted, that only a text
+ * "Window ID is equals to /default/Test/Window id test/WindowIDPortletWindow"
+ * is present in portlet content.
*/
@Test(enabled = true)
public void windowIdTest() {
@@ -538,7 +566,9 @@
}
/**
- * Serve resource demo test. Tests that repeat input really rewrites the text on screen, and clicks on all product links and assert that right addresses have appeared on screen.
+ * Serve resource demo test. Tests that repeat input really rewrites the
+ * text on screen, and clicks on all product links and assert that right
+ * addresses have appeared on screen.
*/
@Test(enabled = true)
public void serveResourceDemoTest() {
@@ -550,16 +580,28 @@
waitFor(AJAX_TIMEOUT);
assertEquals("valtest", selenium.getText(RES_DIV_RTEXT));
+
selenium.click(RES_LNK_P1);
waitFor(AJAX_TIMEOUT);
- assertEquals("Product ID: 1\n B BY BURTON ALPHA\nSale Price: $314.96", selenium.getText(RES_DIV_PTEXT));
+
+ assertTrue(selenium.isTextPresent(MSG_P1_L1));
+ assertTrue(selenium.isTextPresent(MSG_P1_L2));
+ assertTrue(selenium.isTextPresent(MSG_P1_L3));
+
selenium.click(RES_LNK_P2);
waitFor(AJAX_TIMEOUT);
- assertEquals("Product ID: 2\nFORUM DESTROYER LTD\n$319.99", selenium.getText(RES_DIV_PTEXT));
+
+ assertTrue(selenium.isTextPresent(MSG_P2_L1));
+ assertTrue(selenium.isTextPresent(MSG_P2_L2));
+ assertTrue(selenium.isTextPresent(MSG_P2_L3));
+
selenium.click(RES_LNK_P3);
waitFor(AJAX_TIMEOUT);
- assertEquals("Product ID: 3\n SANTA CRUZ ALLSTAR\n$256.00", selenium.getText(RES_DIV_PTEXT));
+ assertTrue(selenium.isTextPresent(MSG_P3_L1));
+ assertTrue(selenium.isTextPresent(MSG_P3_L2));
+ assertTrue(selenium.isTextPresent(MSG_P3_L3));
+
}
}
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-27 10:18:18 UTC (rev 13271)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-27 10:34:53 UTC (rev 13272)
@@ -1 +1,25 @@
-cms.sec.denied=Access to this resource is denied
\ No newline at end of file
+cms.sec.denied=Access to this resource is denied
+
+samples.ajax.p3.l3=$256.00
+samples.ajax.p3.l2=SANTA CRUZ ALLSTAR
+samples.ajax.p3.l1=Product ID: 3
+
+samples.ajax.p2.l3=$319.99
+samples.ajax.p2.l2=FORUM DESTROYER LTD
+samples.ajax.p2.l1=Product ID: 2
+
+samples.ajax.p1.l3=Sale Price: $314.96
+samples.ajax.p1.l2=B BY BURTON ALPHA
+samples.ajax.p1.l1=Product ID: 1
+
+ajax.p3.l3=$256.00
+ajax.p3.l2=SANTA CRUZ ALLSTAR
+ajax.p3.l1=Product ID: 3
+
+ajax.p2.l3=$319.99
+ajax.p2.l2=FORUM DESTROYER LTD
+ajax.p2.l1=Product ID: 2
+
+ajax.p1.l3=Sale Price: $314.96
+ajax.p1.l2=B BY BURTON ALPHA
+ajax.p1.l1=Product ID: 1
\ No newline at end of file
15 years
JBoss Portal SVN: r13271 - in modules/jopr-plugin/trunk: plugin/src/main/java/org/jboss/portal/jopr and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-04-27 06:18:18 -0400 (Mon, 27 Apr 2009)
New Revision: 13271
Added:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java
Removed:
modules/jopr-plugin/trunk/plugin/src/main/assemble/
Modified:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java
modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
Log:
- Extracted PortalServer information from PortalComponent as a component is not loaded until after discovery
and discovery needs PortalServer to provided more detailed information.
- Removed useless assemble directory.
Modified: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-27 08:23:57 UTC (rev 13270)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-27 10:18:18 UTC (rev 13271)
@@ -25,10 +25,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.portal.jems.as.JMX;
import org.jboss.portal.management.Portal;
-import org.jboss.portal.server.Server;
+import org.jboss.portal.management.PortalServer;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
@@ -48,9 +47,6 @@
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
import java.util.Set;
@@ -64,9 +60,6 @@
EventContext eventContext;
- private static final String PORTAL_SERVICE_SERVER = "portal:service=Server";
- private Server portalServer;
-
private static final String PORTAL_MANAGEMENT_SERVICE = "portal.management:service=Management,type=Portal,name=Default";
private Portal portal;
@@ -78,7 +71,7 @@
*/
public AvailabilityType getAvailability()
{
- return isRegistered(PORTAL_SERVICE_SERVER) ? AvailabilityType.UP : AvailabilityType.DOWN;
+ return PortalServer.isRunning() ? AvailabilityType.UP : AvailabilityType.DOWN;
}
@@ -94,8 +87,6 @@
try
{
- portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
-
portal = (Portal)JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
}
catch (Exception e)
@@ -210,29 +201,4 @@
{
// TODO supply code to delete a child resource
}
-
- private static ObjectName createObjectName(String name)
- {
- ObjectName objecName;
- try
- {
- objecName = new ObjectName(name);
- }
- catch (MalformedObjectNameException e)
- {
- throw new IllegalArgumentException("'" + name + "' is not a valid ObjectName");
- }
- return objecName;
- }
-
- public static boolean isRegistered(String name)
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- return server.isRegistered(createObjectName(name));
- }
-
- public String getVersion()
- {
- return portalServer.getVersion().toString();
- }
}
\ No newline at end of file
Modified: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java 2009-04-27 08:23:57 UTC (rev 13270)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java 2009-04-27 10:18:18 UTC (rev 13271)
@@ -25,6 +25,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.portal.management.PortalServer;
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
@@ -50,8 +51,9 @@
* stay the same when the resource is discovered the next
* time
*/
- DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), "Portal",
- "JBoss Portal", "1.0.0.Alpha1", "Monitoring of JBoss Portal resources", null, null);
+ String portalVersion = PortalServer.getVersion();
+ DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), "JBossPortal",
+ portalVersion, portalVersion, "Monitoring of JBoss Portal resources", null, null);
// Add to return values
Modified: modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-27 08:23:57 UTC (rev 13270)
+++ modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-27 10:18:18 UTC (rev 13271)
@@ -41,7 +41,8 @@
--><!-- TODO add your own here --><!--
</plugin-configuration>-->
- <operation name="refreshPortletList" description="Refreshes the portlet list"/>
+ <operation name="refreshPortletList" displayName="Refresh portlet list"
+ description="Refreshes the list of deployed portlets"/>
<metric property="portletNumber" displayName="Display the number of currently deployed portlets"/>
Added: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java (rev 0)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalServer.java 2009-04-27 10:18:18 UTC (rev 13271)
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * 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.jboss.portal.management;
+
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.portal.jems.as.JMX;
+import org.jboss.portal.server.Server;
+
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class PortalServer
+{
+ private static final String PORTAL_SERVICE_SERVER = "portal:service=Server";
+ private static Server portalServer;
+
+ private PortalServer()
+ {
+ }
+
+ static
+ {
+ portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
+ }
+
+ public static boolean isRunning()
+ {
+ return isRegistered(PORTAL_SERVICE_SERVER);
+ }
+
+ private static ObjectName createObjectName(String name)
+ {
+ ObjectName objecName;
+ try
+ {
+ objecName = new ObjectName(name);
+ }
+ catch (MalformedObjectNameException e)
+ {
+ throw new IllegalArgumentException("'" + name + "' is not a valid ObjectName");
+ }
+ return objecName;
+ }
+
+ public static boolean isRegistered(String name)
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ return server.isRegistered(createObjectName(name));
+ }
+
+ public static String getVersion()
+ {
+ if (portalServer == null)
+ {
+ return "Unavailable";
+ }
+
+ return portalServer.getVersion().toString();
+ }
+}
15 years
JBoss Portal SVN: r13270 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-04-27 04:23:57 -0400 (Mon, 27 Apr 2009)
New Revision: 13270
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
Log:
[selenium] - assert.properties cms security msg fix
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-24 14:12:31 UTC (rev 13269)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-27 08:23:57 UTC (rev 13270)
@@ -1 +1 @@
-cms.sec.denied=You are not allowed to access the resource
\ No newline at end of file
+cms.sec.denied=Access to this resource is denied
\ No newline at end of file
15 years
JBoss Portal SVN: r13269 - in modules/jopr-plugin/trunk: plugin/src/main/resources/META-INF and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-04-24 10:12:31 -0400 (Fri, 24 Apr 2009)
New Revision: 13269
Added:
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java
Modified:
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java
modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
modules/jopr-plugin/trunk/portal-management-service/src/main/resources/META-INF/jboss-service.xml
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java
modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java
Log:
- Fixed deployment.
- Now properly displays the number of deployed portlets in the metrics.
Modified: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-24 13:49:58 UTC (rev 13268)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalComponent.java 2009-04-24 14:12:31 UTC (rev 13269)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * 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. *
@@ -25,10 +25,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.mx.util.MBeanServerLocator;
import org.jboss.portal.jems.as.JMX;
+import org.jboss.portal.management.Portal;
import org.jboss.portal.server.Server;
-import org.jboss.portal.management.Portal;
-import org.jboss.mx.util.MBeanServerLocator;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.measurement.MeasurementDataNumeric;
@@ -48,9 +48,9 @@
import org.rhq.core.pluginapi.operation.OperationFacet;
import org.rhq.core.pluginapi.operation.OperationResult;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
-import javax.management.MalformedObjectNameException;
-import javax.management.MBeanServer;
import java.util.Set;
@@ -59,16 +59,14 @@
{
private final Log log = LogFactory.getLog(this.getClass());
- private static final int CHANGEME = 1; // TODO remove or change this
-
public static final String DUMMY_EVENT = "portal-jopr-pluginDummyEvent"; // Same as in Plugin-Descriptor
EventContext eventContext;
private static final String PORTAL_SERVICE_SERVER = "portal:service=Server";
private Server portalServer;
-
+
private static final String PORTAL_MANAGEMENT_SERVICE = "portal.management:service=Management,type=Portal,name=Default";
private Portal portal;
@@ -94,13 +92,20 @@
Configuration conf = context.getPluginConfiguration();
- portalServer = (Server) JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
+ try
+ {
+ portalServer = (Server)JMX.getMBeanProxy(Server.class, PORTAL_SERVICE_SERVER);
- portal = (Portal) JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
+ portal = (Portal)JMX.getMBeanProxy(Portal.class, PORTAL_MANAGEMENT_SERVICE);
+ }
+ catch (Exception e)
+ {
+ log.info("Failed to start PortalComponent: " + e.getLocalizedMessage(), e);
+ }
- eventContext = context.getEventContext();
+ /*eventContext = context.getEventContext();
PortalEventPoller eventPoller = new PortalEventPoller();
- eventContext.registerEventPoller(eventPoller, 60);
+ eventContext.registerEventPoller(eventPoller, 60);*/
}
@@ -112,9 +117,7 @@
*/
public void stop()
{
-
-
- eventContext.unregisterEventPoller(DUMMY_EVENT);
+// eventContext.unregisterEventPoller(DUMMY_EVENT);
}
@@ -131,10 +134,9 @@
{
if (req.getName().equals("portletNumber"))
{
- MeasurementDataNumeric res = new MeasurementDataNumeric(req, Double.valueOf(CHANGEME));
+ MeasurementDataNumeric res = new MeasurementDataNumeric(req, (double)portal.getNbInstances());
report.addData(res);
}
- // TODO add more metrics here
}
}
@@ -156,10 +158,9 @@
{
OperationResult res = new OperationResult();
- if ("dummyOperation".equals(name))
+ if ("refreshPortletList".equals(name))
{
- // TODO implement me
-
+ System.out.println("refreshPortletList called res = " + res);
}
return res;
}
@@ -210,7 +211,7 @@
// TODO supply code to delete a child resource
}
- private static ObjectName createObjectName(String name)
+ private static ObjectName createObjectName(String name)
{
ObjectName objecName;
try
Modified: modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java 2009-04-24 13:49:58 UTC (rev 13268)
+++ modules/jopr-plugin/trunk/plugin/src/main/java/org/jboss/portal/jopr/PortalDiscovery.java 2009-04-24 14:12:31 UTC (rev 13269)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * 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. *
@@ -28,20 +28,19 @@
import org.rhq.core.pluginapi.inventory.DiscoveredResourceDetails;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryComponent;
import org.rhq.core.pluginapi.inventory.ResourceDiscoveryContext;
-import org.jboss.portal.jopr.PortalComponent;
import java.util.HashSet;
import java.util.Set;
/** Discovery class */
-public class PortalDiscovery implements ResourceDiscoveryComponent<PortalComponent>
+public class PortalDiscovery implements ResourceDiscoveryComponent
{
private final Log log = LogFactory.getLog(this.getClass());
/** Run the discovery */
- public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext<PortalComponent> discoveryContext) throws Exception
+ public Set<DiscoveredResourceDetails> discoverResources(ResourceDiscoveryContext discoveryContext) throws Exception
{
Set<DiscoveredResourceDetails> discoveredResources = new HashSet<DiscoveredResourceDetails>();
@@ -52,7 +51,7 @@
* time
*/
DiscoveredResourceDetails detail = new DiscoveredResourceDetails(discoveryContext.getResourceType(), "Portal",
- discoveryContext.getParentResourceComponent().getVersion(), "1.0.0.Alpha1", "Monitoring of JBoss Portal resources", null, null);
+ "JBoss Portal", "1.0.0.Alpha1", "Monitoring of JBoss Portal resources", null, null);
// Add to return values
Modified: modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml
===================================================================
--- modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-24 13:49:58 UTC (rev 13268)
+++ modules/jopr-plugin/trunk/plugin/src/main/resources/META-INF/rhq-plugin.xml 2009-04-24 14:12:31 UTC (rev 13269)
@@ -1,7 +1,30 @@
<?xml version="1.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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
<plugin name="portal-jopr-plugin"
displayName="JBossPortalPlugin"
- package="org.jboss.portal.jopr.plugin"
+ package="org.jboss.portal.jopr"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:xmlns:rhq-plugin"
xmlns:c="urn:xmlns:rhq-configuration">
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java 2009-04-24 13:49:58 UTC (rev 13268)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortalImpl.java 2009-04-24 14:12:31 UTC (rev 13269)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * 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. *
@@ -38,7 +38,7 @@
{
private InstanceContainerContext containerContext;
- private PortletDiscoveryService discoveryService;
+ private PortletDiscovery discoveryService;
public int getNbInstances()
{
@@ -70,7 +70,7 @@
this.containerContext = containerContext;
}
- public void setDiscoveryService(PortletDiscoveryService discoveryService)
+ public void setDiscoveryService(PortletDiscovery discoveryService)
{
this.discoveryService = discoveryService;
}
Added: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java (rev 0)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscovery.java 2009-04-24 14:12:31 UTC (rev 13269)
@@ -0,0 +1,38 @@
+/******************************************************************************
+ * 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.jboss.portal.management;
+
+import javax.management.ObjectName;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface PortletDiscovery
+{
+ void processPortletDiscovery() throws Exception;
+
+ Map<String, ObjectName> getRegisteredPortlets();
+}
Modified: modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java
===================================================================
--- modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-04-24 13:49:58 UTC (rev 13268)
+++ modules/jopr-plugin/trunk/portal-management/src/main/java/org/jboss/portal/management/PortletDiscoveryService.java 2009-04-24 14:12:31 UTC (rev 13269)
@@ -1,3 +1,26 @@
+/******************************************************************************
+ * 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.jboss.portal.management;
import org.jboss.portal.portlet.Portlet;
@@ -5,17 +28,15 @@
import org.jboss.portal.portlet.federation.FederatingPortletInvoker;
import org.jboss.portal.portlet.management.LocalPortletManagement;
import org.jboss.portal.portlet.management.PortletContainerManagementInterceptor;
-import org.jboss.portal.portlet.management.PortletInfo;
import org.jboss.system.ServiceMBeanSupport;
import javax.management.ObjectName;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
-import java.util.Collections;
-public class PortletDiscoveryService extends ServiceMBeanSupport
+public class PortletDiscoveryService extends ServiceMBeanSupport implements PortletDiscovery
{
public static final String WSRP_JMX_PREFIX = "portal.management:service=Management,type=WSRPPorlet,name=";
public static final String LOCAL_JMX_PREFIX = "portal.management:service=Management,type=LocalPortlet,name=";
Modified: modules/jopr-plugin/trunk/portal-management-service/src/main/resources/META-INF/jboss-service.xml
===================================================================
--- modules/jopr-plugin/trunk/portal-management-service/src/main/resources/META-INF/jboss-service.xml 2009-04-24 13:49:58 UTC (rev 13268)
+++ modules/jopr-plugin/trunk/portal-management-service/src/main/resources/META-INF/jboss-service.xml 2009-04-24 14:12:31 UTC (rev 13269)
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ 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 ~
+ ~ 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. ~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -29,7 +29,8 @@
code="org.jboss.varia.scheduler.Scheduler"
name="portal:service=Management,type=Scheduler">
<attribute
- name="SchedulableMBean">portal:service=Management,type=PortletDiscoveryManagement,name=Default</attribute>
+ name="SchedulableMBean">portal:service=Management,type=PortletDiscoveryManagement,name=Default
+ </attribute>
<attribute name="SchedulableMBeanMethod">processPortletDiscovery()</attribute>
<attribute name="InitialStartDate">NOW</attribute>
<attribute name="SchedulePeriod">30000</attribute>
@@ -38,12 +39,16 @@
</mbean>
<mbean
- code="org.jboss.portal.core.management.PortalImpl"
+ code="org.jboss.portal.management.PortalImpl"
name="portal.management:service=Management,type=Portal,name=Default"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <depends optional-attribute-name="ContainerContext" proxy-type="attribute">portal:service=InstanceContainerContext</depends>
- <depends optional-attribute-name="DiscoveryService" proxy-type="attribute">portal:service=Management,type=PortletDiscoveryManagement,name=Default</depends>
+ <depends optional-attribute-name="ContainerContext" proxy-type="attribute">
+ portal:service=InstanceContainerContext
+ </depends>
+ <depends optional-attribute-name="DiscoveryService" proxy-type="attribute">
+ portal:service=Management,type=PortletDiscoveryManagement,name=Default
+ </depends>
<xmbean/>
</mbean>
@@ -55,16 +60,18 @@
</mbean>
<mbean
- code="org.jboss.portal.core.management.PortletDiscoveryService"
+ code="org.jboss.portal.management.PortletDiscoveryService"
name="portal:service=Management,type=PortletDiscoveryManagement,name=Default"
xmbean-dd=""
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<depends
optional-attribute-name="FederatingPortletInvoker"
- proxy-type="attribute">portal:service=PortletInvoker,type=Federating</depends>
+ proxy-type="attribute">portal:service=PortletInvoker,type=Federating
+ </depends>
<depends
optional-attribute-name="Interceptor"
- proxy-type="attribute">portal:service=Interceptor,type=Portlet,name=PortletContainerManagement</depends>
+ proxy-type="attribute">portal:service=Interceptor,type=Portlet,name=PortletContainerManagement
+ </depends>
<xmbean/>
</mbean>
@@ -82,8 +89,11 @@
xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
<xmbean/>
<depends
- optional-attribute-name="StackFactory">portal:service=InterceptorStackFactory,type=Instance</depends>
+ optional-attribute-name="StackFactory">portal:service=InterceptorStackFactory,type=Instance
+ </depends>
<depends
- optional-attribute-name="InterceptorName">portal:service=Interceptor,type=Portlet,name=PortletContainerManagement</depends>
+ optional-attribute-name="InterceptorName">
+ portal:service=Interceptor,type=Portlet,name=PortletContainerManagement
+ </depends>
</mbean>
</server>
15 years
JBoss Portal SVN: r13268 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: src/org/jboss/portal/test/selenium and 2 other directories.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-04-24 09:49:58 -0400 (Fri, 24 Apr 2009)
New Revision: 13268
Added:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
Log:
[selenium] - assert property file
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-04-24 13:49:58 UTC (rev 13268)
@@ -144,12 +144,10 @@
<testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSuite">
<xmlfileset dir="." includes="${test.suite}" />
-
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
<sysproperty key="debug" value="${debug}" />
<sysproperty key="workspace" value="${workspace}" />
- <sysproperty key="userCount" value="${userCount}" />
<sysproperty key="html-src" value="${html-src}" />
<sysproperty key="output-dir" value="${testng.output.dir}" />
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/DashboardTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -19,30 +19,30 @@
/** prefix for locator properties = dash. */
public String casePfx = "dash.";
- private final String LNK_POR_WEA_EDIT = getProp(casePfx + "lnk.por.wea.edit",
+ private final String LNK_POR_WEA_EDIT = getLoc(casePfx + "lnk.por.wea.edit",
"//body/div[2]/div/div/div[2]/div/div/div/div/div/div/table/tbody/tr/td[2]/div/div/div[2]/span/a");
- private final String SUB_LAYOUT_UPDATE = getProp(casePfx + "sub.layout.update", "//input[contains(@name,'dashboardLayoutForm:j_id12')]");
- private final String SUB_PAGE_RENAME = getProp(casePfx + "sub.page.rename", "//form[contains(@id,'renameForm')]/input[@type='submit']");
- private final String INP_PAGE_RENAME = getProp(casePfx + "inp.page.rename", "//input[contains(@id,'renameForm:newName')]");
- private final String LINK_WEATHER_PORTLET = getProp(casePfx + "link.weather.portlet", "link=*WeatherPortlet*");
- private final String LINK_PORTL2 = getProp(casePfx + "link.portl2", "link=*Who's online portlet*");
- private final String LINK_PORTL1 = getProp(casePfx + "link.portl1", "link=*Welcome portlet*");
- private final String OPT_PORTL1 = getProp(casePfx + "opt.portl1", "JSPPortletWindow");
- private final String SEL_CONTENT_TYPE = getProp(casePfx + "sel.content.type", "//select[contains(@id,'contentTypesForm:instanceId')]");
- private final String SUB_DEL_FROM_CENTER_REGION = getProp(casePfx + "sub.del.from.center.region", "//input[contains(@id,'layoutForm:l_center')]");
- private final String SUB_DOWN_CENTER_REGION = getProp(casePfx + "sub.down.center.region", "//input[contains(@id,'layoutForm:d_center')]");
- private final String SUB_UP_CENTER_REGION = getProp(casePfx + "sub.up.center.region", "//input[contains(@id,'layoutForm:u_center')]");
- private final String SEL_CENTER_REGION = getProp(casePfx + "sel.center.region", "//select[contains(@id,'layoutForm:selectMany_center')]");
- private final String SUB_ADDCENTER = getProp(casePfx + "sub.addcenter", "//input[contains(@id,'layoutForm:a_center')]");
- private final String SUB_ADDLEFT = getProp(casePfx + "sub.addleft", "//input[contains(@id,'layoutForm:a_left')]");
- private final String LNK_CONFIGURE_DASHBOARD = getProp(casePfx + "lnk.configure.dashboard", "link=Configure dashboard");
- private final String LNK_DASHBOARD = getProp(casePfx + "lnk.dashboard", "link=Dashboard");
- private final String SEL_PAGE = getProp(casePfx + "sel.page", "//select[contains(@id,'pageNameSelector')]");
- private final String INP_PAGENAME = getProp(casePfx + "inp.pagename", "//input[contains(@id,':pageName')]");
- private final String SUB_CREATEPAGE = getProp(casePfx + "sub.createpage", "//form[contains(@id,'j_id3')]/input[@type='submit']");
- private final String SEL_LAYOUT = getProp(casePfx + "sel.layout", "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]");
- private final String SEL_THEME = getProp(casePfx + "sel.theme", "//select[contains(@id,'dashboardThemeForm:themeSelector')]");
- private final String SUB_THEMESEL = getProp(casePfx + "sub.themesel", "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']");
+ private final String SUB_LAYOUT_UPDATE = getLoc(casePfx + "sub.layout.update", "//input[contains(@name,'dashboardLayoutForm:j_id12')]");
+ private final String SUB_PAGE_RENAME = getLoc(casePfx + "sub.page.rename", "//form[contains(@id,'renameForm')]/input[@type='submit']");
+ private final String INP_PAGE_RENAME = getLoc(casePfx + "inp.page.rename", "//input[contains(@id,'renameForm:newName')]");
+ private final String LINK_WEATHER_PORTLET = getLoc(casePfx + "link.weather.portlet", "link=*WeatherPortlet*");
+ private final String LINK_PORTL2 = getLoc(casePfx + "link.portl2", "link=*Who's online portlet*");
+ private final String LINK_PORTL1 = getLoc(casePfx + "link.portl1", "link=*Welcome portlet*");
+ private final String OPT_PORTL1 = getLoc(casePfx + "opt.portl1", "JSPPortletWindow");
+ private final String SEL_CONTENT_TYPE = getLoc(casePfx + "sel.content.type", "//select[contains(@id,'contentTypesForm:instanceId')]");
+ private final String SUB_DEL_FROM_CENTER_REGION = getLoc(casePfx + "sub.del.from.center.region", "//input[contains(@id,'layoutForm:l_center')]");
+ private final String SUB_DOWN_CENTER_REGION = getLoc(casePfx + "sub.down.center.region", "//input[contains(@id,'layoutForm:d_center')]");
+ private final String SUB_UP_CENTER_REGION = getLoc(casePfx + "sub.up.center.region", "//input[contains(@id,'layoutForm:u_center')]");
+ private final String SEL_CENTER_REGION = getLoc(casePfx + "sel.center.region", "//select[contains(@id,'layoutForm:selectMany_center')]");
+ private final String SUB_ADDCENTER = getLoc(casePfx + "sub.addcenter", "//input[contains(@id,'layoutForm:a_center')]");
+ private final String SUB_ADDLEFT = getLoc(casePfx + "sub.addleft", "//input[contains(@id,'layoutForm:a_left')]");
+ private final String LNK_CONFIGURE_DASHBOARD = getLoc(casePfx + "lnk.configure.dashboard", "link=Configure dashboard");
+ private final String LNK_DASHBOARD = getLoc(casePfx + "lnk.dashboard", "link=Dashboard");
+ private final String SEL_PAGE = getLoc(casePfx + "sel.page", "//select[contains(@id,'pageNameSelector')]");
+ private final String INP_PAGENAME = getLoc(casePfx + "inp.pagename", "//input[contains(@id,':pageName')]");
+ private final String SUB_CREATEPAGE = getLoc(casePfx + "sub.createpage", "//form[contains(@id,'j_id3')]/input[@type='submit']");
+ private final String SEL_LAYOUT = getLoc(casePfx + "sel.layout", "//select[contains(@id,'dashboardLayoutForm:layoutSelector')]");
+ private final String SEL_THEME = getLoc(casePfx + "sel.theme", "//select[contains(@id,'dashboardThemeForm:themeSelector')]");
+ private final String SUB_THEMESEL = getLoc(casePfx + "sub.themesel", "//form[contains(@id,'dashboardThemeForm')]/input[@type='submit']");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/EndToEndBeaPortlet.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -23,34 +23,34 @@
/** prefix for locator properties = e2e.wsrp. */
public static String casePfx = "e2e.wsrp.";
- private final String LNK_BEA_PREV = getProp(casePfx + "lnk.bea.next", "link=Goto previous page");
- private final String LNK_BEA_NEXT = getProp(casePfx + "lnk.bea.prev", "link=Click here to goto next page");
+ private final String LNK_BEA_PREV = getLoc(casePfx + "lnk.bea.next", "link=Goto previous page");
+ private final String LNK_BEA_NEXT = getLoc(casePfx + "lnk.bea.prev", "link=Click here to goto next page");
private final String SUB_VIEW_PORTLETS = "//input[contains(@id,'definition-form:view-portlets')]";
private final String SEL_CONS_TYPE = "//select[contains(@id,'definition-form:menu')]";
- private final String ADR_HOME = getProp(casePfx + "adr.home", "portal/auth/portal/default");
+ private final String ADR_HOME = getLoc(casePfx + "adr.home", "portal/auth/portal/default");
- private final String SUBMIT_CONS_REGVAL = getProp(casePfx + "submit.cons.regval", "//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
- private final String SUBMIT_REFRESHFINAL = getProp(casePfx + "submit.refreshfinal", "//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+ private final String SUBMIT_CONS_REGVAL = getLoc(casePfx + "submit.cons.regval", "//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+ private final String SUBMIT_REFRESHFINAL = getLoc(casePfx + "submit.refreshfinal", "//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
- private final String INPUT_CONS_REGVALUE = getProp(casePfx + "input.cons.regvalue",
+ private final String INPUT_CONS_REGVALUE = getLoc(casePfx + "input.cons.regvalue",
"//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]");
- private final String SUBMIT_REFRESHSAVE = getProp(casePfx + "submit.refreshsave", "//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
- private final String INPUT_CONSWSDL = getProp(casePfx + "input.conswsdl", "//input[contains(@id,'edit-cons-form:wsdl')]");
- private final String INPUT_CACHEEXP = getProp(casePfx + "input.cacheexp", "//input[contains(@id,'edit-cons-form:cache')]");
- private final String SUBMIT_CREATECONS = getProp(casePfx + "submit.createcons", "//input[contains(@id,'createConsumer:createConsumerButton')]");
- private final String INPUT_CREATECONS = getProp(casePfx + "input.createcons", "//input[contains(@id,'createConsumer:consumerName')]");
- private final String ID_LINK_CONSCONF = getProp(casePfx + "id.link.consconf", "//a[contains(@id,'producer-temp-form:consumersTab')]");
+ private final String SUBMIT_REFRESHSAVE = getLoc(casePfx + "submit.refreshsave", "//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+ private final String INPUT_CONSWSDL = getLoc(casePfx + "input.conswsdl", "//input[contains(@id,'edit-cons-form:wsdl')]");
+ private final String INPUT_CACHEEXP = getLoc(casePfx + "input.cacheexp", "//input[contains(@id,'edit-cons-form:cache')]");
+ private final String SUBMIT_CREATECONS = getLoc(casePfx + "submit.createcons", "//input[contains(@id,'createConsumer:createConsumerButton')]");
+ private final String INPUT_CREATECONS = getLoc(casePfx + "input.createcons", "//input[contains(@id,'createConsumer:consumerName')]");
+ private final String ID_LINK_CONSCONF = getLoc(casePfx + "id.link.consconf", "//a[contains(@id,'producer-temp-form:consumersTab')]");
- private final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type", "//select[contains(@id,'windowForm:instanceId')]");
- private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
- private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
- private final String LNK_PORTALS_ID = getProp(casePfx + "lnk.portals.id", "link=*Portal Objects*");
- private final String LNK_PORTAL_HOME = getProp(casePfx + "lnk.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
- private final String TBL_PORTAL_ADMIN = getProp(casePfx + "tbl.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
- private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
- private final String TBL_PORTALPAGE_ADMIN = getProp(casePfx + "tbl.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
- private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+ private final String SEL_PORTLET_TYPE = getLoc(casePfx + "sel.portlet.type", "//select[contains(@id,'windowForm:instanceId')]");
+ private final String SUB_LAYOUT_ADD_CENTER = getLoc(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+ private final String TAB_PORTALOBJ_ID = getLoc(casePfx + "tab.portalobj.id", "Link=Admin");
+ private final String LNK_PORTALS_ID = getLoc(casePfx + "lnk.portals.id", "link=*Portal Objects*");
+ private final String LNK_PORTAL_HOME = getLoc(casePfx + "lnk.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+ private final String TBL_PORTAL_ADMIN = getLoc(casePfx + "tbl.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+ private final String POR_TL_MAIN = getLoc(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+ private final String TBL_PORTALPAGE_ADMIN = getLoc(casePfx + "tbl.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+ private final String PAG_TL_LAYOUT = getLoc(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
private final String SUBMIT_CREATE_INST = "//input[contains(@name,'add_instance_form:j_id19')]";
private final String INPUT_INSTANCE_NAME = "//input[contains(@id,'add_instance_form:instanceId')]";
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/IdentityAdminTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -18,70 +18,70 @@
/** prefix for locator properties */
public String casePfx = "iden.man.";
- private final String INP_USER_SEARCH_PREV = getProp(casePfx + "inp.user.search.prev", "//input[contains(@id,'search-user-form1:prev-page')]");
- private final String INP_USER_SEARCH_NEXT = getProp(casePfx + "inp.user.search.next", "//input[contains(@id,'search-user-form1:next-page')]");
+ private final String INP_USER_SEARCH_PREV = getLoc(casePfx + "inp.user.search.prev", "//input[contains(@id,'search-user-form1:prev-page')]");
+ private final String INP_USER_SEARCH_NEXT = getLoc(casePfx + "inp.user.search.next", "//input[contains(@id,'search-user-form1:next-page')]");
- private final String SEL_SEARCHUSER_LIMIT = getProp(casePfx + "sel.searchuser.limit", "//select[contains(@id,'search-user-form:limit')]");
- private final String SUB_EDIT_PROF = getProp(casePfx + "sub.edit.prof", "//input[contains(@id,'profile-form:submit')]");
+ private final String SEL_SEARCHUSER_LIMIT = getLoc(casePfx + "sel.searchuser.limit", "//select[contains(@id,'search-user-form:limit')]");
+ private final String SUB_EDIT_PROF = getLoc(casePfx + "sub.edit.prof", "//input[contains(@id,'profile-form:submit')]");
- private final String SUB_PAGIN_LEFT = getProp(casePfx + "sub.pagin.left", INP_USER_SEARCH_PREV);
- private final String SUB_PAGIN_RIGHT = getProp(casePfx + "sub.pagin.right", INP_USER_SEARCH_NEXT);
+ private final String SUB_PAGIN_LEFT = getLoc(casePfx + "sub.pagin.left", INP_USER_SEARCH_PREV);
+ private final String SUB_PAGIN_RIGHT = getLoc(casePfx + "sub.pagin.right", INP_USER_SEARCH_NEXT);
- private final String SUB_EDIT_USER_EMAIL_CANCEL = getProp(casePfx + "sub.edit.user.email.cancel", "//input[contains(@id,'profile-form:cancel')]");
- private final String INP_EDIT_USER_EMAIL = getProp(casePfx + "inp.edit.user.email", "//input[contains(@id,'profile-form:email')]");
- private final String SUB_ROLE_SEARCH_USER = getProp(casePfx + "sub.role.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
- private final String INP_ROLE_SEARCH_USER = getProp(casePfx + "inp.role.search.user", "//input[contains(@id,'search-user-form:searchString')]");
- private final String SUB_EDIT_ROLE_SUBMIT = getProp(casePfx + "sub.edit.role.submit", "//input[contains(@id,'edit-role-link:submit')]");
- private final String SUB_EDIT_ROLE_CANCEL = getProp(casePfx + "sub.edit.role.cancel", "//input[contains(@id,'edit-role-link:cancel')]");
- private final String INP_EDIT_ROLE_NAME = getProp(casePfx + "inp.edit.role.name", "//input[contains(@id,'edit-role-link:display-name')]");
- private final String SUB_PASS_CHANGE_SUBMIT = getProp(casePfx + "sub.pass.change.submit", "//input[contains(@name,'change-pwd-form:j_id31')]");
- private final String SUB_PASS_CHANGE_CANCEL = getProp(casePfx + "sub.pass.change.cancel", "//input[contains(@id,'change-pwd-form:cancel')]");
- private final String INP_PASS_CHANGE_P2 = getProp(casePfx + "inp.pass.change.p2", "//input[contains(@id,':change-pwd-form:passwordCheck')]");
- private final String INP_PASS_CHANGE_P1 = getProp(casePfx + "inp.pass.change.p1", "//input[contains(@id,':change-pwd-form:password')]");
- private final String LNK_CHANGE_PASS = getProp(casePfx + "lnk.change.pass", "//a[contains(@id,':profile-form:change-pwd-adm-link')]");
- private final String TBL_USERLIST = getProp(casePfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
- private final String LNK_T_USRLIST_DEL = getProp(casePfx + "lnk.t.usrlist.del", "//a[contains(@id,''search-user-form1:userlist:{0}:delete-user-link'')]");
- private final String LNK_T_USRLIST_ROLES = getProp(casePfx + "lnk.t.usrlist.roles", "//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]");
- private final String LNK_T_USRLIST_DIS = getProp(casePfx + "lnk.t.usrlist.dis", "//a[contains(@id,''search-user-form1:userlist:{0}:enable-user-link'')]");
- private final String LNK_T_USRLIST_EDIT = getProp(casePfx + "lnk.t.usrlist.edit", "//a[contains(@id,''search-user-form1:userlist:{0}:rename-link'')]");
+ private final String SUB_EDIT_USER_EMAIL_CANCEL = getLoc(casePfx + "sub.edit.user.email.cancel", "//input[contains(@id,'profile-form:cancel')]");
+ private final String INP_EDIT_USER_EMAIL = getLoc(casePfx + "inp.edit.user.email", "//input[contains(@id,'profile-form:email')]");
+ private final String SUB_ROLE_SEARCH_USER = getLoc(casePfx + "sub.role.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
+ private final String INP_ROLE_SEARCH_USER = getLoc(casePfx + "inp.role.search.user", "//input[contains(@id,'search-user-form:searchString')]");
+ private final String SUB_EDIT_ROLE_SUBMIT = getLoc(casePfx + "sub.edit.role.submit", "//input[contains(@id,'edit-role-link:submit')]");
+ private final String SUB_EDIT_ROLE_CANCEL = getLoc(casePfx + "sub.edit.role.cancel", "//input[contains(@id,'edit-role-link:cancel')]");
+ private final String INP_EDIT_ROLE_NAME = getLoc(casePfx + "inp.edit.role.name", "//input[contains(@id,'edit-role-link:display-name')]");
+ private final String SUB_PASS_CHANGE_SUBMIT = getLoc(casePfx + "sub.pass.change.submit", "//input[contains(@name,'change-pwd-form:j_id31')]");
+ private final String SUB_PASS_CHANGE_CANCEL = getLoc(casePfx + "sub.pass.change.cancel", "//input[contains(@id,'change-pwd-form:cancel')]");
+ private final String INP_PASS_CHANGE_P2 = getLoc(casePfx + "inp.pass.change.p2", "//input[contains(@id,':change-pwd-form:passwordCheck')]");
+ private final String INP_PASS_CHANGE_P1 = getLoc(casePfx + "inp.pass.change.p1", "//input[contains(@id,':change-pwd-form:password')]");
+ private final String LNK_CHANGE_PASS = getLoc(casePfx + "lnk.change.pass", "//a[contains(@id,':profile-form:change-pwd-adm-link')]");
+ private final String TBL_USERLIST = getLoc(casePfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
+ private final String LNK_T_USRLIST_DEL = getLoc(casePfx + "lnk.t.usrlist.del", "//a[contains(@id,''search-user-form1:userlist:{0}:delete-user-link'')]");
+ private final String LNK_T_USRLIST_ROLES = getLoc(casePfx + "lnk.t.usrlist.roles", "//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]");
+ private final String LNK_T_USRLIST_DIS = getLoc(casePfx + "lnk.t.usrlist.dis", "//a[contains(@id,''search-user-form1:userlist:{0}:enable-user-link'')]");
+ private final String LNK_T_USRLIST_EDIT = getLoc(casePfx + "lnk.t.usrlist.edit", "//a[contains(@id,''search-user-form1:userlist:{0}:rename-link'')]");
- private final String TBL_ROLELIST = getProp(casePfx + "tbl.rolelist", "//table[contains(@id,'roles-form:userlist')]");
+ private final String TBL_ROLELIST = getLoc(casePfx + "tbl.rolelist", "//table[contains(@id,'roles-form:userlist')]");
- private final String LNK_T_ROLLIST_DEL = getProp(casePfx + "lnk.t.rollist.del", "//a[contains(@id,''roles-form:userlist:{0}:delete-role-link'')]");
- private final String LNK_T_ROLLIST_MEMBERS = getProp(casePfx + "lnk.t.rollist.members", "//a[contains(@id,''roles-form:userlist:{0}:view-role-link'')]");
- private final String LNK_T_ROLLIST_EDIT = getProp(casePfx + "lnk.t.rollist.edit", "//a[contains(@id,''roles-form:userlist:{0}:edit-role-link'')]");
+ private final String LNK_T_ROLLIST_DEL = getLoc(casePfx + "lnk.t.rollist.del", "//a[contains(@id,''roles-form:userlist:{0}:delete-role-link'')]");
+ private final String LNK_T_ROLLIST_MEMBERS = getLoc(casePfx + "lnk.t.rollist.members", "//a[contains(@id,''roles-form:userlist:{0}:view-role-link'')]");
+ private final String LNK_T_ROLLIST_EDIT = getLoc(casePfx + "lnk.t.rollist.edit", "//a[contains(@id,''roles-form:userlist:{0}:edit-role-link'')]");
- private final String TBL_ROLEMEMBERS = getProp(casePfx + "tbl.rolemembers", "//table[contains(@id,'role-members-form:role-data-table')]");
+ private final String TBL_ROLEMEMBERS = getLoc(casePfx + "tbl.rolemembers", "//table[contains(@id,'role-members-form:role-data-table')]");
- private final String SUB_CONF_CREATE_USER = getProp(casePfx + "sub.conf.create.user", "//input[contains(@id,'confirm-form:admin')]");
- private final String SUB_DELETE_ROLE = getProp(casePfx + "sub.delete.role", "//input[contains(@id,'delete-role-form:confirm')]");
- private final String SUB_ROLE_CREATE = getProp(casePfx + "sub.role.create", "//input[contains(@id,'create-role-form:submit')]");
- private final String INP_ROLEDISNAME = getProp(casePfx + "inp.roledisname", "//input[contains(@id,'create-role-form:roledisplayname')]");
- private final String INP_ROLENAME = getProp(casePfx + "inp.rolename", "//input[contains(@id,'create-role-form:rolename')]");
+ private final String SUB_CONF_CREATE_USER = getLoc(casePfx + "sub.conf.create.user", "//input[contains(@id,'confirm-form:admin')]");
+ private final String SUB_DELETE_ROLE = getLoc(casePfx + "sub.delete.role", "//input[contains(@id,'delete-role-form:confirm')]");
+ private final String SUB_ROLE_CREATE = getLoc(casePfx + "sub.role.create", "//input[contains(@id,'create-role-form:submit')]");
+ private final String INP_ROLEDISNAME = getLoc(casePfx + "inp.roledisname", "//input[contains(@id,'create-role-form:roledisplayname')]");
+ private final String INP_ROLENAME = getLoc(casePfx + "inp.rolename", "//input[contains(@id,'create-role-form:rolename')]");
- private final String LNK_ROLE_CREATE = getProp(casePfx + "lnk.role.create", "//a[contains(@id, 'create-role-form:create-role-link')]");
- private final String SUB_DEL_USER = getProp(casePfx + "sub.del.user", "//input[contains(@id,'delete-user-form:submit')]");
- private final String SUB_ASSIGN_ROLE = getProp(casePfx + "sub.assign.role", "//input[contains(@id,'assign-roles-form:submit')]");
- private final String SUB_USER_ROLE = getProp(casePfx + "sub.user.role", "//input[contains(@id,'register-role-form:submit')]");
- private final String SUB_CREATE_USER = getProp(casePfx + "sub.create.user", "//input[contains(@id,'register-form:submit')]");
- private final String INP_PASSWORD_CHK = getProp(casePfx + "inp.password.chk", "//input[contains(@id,'register-form:passwordCheck')]");
- private final String INP_PASSWORD = getProp(casePfx + "inp.password", "//input[contains(@id,'register-form:password')]");
- private final String INP_USEREMAIL = getProp(casePfx + "inp.useremail", "//input[contains(@id,'register-form:email')]");
- private final String INP_USERNAME = getProp(casePfx + "inp.username", "//input[contains(@id,'register-form:username')]");
- private final String SUB_SEARCH_USER = getProp(casePfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
- private final String INP_SEARCH_USER = getProp(casePfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
- private final String LNK_SEARCH_USER = getProp(casePfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
- private final String LNK_USERTAB = getProp(casePfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
- private final String LNK_USERMAIN = getProp(casePfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
+ private final String LNK_ROLE_CREATE = getLoc(casePfx + "lnk.role.create", "//a[contains(@id, 'create-role-form:create-role-link')]");
+ private final String SUB_DEL_USER = getLoc(casePfx + "sub.del.user", "//input[contains(@id,'delete-user-form:submit')]");
+ private final String SUB_ASSIGN_ROLE = getLoc(casePfx + "sub.assign.role", "//input[contains(@id,'assign-roles-form:submit')]");
+ private final String SUB_USER_ROLE = getLoc(casePfx + "sub.user.role", "//input[contains(@id,'register-role-form:submit')]");
+ private final String SUB_CREATE_USER = getLoc(casePfx + "sub.create.user", "//input[contains(@id,'register-form:submit')]");
+ private final String INP_PASSWORD_CHK = getLoc(casePfx + "inp.password.chk", "//input[contains(@id,'register-form:passwordCheck')]");
+ private final String INP_PASSWORD = getLoc(casePfx + "inp.password", "//input[contains(@id,'register-form:password')]");
+ private final String INP_USEREMAIL = getLoc(casePfx + "inp.useremail", "//input[contains(@id,'register-form:email')]");
+ private final String INP_USERNAME = getLoc(casePfx + "inp.username", "//input[contains(@id,'register-form:username')]");
+ private final String SUB_SEARCH_USER = getLoc(casePfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
+ private final String INP_SEARCH_USER = getLoc(casePfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
+ private final String LNK_SEARCH_USER = getLoc(casePfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
+ private final String LNK_USERTAB = getLoc(casePfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
+ private final String LNK_USERMAIN = getLoc(casePfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
- private final String LNK_ROLETAB = getProp(casePfx + "lnk.roletab", "//a[contains(@id,'user-temp-form:role-mgm-link')]");
+ private final String LNK_ROLETAB = getLoc(casePfx + "lnk.roletab", "//a[contains(@id,'user-temp-form:role-mgm-link')]");
- private final String LNK_ROLEMAIN = getProp(casePfx + "lnk.rolemain", "//a[contains(@id, 'role-temp-form1:role-admin-link')]");
- private final String LNK_USERMANG_MAIN = getProp(casePfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
- private final String LNK_USERMANG_MAIN2 = getProp(casePfx + "lnk.usermang.main2", "//a[contains(@id,'user-temp-form1:user-mgm-link')]");
- private final String LNK_CREATE_USER = getProp(casePfx + "lnk.create.user", "//a[contains(@id,':user-form:create-user-link')]");
+ private final String LNK_ROLEMAIN = getLoc(casePfx + "lnk.rolemain", "//a[contains(@id, 'role-temp-form1:role-admin-link')]");
+ private final String LNK_USERMANG_MAIN = getLoc(casePfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
+ private final String LNK_USERMANG_MAIN2 = getLoc(casePfx + "lnk.usermang.main2", "//a[contains(@id,'user-temp-form1:user-mgm-link')]");
+ private final String LNK_CREATE_USER = getLoc(casePfx + "lnk.create.user", "//a[contains(@id,':user-form:create-user-link')]");
- private final String CHK_ROLE = getProp(casePfx + "chk.role", "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']");
+ private final String CHK_ROLE = getLoc(casePfx + "chk.role", "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']");
/** The timeout used to wait after clicking submit button in user search. */
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/JBossPortalSeleniumTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -27,21 +27,28 @@
static {
try {
- props = getProperties();
+ propsLoc = getProperties("org/jboss/portal/test/selenium/locator.properties");
} catch (Exception e) {
- // TODO: handle exception
+ e.printStackTrace();
}
+
+ try {
+ propsMes = getProperties("org/jboss/portal/test/selenium/assert.properties");
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
}
- protected final String LINK_LOGOUT = getProp(casePfx + "link.logout", "link=Logout");
- protected final String SUBMIT_LOGIN = getProp(casePfx + "submit.login", "login");
- protected final String ADDR_PORTAL = getProp(casePfx + "addr.portal", "/portal/");
- protected final String FRAME_LOGIN_CONTENT = getProp(casePfx + "frame.login.content", "login-content");
- protected final String LINK_LOGIN = getProp(casePfx + "link.login", "link=Login");
- protected final String INPUT_PASSWORD = getProp(casePfx + "input.password", "j_password");
- protected final String INPUT_USERNAME = getProp(casePfx + "input.username", "j_username");
+ protected final String LINK_LOGOUT = getLoc(casePfx + "link.logout", "link=Logout");
+ protected final String SUBMIT_LOGIN = getLoc(casePfx + "submit.login", "login");
+ protected final String ADDR_PORTAL = getLoc(casePfx + "addr.portal", "/portal/");
+ protected final String FRAME_LOGIN_CONTENT = getLoc(casePfx + "frame.login.content", "login-content");
+ protected final String LINK_LOGIN = getLoc(casePfx + "link.login", "link=Login");
+ protected final String INPUT_PASSWORD = getLoc(casePfx + "input.password", "j_password");
+ protected final String INPUT_USERNAME = getLoc(casePfx + "input.username", "j_username");
- protected static Properties props;
+ protected static Properties propsLoc;
+ protected static Properties propsMes;
protected Selenium selenium;
/**
@@ -77,23 +84,49 @@
selenium.stop();
}
- private static Properties getProperties() throws IOException {
+ private static Properties getProperties(String resource) throws IOException {
ClassLoader cl = ClassLoader.getSystemClassLoader();
- InputStream is = cl.getResourceAsStream("org/jboss/portal/test/selenium/locator.properties");
+ InputStream is = cl.getResourceAsStream(resource);
Properties props = new Properties();
props.load(is);
if (props == null) {
- is = JBossPortalSeleniumTestCase.class.getResourceAsStream("org/jboss/portal/test/selenium/locator.properties");
+ is = JBossPortalSeleniumTestCase.class.getResourceAsStream(resource);
props.load(is);
}
- if (props == null) {
- // System.out.println("still null");
- }
return props;
}
+ private String getProperty(Properties properties, String property, String subst) {
+
+ if (subst == null || "".equals(subst)) {
+ subst = "Locator not set";
+ }
+
+ if (properties == null) {
+ return subst;
+ } else {
+ return properties.getProperty(property) != null ? properties.getProperty(property) : subst;
+ }
+ }
+
/**
+ * Gets the property. Property file is named assert.properties and it's
+ * located in the org.jboss.portal.test.selenium package. It contains
+ * messages used in asserts in selenium tests.
+ *
+ * @param prop
+ * the name of the property
+ * @param subst
+ * the value which is returned in the case the property isn't set
+ *
+ * @return the prop
+ */
+ public String getMess(String prop, String subst) {
+ return getProperty(propsMes, prop, subst);
+ }
+
+ /**
* Gets the property. Property file is named locator.properties and it's
* located in the org.jboss.portal.test.selenium package. It contains
* locator properties for all locators used in selenium tests.
@@ -105,19 +138,8 @@
*
* @return the prop
*/
- public String getProp(String prop, String subst) {
-
- if (subst == null || "".equals(subst)) {
- subst = "Locator not set";
- }
-
- if (props == null) {
- // System.out.println("props null");
- return subst;
- } else {
- // System.out.println("! props null");
- return props.getProperty(prop) != null ? props.getProperty(prop) : subst;
- }
+ public String getLoc(String prop, String subst) {
+ return getProperty(propsLoc, prop, subst);
}
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalAjaxSamplesTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -18,97 +18,97 @@
/** prefix for locator properties = samples.ajax.*/
public static String casePfx = "samples.ajax.";
- private final String SES_LNK_INVALIDATE = getProp(casePfx+"ses.lnk.invalidate","link=invalidate");
- private final String RES_DIV_RTEXT = getProp(casePfx+"res.div.rtext","repeat-text");
- private final String RES_DIV_PTEXT = getProp(casePfx+"res.div.ptext","product-text");
- private final String RES_LNK_P3 = getProp(casePfx+"res.lnk.p3","link=Product3");
- private final String RES_LNK_P2 = getProp(casePfx+"res.lnk.p2","link=Product2");
- private final String RES_LNK_P1 = getProp(casePfx+"res.lnk.p1","link=Product1");
- private final String RES_INP = getProp(casePfx+"res.inp","repeat");
- private final String RES_LNK = getProp(casePfx+"res.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[17]/a");
- private final String WIN_DIV_CON = getProp(casePfx+"win.div.con","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String WIN_LNK = getProp(casePfx+"win.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[16]/a");
- private final String SES_TAB_PSCOPE = getProp(casePfx+"ses.tab.pscope","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table");
- private final String SES_TAB_ASCOPE = getProp(casePfx+"ses.tab.ascope","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table[2]");
- private final String SES_SUB_ASCOPE = getProp(casePfx+"ses.sub.ascope","application");
- private final String SES_SUB_PSCOPE = getProp(casePfx+"ses.sub.pscope","portlet");
- private final String SES_INP_VAL = getProp(casePfx+"ses.inp.val","value");
- private final String SES_INP_NAM = getProp(casePfx+"ses.inp.nam","name");
- private final String SES_LNK = getProp(casePfx+"ses.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[14]/a");
- private final String PUB_1_LNK_FOO_REM = getProp(casePfx+"pub.1.lnk.foo.rem","//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
- private final String PUB_3_LNK_BAR_REM = getProp(casePfx+"pub.3.lnk.bar.rem","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/a");
- private final String PUB_3_LNK_JUU_REM = getProp(casePfx+"pub.3.lnk.juu.rem","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
- private final String PUB_SUB_2 = getProp(casePfx+"pub.sub.2","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[3]/td/input");
- private final String PUB_SUB_1 = getProp(casePfx+"pub.sub.1","//input[@value='Update']");
- private final String PUB_DIV_3_BAR = getProp(casePfx+"pub.div.3.bar","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/input");
- private final String PUB_DIV_3_JUU = getProp(casePfx+"pub.div.3.juu","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
- private final String PUB_DIV_2_JUU = getProp(casePfx+"pub.div.2.juu","juu");
- private final String PUB_DIV_2_FOO = getProp(casePfx+"pub.div.2.foo","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
- private final String PUB_DIV_1_BAR = getProp(casePfx+"pub.div.1.bar","bar");
- private final String PUB_DIV_1_FOO = getProp(casePfx+"pub.div.1.foo","foo");
- private final String PUB_LNK = getProp(casePfx+"pub.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[12]/a");
- private final String PEVT_DIV_P3_MAX = getProp(casePfx+"pevt.div.p3.max","//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_P2_MAX = getProp(casePfx+"pevt.div.p2.max","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_L3_MAX = getProp(casePfx+"pevt.div.l3.max","//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_L2_MAX = getProp(casePfx+"pevt.div.l2.max","//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
- private final String PEVT_DIV_P3 = getProp(casePfx+"pevt.div.p3","//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_P2 = getProp(casePfx+"pevt.div.p2","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_P1 = getProp(casePfx+"pevt.div.p1","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_L3 = getProp(casePfx+"pevt.div.l3","//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_L2 = getProp(casePfx+"pevt.div.l2","//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_DIV_L1 = getProp(casePfx+"pevt.div.l1","//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String PEVT_LNK = getProp(casePfx+"pevt.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[11]/a");
- private final String MOD_DIV_CON = getProp(casePfx+"mod.div.con","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
- private final String MOD_LNK = getProp(casePfx+"mod.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[10]/a");
- private final String MPOR_DIV_CON = getProp(casePfx+"mpor.div.con","content-container");
- private final String MPOR_LNK = getProp(casePfx+"mpor.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[9]/a");
- private final String MINS_DIV_CON = getProp(casePfx+"mins.div.con","content-container");
- private final String MINS_LNK = getProp(casePfx+"mins.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[8]/a");
- private final String JS_LNK_SUBMIT = getProp(casePfx+"js.lnk.submit","link=submit");
- private final String JS_OPT_3 = getProp(casePfx+"js.opt.3","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[3]");
- private final String JS_OPT_2 = getProp(casePfx+"js.opt.2","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[2]");
- private final String JS_OPT_1 = getProp(casePfx+"js.opt.1","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[1]");
- private final String JS_LAB_C = getProp(casePfx+"js.lab.c","label=C");
- private final String JS_LAB_B = getProp(casePfx+"js.lab.b","label=B");
- private final String JS_LAB_A = getProp(casePfx+"js.lab.a","label=A");
- private final String JS_SEL_LETTER = getProp(casePfx+"js.sel.letter","//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]");
- private final String JS_LNK = getProp(casePfx+"js.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[7]/a");
- private final String HEAD_INP_CONTENT = getProp(casePfx+"head.inp.content","Introducing-HeaderContentInput");
- private final String HEAD_DIV_CONTENT = getProp(casePfx+"head.div.content","Introducing-HeaderContent");
- private final String HEAD_LNK = getProp(casePfx+"head.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[6]/a");
- private final String EXC_LNK_PORTLET = getProp(casePfx+"exc.lnk.portlet","link=render PortletException");
- private final String EXC_LNK = getProp(casePfx+"exc.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[5]/a");
- private final String EVT_SUB_COLOR = getProp(casePfx+"evt.sub.color","//input[@type='submit']");
- private final String EVT_DIV_BLACK = getProp(casePfx+"evt.div.black","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'black')]");
- private final String EVT_DIV_RED = getProp(casePfx+"evt.div.red","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'red')]");
- private final String EVT_DIV_BLUE = getProp(casePfx+"evt.div.blue","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'blue')]");
- private final String EVT_SEL_LAB_BLACK = getProp(casePfx+"evt.sel.lab.black","label=black");
- private final String EVT_SEL_LAB_RED = getProp(casePfx+"evt.sel.lab.red","label=red");
- private final String EVT_SEL_LAB_BLUE = getProp(casePfx+"evt.sel.lab.blue","label=blue");
- private final String EVT_SEL_COL = getProp(casePfx+"evt.sel.col","color");
- private final String EVT_LNK = getProp(casePfx+"evt.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[4]/a");
- private final String ENC_LNK = getProp(casePfx+"enc.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[3]/a");
- private final String ENC_INP_REN = getProp(casePfx+"enc.inp.ren","text");
- private final String ENC_SUB_ACT = getProp(casePfx+"enc.sub.act","//input[@value='Submit to action phase']");
- private final String ENC_INP_ACT = getProp(casePfx+"enc.inp.act","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div/form[2]/input");
- private final String ENC_TEXTAREA2 = getProp(casePfx+"enc.textarea2","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/textarea");
- private final String ENC_TEXTAREA1 = getProp(casePfx+"enc.textarea1","//textarea[@name='text']");
- private final String CHAR_ALL_SUB_CHECK = getProp(casePfx+"char.all.sub.check","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[8]/form/input[3]");
- private final String CHAR_INP_TEXT_SUB_CHECK = getProp(casePfx+"char.inp.text.sub.check","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[6]/form/input[4]");
- private final String CHAR_LNK_TEXTAREA_CHECK = getProp(casePfx+"char.lnk.textarea.check","//input[@value='check']");
- private final String CHAR_INP_TEXT = getProp(casePfx+"char.inp.text","//input[@name='text']");
- private final String CHAR_TEXTAREA = getProp(casePfx+"char.textarea","text");
- private final String CHAR_SUB_CHANGE = getProp(casePfx+"char.sub.change","//input[@value='change']");
- private final String CHAR_INP_TO = getProp(casePfx+"char.inp.to","to");
- private final String CHAR_INP_FROM = getProp(casePfx+"char.inp.from","from");
- private final String CHAR_LNK = getProp(casePfx+"char.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[2]/a");
- private final String CACHE_LNK = getProp(casePfx+"cache.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[1]/a");
- private final String CACHE_LNK_2REN = getProp(casePfx+"cache.lnk.2ren","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/a");
- private final String CACHE_LNK_2ACT = getProp(casePfx+"cache.lnk.2act","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[4]/a");
- private final String CACHE_LNK_1REN = getProp(casePfx+"cache.lnk.1ren","link=render");
- private final String CACHE_LNK_1ACT = getProp(casePfx+"cache.lnk.1act","link=action");
- private final String CACHE_DIV_2_RENDER = getProp(casePfx+"cache.div.2.render","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
- private final String CACHE_DIV_1_RENDER = getProp(casePfx+"cache.div.1.render","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
+ private final String SES_LNK_INVALIDATE = getLoc(casePfx+"ses.lnk.invalidate","link=invalidate");
+ private final String RES_DIV_RTEXT = getLoc(casePfx+"res.div.rtext","repeat-text");
+ private final String RES_DIV_PTEXT = getLoc(casePfx+"res.div.ptext","product-text");
+ private final String RES_LNK_P3 = getLoc(casePfx+"res.lnk.p3","link=Product3");
+ private final String RES_LNK_P2 = getLoc(casePfx+"res.lnk.p2","link=Product2");
+ private final String RES_LNK_P1 = getLoc(casePfx+"res.lnk.p1","link=Product1");
+ private final String RES_INP = getLoc(casePfx+"res.inp","repeat");
+ private final String RES_LNK = getLoc(casePfx+"res.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[17]/a");
+ private final String WIN_DIV_CON = getLoc(casePfx+"win.div.con","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String WIN_LNK = getLoc(casePfx+"win.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[16]/a");
+ private final String SES_TAB_PSCOPE = getLoc(casePfx+"ses.tab.pscope","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table");
+ private final String SES_TAB_ASCOPE = getLoc(casePfx+"ses.tab.ascope","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/table[2]");
+ private final String SES_SUB_ASCOPE = getLoc(casePfx+"ses.sub.ascope","application");
+ private final String SES_SUB_PSCOPE = getLoc(casePfx+"ses.sub.pscope","portlet");
+ private final String SES_INP_VAL = getLoc(casePfx+"ses.inp.val","value");
+ private final String SES_INP_NAM = getLoc(casePfx+"ses.inp.nam","name");
+ private final String SES_LNK = getLoc(casePfx+"ses.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[14]/a");
+ private final String PUB_1_LNK_FOO_REM = getLoc(casePfx+"pub.1.lnk.foo.rem","//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
+ private final String PUB_3_LNK_BAR_REM = getLoc(casePfx+"pub.3.lnk.bar.rem","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/a");
+ private final String PUB_3_LNK_JUU_REM = getLoc(casePfx+"pub.3.lnk.juu.rem","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/a");
+ private final String PUB_SUB_2 = getLoc(casePfx+"pub.sub.2","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[3]/td/input");
+ private final String PUB_SUB_1 = getLoc(casePfx+"pub.sub.1","//input[@value='Update']");
+ private final String PUB_DIV_3_BAR = getLoc(casePfx+"pub.div.3.bar","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr[2]/td[2]/input");
+ private final String PUB_DIV_3_JUU = getLoc(casePfx+"pub.div.3.juu","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
+ private final String PUB_DIV_2_JUU = getLoc(casePfx+"pub.div.2.juu","juu");
+ private final String PUB_DIV_2_FOO = getLoc(casePfx+"pub.div.2.foo","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/form/table/tbody/tr/td[2]/input");
+ private final String PUB_DIV_1_BAR = getLoc(casePfx+"pub.div.1.bar","bar");
+ private final String PUB_DIV_1_FOO = getLoc(casePfx+"pub.div.1.foo","foo");
+ private final String PUB_LNK = getLoc(casePfx+"pub.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[12]/a");
+ private final String PEVT_DIV_P3_MAX = getLoc(casePfx+"pevt.div.p3.max","//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_P2_MAX = getLoc(casePfx+"pevt.div.p2.max","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_L3_MAX = getLoc(casePfx+"pevt.div.l3.max","//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_L2_MAX = getLoc(casePfx+"pevt.div.l2.max","//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr/td[2]/div/div[2]/span/a");
+ private final String PEVT_DIV_P3 = getLoc(casePfx+"pevt.div.p3","//html/body/div[2]/div/div/div[2]/div[2]/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_P2 = getLoc(casePfx+"pevt.div.p2","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_P1 = getLoc(casePfx+"pevt.div.p1","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_L3 = getLoc(casePfx+"pevt.div.l3","//html/body/div[2]/div/div/div[2]/div/div/div[3]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_L2 = getLoc(casePfx+"pevt.div.l2","//html/body/div[2]/div/div/div[2]/div/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_DIV_L1 = getLoc(casePfx+"pevt.div.l1","//html/body/div[2]/div/div/div[2]/div/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String PEVT_LNK = getLoc(casePfx+"pevt.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[11]/a");
+ private final String MOD_DIV_CON = getLoc(casePfx+"mod.div.con","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div");
+ private final String MOD_LNK = getLoc(casePfx+"mod.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[10]/a");
+ private final String MPOR_DIV_CON = getLoc(casePfx+"mpor.div.con","content-container");
+ private final String MPOR_LNK = getLoc(casePfx+"mpor.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[9]/a");
+ private final String MINS_DIV_CON = getLoc(casePfx+"mins.div.con","content-container");
+ private final String MINS_LNK = getLoc(casePfx+"mins.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[8]/a");
+ private final String JS_LNK_SUBMIT = getLoc(casePfx+"js.lnk.submit","link=submit");
+ private final String JS_OPT_3 = getLoc(casePfx+"js.opt.3","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[3]");
+ private final String JS_OPT_2 = getLoc(casePfx+"js.opt.2","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[2]");
+ private final String JS_OPT_1 = getLoc(casePfx+"js.opt.1","//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[1]");
+ private final String JS_LAB_C = getLoc(casePfx+"js.lab.c","label=C");
+ private final String JS_LAB_B = getLoc(casePfx+"js.lab.b","label=B");
+ private final String JS_LAB_A = getLoc(casePfx+"js.lab.a","label=A");
+ private final String JS_SEL_LETTER = getLoc(casePfx+"js.sel.letter","//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]");
+ private final String JS_LNK = getLoc(casePfx+"js.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[7]/a");
+ private final String HEAD_INP_CONTENT = getLoc(casePfx+"head.inp.content","Introducing-HeaderContentInput");
+ private final String HEAD_DIV_CONTENT = getLoc(casePfx+"head.div.content","Introducing-HeaderContent");
+ private final String HEAD_LNK = getLoc(casePfx+"head.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[6]/a");
+ private final String EXC_LNK_PORTLET = getLoc(casePfx+"exc.lnk.portlet","link=render PortletException");
+ private final String EXC_LNK = getLoc(casePfx+"exc.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[5]/a");
+ private final String EVT_SUB_COLOR = getLoc(casePfx+"evt.sub.color","//input[@type='submit']");
+ private final String EVT_DIV_BLACK = getLoc(casePfx+"evt.div.black","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'black')]");
+ private final String EVT_DIV_RED = getLoc(casePfx+"evt.div.red","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'red')]");
+ private final String EVT_DIV_BLUE = getLoc(casePfx+"evt.div.blue","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[contains(@style,'blue')]");
+ private final String EVT_SEL_LAB_BLACK = getLoc(casePfx+"evt.sel.lab.black","label=black");
+ private final String EVT_SEL_LAB_RED = getLoc(casePfx+"evt.sel.lab.red","label=red");
+ private final String EVT_SEL_LAB_BLUE = getLoc(casePfx+"evt.sel.lab.blue","label=blue");
+ private final String EVT_SEL_COL = getLoc(casePfx+"evt.sel.col","color");
+ private final String EVT_LNK = getLoc(casePfx+"evt.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[4]/a");
+ private final String ENC_LNK = getLoc(casePfx+"enc.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[3]/a");
+ private final String ENC_INP_REN = getLoc(casePfx+"enc.inp.ren","text");
+ private final String ENC_SUB_ACT = getLoc(casePfx+"enc.sub.act","//input[@value='Submit to action phase']");
+ private final String ENC_INP_ACT = getLoc(casePfx+"enc.inp.act","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div/form[2]/input");
+ private final String ENC_TEXTAREA2 = getLoc(casePfx+"enc.textarea2","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/textarea");
+ private final String ENC_TEXTAREA1 = getLoc(casePfx+"enc.textarea1","//textarea[@name='text']");
+ private final String CHAR_ALL_SUB_CHECK = getLoc(casePfx+"char.all.sub.check","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[8]/form/input[3]");
+ private final String CHAR_INP_TEXT_SUB_CHECK = getLoc(casePfx+"char.inp.text.sub.check","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[6]/form/input[4]");
+ private final String CHAR_LNK_TEXTAREA_CHECK = getLoc(casePfx+"char.lnk.textarea.check","//input[@value='check']");
+ private final String CHAR_INP_TEXT = getLoc(casePfx+"char.inp.text","//input[@name='text']");
+ private final String CHAR_TEXTAREA = getLoc(casePfx+"char.textarea","text");
+ private final String CHAR_SUB_CHANGE = getLoc(casePfx+"char.sub.change","//input[@value='change']");
+ private final String CHAR_INP_TO = getLoc(casePfx+"char.inp.to","to");
+ private final String CHAR_INP_FROM = getLoc(casePfx+"char.inp.from","from");
+ private final String CHAR_LNK = getLoc(casePfx+"char.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[2]/a");
+ private final String CACHE_LNK = getLoc(casePfx+"cache.lnk","//ul[@id='tabsHeader']/li[4]/ul/li[1]/a");
+ private final String CACHE_LNK_2REN = getLoc(casePfx+"cache.lnk.2ren","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[5]/a");
+ private final String CACHE_LNK_2ACT = getLoc(casePfx+"cache.lnk.2act","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[4]/a");
+ private final String CACHE_LNK_1REN = getLoc(casePfx+"cache.lnk.1ren","link=render");
+ private final String CACHE_LNK_1ACT = getLoc(casePfx+"cache.lnk.1act","link=action");
+ private final String CACHE_DIV_2_RENDER = getLoc(casePfx+"cache.div.2.render","//html/body/div[2]/div/div/div[2]/div[2]/div/div[2]/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
+ private final String CACHE_DIV_1_RENDER = getLoc(casePfx+"cache.div.1.render","//html/body/div[2]/div/div/div[2]/div[2]/div/div/div/div/table/tbody/tr[2]/td[2]/div/div/div[2]/div");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortalSamplesTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -18,109 +18,109 @@
/** prefix for locator properties = samples.*/
public static String casePfx = "samples.";
- private final String SES_LNK_INVALIDATE = getProp(casePfx + "ses.lnk.invalidate", "link=invalidate");
- private final String RES_DIV_RTEXT = getProp(casePfx + "res.div.rtext", "repeat-text");
- private final String RES_DIV_PTEXT = getProp(casePfx + "res.div.ptext", "product-text");
- private final String RES_LNK_P3 = getProp(casePfx + "res.lnk.p3", "link=Product3");
- private final String RES_LNK_P2 = getProp(casePfx + "res.lnk.p2", "link=Product2");
- private final String RES_LNK_P1 = getProp(casePfx + "res.lnk.p1", "link=Product1");
- private final String RES_INP = getProp(casePfx + "res.inp", "repeat");
- private final String RES_LNK = getProp(casePfx + "res.lnk", "link=serveResource Demo");
- private final String WIN_DIV_CON = getProp(casePfx + "win.div.con", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
- private final String WIN_LNK = getProp(casePfx + "win.lnk", "link=Window id test");
- private final String SES_TAB_PSCOPE = getProp(casePfx + "ses.tab.pscope", "//html/body/div[2]/div/div/div[2]/div[2]/div/table/tbody/tr[2]/td[2]/div/table");
- private final String SES_TAB_ASCOPE = getProp(casePfx + "ses.tab.ascope",
+ private final String SES_LNK_INVALIDATE = getLoc(casePfx + "ses.lnk.invalidate", "link=invalidate");
+ private final String RES_DIV_RTEXT = getLoc(casePfx + "res.div.rtext", "repeat-text");
+ private final String RES_DIV_PTEXT = getLoc(casePfx + "res.div.ptext", "product-text");
+ private final String RES_LNK_P3 = getLoc(casePfx + "res.lnk.p3", "link=Product3");
+ private final String RES_LNK_P2 = getLoc(casePfx + "res.lnk.p2", "link=Product2");
+ private final String RES_LNK_P1 = getLoc(casePfx + "res.lnk.p1", "link=Product1");
+ private final String RES_INP = getLoc(casePfx + "res.inp", "repeat");
+ private final String RES_LNK = getLoc(casePfx + "res.lnk", "link=serveResource Demo");
+ private final String WIN_DIV_CON = getLoc(casePfx + "win.div.con", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
+ private final String WIN_LNK = getLoc(casePfx + "win.lnk", "link=Window id test");
+ private final String SES_TAB_PSCOPE = getLoc(casePfx + "ses.tab.pscope", "//html/body/div[2]/div/div/div[2]/div[2]/div/table/tbody/tr[2]/td[2]/div/table");
+ private final String SES_TAB_ASCOPE = getLoc(casePfx + "ses.tab.ascope",
"//html/body/div[2]/div/div/div[2]/div[2]/div/table/tbody/tr[2]/td[2]/div/table[2]");
- private final String SES_SUB_ASCOPE = getProp(casePfx + "ses.sub.ascope", "application");
- private final String SES_SUB_PSCOPE = getProp(casePfx + "ses.sub.pscope", "portlet");
- private final String SES_INP_VAL = getProp(casePfx + "ses.inp.val", "value");
- private final String SES_INP_NAM = getProp(casePfx + "ses.inp.nam", "name");
- private final String SES_LNK = getProp(casePfx + "ses.lnk", "link=Session test");
- private final String PUB_1_LNK_FOO_REM = getProp(casePfx + "pub.1.lnk.foo.rem", "link=Remove");
- private final String PUB_3_LNK_BAR_REM = getProp(casePfx + "pub.3.lnk.bar.rem",
+ private final String SES_SUB_ASCOPE = getLoc(casePfx + "ses.sub.ascope", "application");
+ private final String SES_SUB_PSCOPE = getLoc(casePfx + "ses.sub.pscope", "portlet");
+ private final String SES_INP_VAL = getLoc(casePfx + "ses.inp.val", "value");
+ private final String SES_INP_NAM = getLoc(casePfx + "ses.inp.nam", "name");
+ private final String SES_LNK = getLoc(casePfx + "ses.lnk", "link=Session test");
+ private final String PUB_1_LNK_FOO_REM = getLoc(casePfx + "pub.1.lnk.foo.rem", "link=Remove");
+ private final String PUB_3_LNK_BAR_REM = getLoc(casePfx + "pub.3.lnk.bar.rem",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[2]/td[2]/a");
- private final String PUB_3_LNK_JUU_REM = getProp(casePfx + "pub.3.lnk.juu.rem",
+ private final String PUB_3_LNK_JUU_REM = getLoc(casePfx + "pub.3.lnk.juu.rem",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[1]/td[2]/a");
- private final String PUB_SUB_2 = getProp(casePfx + "pub.sub.2", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[3]/td/input");
- private final String PUB_SUB_1 = getProp(casePfx + "pub.sub.1", "//input[@value='Update']");
- private final String PUB_DIV_3_BAR = getProp(casePfx + "pub.div.3.bar",
+ private final String PUB_SUB_2 = getLoc(casePfx + "pub.sub.2", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[3]/td/input");
+ private final String PUB_SUB_1 = getLoc(casePfx + "pub.sub.1", "//input[@value='Update']");
+ private final String PUB_DIV_3_BAR = getLoc(casePfx + "pub.div.3.bar",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[2]/td[2]/input");
- private final String PUB_DIV_3_JUU = getProp(casePfx + "pub.div.3.juu",
+ private final String PUB_DIV_3_JUU = getLoc(casePfx + "pub.div.3.juu",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[1]/td[2]/input");
- private final String PUB_DIV_2_JUU = getProp(casePfx + "pub.div.2.juu", "juu");
- private final String PUB_DIV_2_FOO = getProp(casePfx + "pub.div.2.foo",
+ private final String PUB_DIV_2_JUU = getLoc(casePfx + "pub.div.2.juu", "juu");
+ private final String PUB_DIV_2_FOO = getLoc(casePfx + "pub.div.2.foo",
"//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/form/table/tbody/tr[1]/td[2]/input");
- private final String PUB_DIV_1_BAR = getProp(casePfx + "pub.div.1.bar", "bar");
- private final String PUB_DIV_1_FOO = getProp(casePfx + "pub.div.1.foo", "foo");
- private final String PUB_LNK = getProp(casePfx + "pub.lnk", "link=Public parameters test");
- private final String PEVT_DIV_P3_MAX = getProp(casePfx + "pevt.div.p3.max", "//div[@id='regionB']/div[3]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
- private final String PEVT_DIV_P2_MAX = getProp(casePfx + "pevt.div.p2.max", "//div[@id='regionB']/div[2]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
- private final String PEVT_DIV_L3_MAX = getProp(casePfx + "pevt.div.l3.max", "//div[@id='regionA']/div[3]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
- private final String PEVT_DIV_L2_MAX = getProp(casePfx + "pevt.div.l2.max", "//div[@id='regionA']/div[2]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
- private final String PEVT_DIV_P3 = getProp(casePfx + "pevt.div.p3", "//div[@id='regionB']/div[3]/table/tbody/tr[2]/td[2]/div/");
- private final String PEVT_DIV_P2 = getProp(casePfx + "pevt.div.p2", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/");
- private final String PEVT_DIV_P1 = getProp(casePfx + "pevt.div.p1", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/");
- private final String PEVT_DIV_L3 = getProp(casePfx + "pevt.div.l3", "//div[@id='regionA']/div[3]/table/tbody/tr[2]/td[2]/div/");
- private final String PEVT_DIV_L2 = getProp(casePfx + "pevt.div.l2", "//div[@id='regionA']/div[2]/table/tbody/tr[2]/td[2]/div/");
- private final String PEVT_DIV_L1 = getProp(casePfx + "pevt.div.l1", "//div[@id='regionA']/div[1]/table/tbody/tr[2]/td[2]/div/");
- private final String PEVT_LNK = getProp(casePfx + "pevt.lnk", "link=Page event test");
- private final String MOD_DIV_CON = getProp(casePfx + "mod.div.con", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
- private final String MOD_LNK = getProp(casePfx + "mod.lnk", "link=Mode test");
- private final String MPOR_DIV_CON = getProp(casePfx + "mpor.div.con", "content-container");
- private final String MPOR_LNK = getProp(casePfx + "mpor.lnk", "link=Missing portlet");
- private final String MINS_DIV_CON = getProp(casePfx + "mins.div.con", "content-container");
- private final String MINS_LNK = getProp(casePfx + "mins.lnk", "link=Missing instance");
- private final String JS_LNK_SUBMIT = getProp(casePfx + "js.lnk.submit", "link=submit");
- private final String JS_OPT_3 = getProp(casePfx + "js.opt.3", "//form[contains(@id,'_the_form')]/select/option[3]");
- private final String JS_OPT_2 = getProp(casePfx + "js.opt.2", "//form[contains(@id,'_the_form')]/select/option[2]");
- private final String JS_OPT_1 = getProp(casePfx + "js.opt.1", "//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[1]");
- private final String JS_LAB_C = getProp(casePfx + "js.lab.c", "label=C");
- private final String JS_LAB_B = getProp(casePfx + "js.lab.b", "label=B");
- private final String JS_LAB_A = getProp(casePfx + "js.lab.a", "label=A");
- private final String JS_SEL_LETTER = getProp(casePfx + "js.sel.letter",
+ private final String PUB_DIV_1_BAR = getLoc(casePfx + "pub.div.1.bar", "bar");
+ private final String PUB_DIV_1_FOO = getLoc(casePfx + "pub.div.1.foo", "foo");
+ private final String PUB_LNK = getLoc(casePfx + "pub.lnk", "link=Public parameters test");
+ private final String PEVT_DIV_P3_MAX = getLoc(casePfx + "pevt.div.p3.max", "//div[@id='regionB']/div[3]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
+ private final String PEVT_DIV_P2_MAX = getLoc(casePfx + "pevt.div.p2.max", "//div[@id='regionB']/div[2]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
+ private final String PEVT_DIV_L3_MAX = getLoc(casePfx + "pevt.div.l3.max", "//div[@id='regionA']/div[3]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
+ private final String PEVT_DIV_L2_MAX = getLoc(casePfx + "pevt.div.l2.max", "//div[@id='regionA']/div[2]/table/tbody/tr[1]/td[2]/div[2]/span[1]/a");
+ private final String PEVT_DIV_P3 = getLoc(casePfx + "pevt.div.p3", "//div[@id='regionB']/div[3]/table/tbody/tr[2]/td[2]/div/");
+ private final String PEVT_DIV_P2 = getLoc(casePfx + "pevt.div.p2", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/");
+ private final String PEVT_DIV_P1 = getLoc(casePfx + "pevt.div.p1", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/");
+ private final String PEVT_DIV_L3 = getLoc(casePfx + "pevt.div.l3", "//div[@id='regionA']/div[3]/table/tbody/tr[2]/td[2]/div/");
+ private final String PEVT_DIV_L2 = getLoc(casePfx + "pevt.div.l2", "//div[@id='regionA']/div[2]/table/tbody/tr[2]/td[2]/div/");
+ private final String PEVT_DIV_L1 = getLoc(casePfx + "pevt.div.l1", "//div[@id='regionA']/div[1]/table/tbody/tr[2]/td[2]/div/");
+ private final String PEVT_LNK = getLoc(casePfx + "pevt.lnk", "link=Page event test");
+ private final String MOD_DIV_CON = getLoc(casePfx + "mod.div.con", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div");
+ private final String MOD_LNK = getLoc(casePfx + "mod.lnk", "link=Mode test");
+ private final String MPOR_DIV_CON = getLoc(casePfx + "mpor.div.con", "content-container");
+ private final String MPOR_LNK = getLoc(casePfx + "mpor.lnk", "link=Missing portlet");
+ private final String MINS_DIV_CON = getLoc(casePfx + "mins.div.con", "content-container");
+ private final String MINS_LNK = getLoc(casePfx + "mins.lnk", "link=Missing instance");
+ private final String JS_LNK_SUBMIT = getLoc(casePfx + "js.lnk.submit", "link=submit");
+ private final String JS_OPT_3 = getLoc(casePfx + "js.opt.3", "//form[contains(@id,'_the_form')]/select/option[3]");
+ private final String JS_OPT_2 = getLoc(casePfx + "js.opt.2", "//form[contains(@id,'_the_form')]/select/option[2]");
+ private final String JS_OPT_1 = getLoc(casePfx + "js.opt.1", "//form[@id='jbpnsFormAutoSubmitPortletWindowsnpbj_the_form']/select/option[1]");
+ private final String JS_LAB_C = getLoc(casePfx + "js.lab.c", "label=C");
+ private final String JS_LAB_B = getLoc(casePfx + "js.lab.b", "label=B");
+ private final String JS_LAB_A = getLoc(casePfx + "js.lab.a", "label=A");
+ private final String JS_SEL_LETTER = getLoc(casePfx + "js.sel.letter",
"//select[@onclick=\"document.getElementById('jbpnsFormAutoSubmitPortletWindowsnpbj_the_form').submit()\"]");
- private final String JS_LNK = getProp(casePfx + "js.lnk", "link=Javascript test");
- private final String HEAD_INP_CONTENT = getProp(casePfx + "head.inp.content", "Introducing-HeaderContentInput");
- private final String HEAD_DIV_CONTENT = getProp(casePfx + "head.div.content", "Introducing-HeaderContent");
- private final String HEAD_LNK = getProp(casePfx + "head.lnk", "link=Header test");
- private final String FS_LNK = getProp(casePfx + "fs.lnk", "link=File system content");
- private final String EXC_LNK_PORTLET = getProp(casePfx + "exc.lnk.portlet", "link=render PortletException");
- private final String EXC_LNK = getProp(casePfx + "exc.lnk", "link=Exception test");
- private final String EVT_SUB_COLOR = getProp(casePfx + "evt.sub.color", "//input[@type='submit']");
- private final String EVT_DIV_BLACK = getProp(casePfx + "evt.div.black",
+ private final String JS_LNK = getLoc(casePfx + "js.lnk", "link=Javascript test");
+ private final String HEAD_INP_CONTENT = getLoc(casePfx + "head.inp.content", "Introducing-HeaderContentInput");
+ private final String HEAD_DIV_CONTENT = getLoc(casePfx + "head.div.content", "Introducing-HeaderContent");
+ private final String HEAD_LNK = getLoc(casePfx + "head.lnk", "link=Header test");
+ private final String FS_LNK = getLoc(casePfx + "fs.lnk", "link=File system content");
+ private final String EXC_LNK_PORTLET = getLoc(casePfx + "exc.lnk.portlet", "link=render PortletException");
+ private final String EXC_LNK = getLoc(casePfx + "exc.lnk", "link=Exception test");
+ private final String EVT_SUB_COLOR = getLoc(casePfx + "evt.sub.color", "//input[@type='submit']");
+ private final String EVT_DIV_BLACK = getLoc(casePfx + "evt.div.black",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'black')]");
- private final String EVT_DIV_RED = getProp(casePfx + "evt.div.red", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'red')]");
- private final String EVT_DIV_BLUE = getProp(casePfx + "evt.div.blue",
+ private final String EVT_DIV_RED = getLoc(casePfx + "evt.div.red", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'red')]");
+ private final String EVT_DIV_BLUE = getLoc(casePfx + "evt.div.blue",
"//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[contains(@style,'blue')]");
- private final String EVT_SEL_LAB_BLACK = getProp(casePfx + "evt.sel.lab.black", "label=black");
- private final String EVT_SEL_LAB_RED = getProp(casePfx + "evt.sel.lab.red", "label=red");
- private final String EVT_SEL_LAB_BLUE = getProp(casePfx + "evt.sel.lab.blue", "label=blue");
- private final String EVT_SEL_COL = getProp(casePfx + "evt.sel.col", "color");
- private final String EVT_LNK = getProp(casePfx + "evt.lnk", "link=Event test");
- private final String ENC_LNK = getProp(casePfx + "enc.lnk", "link=Encoding test");
- private final String ENC_INP_REN = getProp(casePfx + "enc.inp.ren", "text");
- private final String ENC_SUB_ACT = getProp(casePfx + "enc.sub.act", "//input[@value='Submit to action phase']");
- private final String ENC_INP_ACT = getProp(casePfx + "enc.inp.act", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div/div[1]/form[2]/input[1]");
- private final String ENC_TEXTAREA2 = getProp(casePfx + "enc.textarea2", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div/div[5]/textarea");
- private final String ENC_TEXTAREA1 = getProp(casePfx + "enc.textarea1", "//textarea[@name='text']");
- private final String CHAR_ALL_SUB_CHECK = getProp(casePfx + "char.all.sub.check",
+ private final String EVT_SEL_LAB_BLACK = getLoc(casePfx + "evt.sel.lab.black", "label=black");
+ private final String EVT_SEL_LAB_RED = getLoc(casePfx + "evt.sel.lab.red", "label=red");
+ private final String EVT_SEL_LAB_BLUE = getLoc(casePfx + "evt.sel.lab.blue", "label=blue");
+ private final String EVT_SEL_COL = getLoc(casePfx + "evt.sel.col", "color");
+ private final String EVT_LNK = getLoc(casePfx + "evt.lnk", "link=Event test");
+ private final String ENC_LNK = getLoc(casePfx + "enc.lnk", "link=Encoding test");
+ private final String ENC_INP_REN = getLoc(casePfx + "enc.inp.ren", "text");
+ private final String ENC_SUB_ACT = getLoc(casePfx + "enc.sub.act", "//input[@value='Submit to action phase']");
+ private final String ENC_INP_ACT = getLoc(casePfx + "enc.inp.act", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div/div[1]/form[2]/input[1]");
+ private final String ENC_TEXTAREA2 = getLoc(casePfx + "enc.textarea2", "//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div/div[5]/textarea");
+ private final String ENC_TEXTAREA1 = getLoc(casePfx + "enc.textarea1", "//textarea[@name='text']");
+ private final String CHAR_ALL_SUB_CHECK = getLoc(casePfx + "char.all.sub.check",
"//html/body/div[2]/div/div/div[2]/div[2]/div/table/tbody/tr[2]/td[2]/div/div[8]/form/input[3]");
- private final String CHAR_INP_TEXT_SUB_CHECK = getProp(casePfx + "char.inp.text.sub.check",
+ private final String CHAR_INP_TEXT_SUB_CHECK = getLoc(casePfx + "char.inp.text.sub.check",
"//div[@id='regionB']/div/table/tbody/tr[2]/td[2]/div/div[8]/form/input[3]");
- private final String CHAR_LNK_TEXTAREA_CHECK = getProp(casePfx + "char.lnk.textarea.check", "//input[@value='check']");
- private final String CHAR_INP_TEXT = getProp(casePfx + "char.inp.text", "//input[@name='text']");
- private final String CHAR_TEXTAREA = getProp(casePfx + "char.textarea", "text");
- private final String CHAR_SUB_CHANGE = getProp(casePfx + "char.sub.change", "//input[@value='change']");
- private final String CHAR_INP_TO = getProp(casePfx + "char.inp.to", "to");
- private final String CHAR_INP_FROM = getProp(casePfx + "char.inp.from", "from");
- private final String CHAR_LNK = getProp(casePfx + "char.lnk", "link=Charset test");
- private final String CACHE_LNK = getProp(casePfx + "cache.lnk", "link=Cache test");
- private final String CACHE_LNK_2REN = getProp(casePfx + "cache.lnk.2ren", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[5]/a");
- private final String CACHE_LNK_2ACT = getProp(casePfx + "cache.lnk.2act", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[4]/a");
- private final String CACHE_LNK_1REN = getProp(casePfx + "cache.lnk.1ren", "link=render");
- private final String CACHE_LNK_1ACT = getProp(casePfx + "cache.lnk.1act", "link=action");
- private final String CACHE_2RENDER = getProp(casePfx + "cache.2render", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[2]/div");
- private final String CACHE_1RENDER = getProp(casePfx + "cache.1render", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/div[2]/div");
+ private final String CHAR_LNK_TEXTAREA_CHECK = getLoc(casePfx + "char.lnk.textarea.check", "//input[@value='check']");
+ private final String CHAR_INP_TEXT = getLoc(casePfx + "char.inp.text", "//input[@name='text']");
+ private final String CHAR_TEXTAREA = getLoc(casePfx + "char.textarea", "text");
+ private final String CHAR_SUB_CHANGE = getLoc(casePfx + "char.sub.change", "//input[@value='change']");
+ private final String CHAR_INP_TO = getLoc(casePfx + "char.inp.to", "to");
+ private final String CHAR_INP_FROM = getLoc(casePfx + "char.inp.from", "from");
+ private final String CHAR_LNK = getLoc(casePfx + "char.lnk", "link=Charset test");
+ private final String CACHE_LNK = getLoc(casePfx + "cache.lnk", "link=Cache test");
+ private final String CACHE_LNK_2REN = getLoc(casePfx + "cache.lnk.2ren", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[5]/a");
+ private final String CACHE_LNK_2ACT = getLoc(casePfx + "cache.lnk.2act", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[4]/a");
+ private final String CACHE_LNK_1REN = getLoc(casePfx + "cache.lnk.1ren", "link=render");
+ private final String CACHE_LNK_1ACT = getLoc(casePfx + "cache.lnk.1act", "link=action");
+ private final String CACHE_2RENDER = getLoc(casePfx + "cache.2render", "//div[@id='regionB']/div[2]/table/tbody/tr[2]/td[2]/div/div[2]/div");
+ private final String CACHE_1RENDER = getLoc(casePfx + "cache.1render", "//div[@id='regionB']/div[1]/table/tbody/tr[2]/td[2]/div/div[2]/div");
/**
* Login before test.
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/PortletUserCreationTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -17,34 +17,34 @@
public String casePfx = "user.crea.port.";
/** The SUBMI t_ creat e_ conf. */
- private final String SUBMIT_CREATE_CONF = getProp(casePfx+"submit.create.conf","//input[contains(@id,'confirm-form:user')]");
+ private final String SUBMIT_CREATE_CONF = getLoc(casePfx+"submit.create.conf","//input[contains(@id,'confirm-form:user')]");
/** The SUBMI t_ creat e_ con f_ edit. */
- public final String SUBMIT_CREATE_CONF_EDIT = getProp(casePfx+"submit.create.conf.edit","//input[contains(@id,'//input[contains(@id,'confirm-form:revise')]");
+ public final String SUBMIT_CREATE_CONF_EDIT = getLoc(casePfx+"submit.create.conf.edit","//input[contains(@id,'//input[contains(@id,'confirm-form:revise')]");
/** The SUBMI t_ creat e_ user. */
- private final String SUBMIT_CREATE_USER = getProp(casePfx+"submit.create.user","//input[contains(@id,'register-form:submit')]");
+ private final String SUBMIT_CREATE_USER = getLoc(casePfx+"submit.create.user","//input[contains(@id,'register-form:submit')]");
/** The SUBMI t_ creat e_ use r_ cancel. */
- private final String SUBMIT_CREATE_USER_CANCEL = getProp(casePfx+"submit.create.user.cancel","//input[contains(@id,'register-form:cancel')]");
+ private final String SUBMIT_CREATE_USER_CANCEL = getLoc(casePfx+"submit.create.user.cancel","//input[contains(@id,'register-form:cancel')]");
/** The INPU t_ userpasswdconf. */
- private final String INPUT_USERPASSWDCONF = getProp(casePfx+"input.userpasswdconf","//input[contains(@id,'register-form:passwordCheckv");
+ private final String INPUT_USERPASSWDCONF = getLoc(casePfx+"input.userpasswdconf","//input[contains(@id,'register-form:passwordCheckv");
/** The INPU t_ userpasswd. */
- private final String INPUT_USERPASSWD = getProp(casePfx+"input.userpasswd","//input[contains(@id,'register-form:password')]");
+ private final String INPUT_USERPASSWD = getLoc(casePfx+"input.userpasswd","//input[contains(@id,'register-form:password')]");
/** The INPU t_ usermail. */
- private final String INPUT_USERMAIL = getProp(casePfx+"input.usermail","//input[contains(@id,'register-form:email')]");
+ private final String INPUT_USERMAIL = getLoc(casePfx+"input.usermail","//input[contains(@id,'register-form:email')]");
/** The INPU t_ username. */
- private final String INPUT_USERNAME = getProp(casePfx+"input.username","//input[contains(@id,'register-form:username')]");
+ private final String INPUT_USERNAME = getLoc(casePfx+"input.username","//input[contains(@id,'register-form:username')]");
/** The LIN k_ creat e_ user. */
- private final String LINK_CREATE_USER = getProp(casePfx+"link.create.user","//a[contains(@id,'create-account-form:register')]");
+ private final String LINK_CREATE_USER = getLoc(casePfx+"link.create.user","//a[contains(@id,'create-account-form:register')]");
/** The TA b_ welcome. */
- private final String TAB_WELCOME = getProp(casePfx+"tab.welcome","//a[contains(@id,'register-temp-form:start-link')]");
+ private final String TAB_WELCOME = getLoc(casePfx+"tab.welcome","//a[contains(@id,'register-temp-form:start-link')]");
/**
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/UserLoginTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -17,15 +17,15 @@
/** prefix for locator properties = user.login.*/
public final String casePfx = "user.login.";
- private final String ADR_PORTAL = getProp(casePfx+"adr.portal","/portal");
- private final String FRM_MAIN = getProp(casePfx+"frm.main","relative=up");
- private final String SUB_CANCEL = getProp(casePfx+"sub.portal","cancel");
- private final String LNK_LOGOUT = getProp(casePfx+"lnk.logout","link=Logout");
- private final String SUB_LOGIN = getProp(casePfx+"sub.login","login");
- private final String INP_PASSWORD = getProp(casePfx+"inp.password","xpath=id('j_password')");
- private final String INP_USERNAME = getProp(casePfx+"inp.username","xpath=id('j_username')");
- private final String FRM_LOGINFORM = getProp(casePfx+"frm.login","login-content");
- private final String LNK_LOGIN = getProp(casePfx+"lnk.login","link=Login");
+ private final String ADR_PORTAL = getLoc(casePfx+"adr.portal","/portal");
+ private final String FRM_MAIN = getLoc(casePfx+"frm.main","relative=up");
+ private final String SUB_CANCEL = getLoc(casePfx+"sub.portal","cancel");
+ private final String LNK_LOGOUT = getLoc(casePfx+"lnk.logout","link=Logout");
+ private final String SUB_LOGIN = getLoc(casePfx+"sub.login","login");
+ private final String INP_PASSWORD = getLoc(casePfx+"inp.password","xpath=id('j_password')");
+ private final String INP_USERNAME = getLoc(casePfx+"inp.username","xpath=id('j_username')");
+ private final String FRM_LOGINFORM = getLoc(casePfx+"frm.login","login-content");
+ private final String LNK_LOGIN = getLoc(casePfx+"lnk.login","link=Login");
@AfterClass(enabled = true)
private void logoutIfNeeded()
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/WSRPTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -18,34 +18,34 @@
/** prefix for locator properties */
public static String casePfx = "test.wsrp.";
- private final String INP_CONSUMER_NAME = getProp(casePfx+"inp.consumer.name","//input[contains(@id,'edit-cons-form:id')]");
- private final String SUB_REFRESH_CANCEL = getProp(casePfx+"submit.refresh.cancel","//a[contains(@id,'edit-cons-form:list-cons-link')]");
- private final String SUB_PROD_SAVE = getProp(casePfx+"submit.prod.save","//input[contains(@id,'producer-form:save-producer')]");
- private final String SUB_CONSDEL_CONF = getProp(casePfx+"submit.consdel.conf","//a[contains(@id,'confirm-delete-form:destroy-link')]");
- private final String SUB_CONS_REGVAL = getProp(casePfx+"submit.cons.regval","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
- private final String SUB_REFRESHFINAL = getProp(casePfx+"submit.refreshfinal","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
- private final String INPUT_CONS_REGVALUE = getProp(casePfx+"input.cons.regvalue","//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]");
- private final String SUBMIT_REFRESHSAVE = getProp(casePfx+"submit.refreshsave","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
- private final String INPUT_CONSWSDL = getProp(casePfx+"input.conswsdl","//input[contains(@id,'edit-cons-form:wsdl')]");
- private final String INPUT_CACHEEXP = getProp(casePfx+"input.cacheexp","//input[contains(@id,'edit-cons-form:cache')]");
- private final String SUBMIT_ADDPROP_INIT = getProp(casePfx+"submit.addprop.init","//a[contains(@id,'producer-form:add-reg-prop')]");
- private final String SUBMIT_ADDPROP = getProp(casePfx+"submit.addprop","//a[contains(@id,'producer-form:add-reg-prop')]");
- private final String INPUT_PROPHINT = getProp(casePfx+"input.prophint","//input[contains(@id,'producer-form:reg-properties:0:hint')]");
- private final String INPUT_PROPLABEL = getProp(casePfx+"input.proplabel","//input[contains(@id,'producer-form:reg-properties:0:label')]");
- private final String INPUT_PROPNAME = getProp(casePfx+"input.propname","//input[contains(@id,'producer-form:reg-properties:0:name')]");
- private final String SUBMIT_CREATECONS = getProp(casePfx+"submit.createcons","//input[contains(@id,'createConsumer:createConsumerButton')]");
- private final String INPUT_CREATECONS = getProp(casePfx+"input.createcons","//input[contains(@id,'createConsumer:consumerName')]");
- private final String ID_LINK_PRODCONF = getProp(casePfx+"id.link.prodconf","//a[contains(@id,'cons-temp-form:producer-link')]");
- private final String ID_LINK_CONSCONF = getProp(casePfx+"id.link.consconf","//a[contains(@id,'producer-temp-form:consumersTab')]");
- private final String LINK_CONSUMER_HOME =getProp(casePfx+"link.consumer.home","//a[contains(@id,'cons-temp-form1:list-cons-link')]");
- private final String LINK_T_CONS_CON=getProp(casePfx+"link.t.cons.con","//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]");
- private final String LINK_T_CONS_REF=getProp(casePfx+"link.t.cons.ref","//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]");
- private final String LINK_T_CONS_ACT=getProp(casePfx+"link.t.cons.act","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
- private final String LINK_T_CONS_DEA=getProp(casePfx+"link.t.cons.dea","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
- private final String LINK_T_CONS_REG=getProp(casePfx+"link.t.cons.reg","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
- private final String LINK_T_CONS_DER=getProp(casePfx+"link.t.cons.der","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
- private final String LINK_T_CONS_DEL=getProp(casePfx+"link.t.cons.del","//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]");
- private final String WSRP_CONSUMER_TABLE = getProp(casePfx+"link.wsrp.consumer.table","//table[contains(@id,':consumer-list-form:consumersList')]");
+ private final String INP_CONSUMER_NAME = getLoc(casePfx+"inp.consumer.name","//input[contains(@id,'edit-cons-form:id')]");
+ private final String SUB_REFRESH_CANCEL = getLoc(casePfx+"submit.refresh.cancel","//a[contains(@id,'edit-cons-form:list-cons-link')]");
+ private final String SUB_PROD_SAVE = getLoc(casePfx+"submit.prod.save","//input[contains(@id,'producer-form:save-producer')]");
+ private final String SUB_CONSDEL_CONF = getLoc(casePfx+"submit.consdel.conf","//a[contains(@id,'confirm-delete-form:destroy-link')]");
+ private final String SUB_CONS_REGVAL = getLoc(casePfx+"submit.cons.regval","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+ private final String SUB_REFRESHFINAL = getLoc(casePfx+"submit.refreshfinal","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+ private final String INPUT_CONS_REGVALUE = getLoc(casePfx+"input.cons.regvalue","//input[contains(@id,'edit-cons-form:existingProps:0:prop-value-input')]");
+ private final String SUBMIT_REFRESHSAVE = getLoc(casePfx+"submit.refreshsave","//input[contains(@id,'edit-cons-form:refresh-cons-link')]");
+ private final String INPUT_CONSWSDL = getLoc(casePfx+"input.conswsdl","//input[contains(@id,'edit-cons-form:wsdl')]");
+ private final String INPUT_CACHEEXP = getLoc(casePfx+"input.cacheexp","//input[contains(@id,'edit-cons-form:cache')]");
+ private final String SUBMIT_ADDPROP_INIT = getLoc(casePfx+"submit.addprop.init","//a[contains(@id,'producer-form:add-reg-prop')]");
+ private final String SUBMIT_ADDPROP = getLoc(casePfx+"submit.addprop","//a[contains(@id,'producer-form:add-reg-prop')]");
+ private final String INPUT_PROPHINT = getLoc(casePfx+"input.prophint","//input[contains(@id,'producer-form:reg-properties:0:hint')]");
+ private final String INPUT_PROPLABEL = getLoc(casePfx+"input.proplabel","//input[contains(@id,'producer-form:reg-properties:0:label')]");
+ private final String INPUT_PROPNAME = getLoc(casePfx+"input.propname","//input[contains(@id,'producer-form:reg-properties:0:name')]");
+ private final String SUBMIT_CREATECONS = getLoc(casePfx+"submit.createcons","//input[contains(@id,'createConsumer:createConsumerButton')]");
+ private final String INPUT_CREATECONS = getLoc(casePfx+"input.createcons","//input[contains(@id,'createConsumer:consumerName')]");
+ private final String ID_LINK_PRODCONF = getLoc(casePfx+"id.link.prodconf","//a[contains(@id,'cons-temp-form:producer-link')]");
+ private final String ID_LINK_CONSCONF = getLoc(casePfx+"id.link.consconf","//a[contains(@id,'producer-temp-form:consumersTab')]");
+ private final String LINK_CONSUMER_HOME =getLoc(casePfx+"link.consumer.home","//a[contains(@id,'cons-temp-form1:list-cons-link')]");
+ private final String LINK_T_CONS_CON=getLoc(casePfx+"link.t.cons.con","//a[contains(@id,''consumer-list-form:consumersList:{0}:configure'')]");
+ private final String LINK_T_CONS_REF=getLoc(casePfx+"link.t.cons.ref","//a[contains(@id,''consumer-list-form:consumersList:{0}:refresh'')]");
+ private final String LINK_T_CONS_ACT=getLoc(casePfx+"link.t.cons.act","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
+ private final String LINK_T_CONS_DEA=getLoc(casePfx+"link.t.cons.dea","//a[contains(@id,''consumer-list-form:consumersList:{0}:activate'')]");
+ private final String LINK_T_CONS_REG=getLoc(casePfx+"link.t.cons.reg","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
+ private final String LINK_T_CONS_DER=getLoc(casePfx+"link.t.cons.der","//a[contains(@id,''consumer-list-form:consumersList:{0}:register'')]");
+ private final String LINK_T_CONS_DEL=getLoc(casePfx+"link.t.cons.del","//a[contains(@id,''consumer-list-form:consumersList:{0}:delete'')]");
+ private final String WSRP_CONSUMER_TABLE = getLoc(casePfx+"link.wsrp.consumer.table","//table[contains(@id,':consumer-list-form:consumersList')]");
@BeforeMethod(groups = { "log" })
private void loginBeforeTest() {
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/assert.properties 2009-04-24 13:49:58 UTC (rev 13268)
@@ -0,0 +1 @@
+cms.sec.denied=You are not allowed to access the resource
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSArchiveUploadTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -33,13 +33,13 @@
*/
/** prefix for locator properties = cms.arch.*/
public final String casePfx = "cms.arch.";
- private final String SUB_CANCEL_ARCH_UPLOAD = getProp(casePfx+"sub.cancel.arch.upload","cancel");
- private final String LNK_ADMIN = getProp(casePfx+"lnk.admin","link=Admin");
- private final String LNK_CMS = getProp(casePfx+"lnk.cms","link=CMS");
- private final String SUB_SEND_ARCHIVE = getProp(casePfx+"sub.send.archive","submit");
- private final String INP_ARCHIVE_FILE = getProp(casePfx+"inp.archive.file","response");
- private final String DIV_ARCHIVE_STATUS = getProp(casePfx+"div.archive.status","//div[@id='center']/div/div/table/tbody/tr[2]/td/font");
- private final String SEL_ACTION = getProp(casePfx+"sel.action","//div[@id='center']/div/div/div[1]/div/select");
+ private final String SUB_CANCEL_ARCH_UPLOAD = getLoc(casePfx+"sub.cancel.arch.upload","cancel");
+ private final String LNK_ADMIN = getLoc(casePfx+"lnk.admin","link=Admin");
+ private final String LNK_CMS = getLoc(casePfx+"lnk.cms","link=CMS");
+ private final String SUB_SEND_ARCHIVE = getLoc(casePfx+"sub.send.archive","submit");
+ private final String INP_ARCHIVE_FILE = getLoc(casePfx+"inp.archive.file","response");
+ private final String DIV_ARCHIVE_STATUS = getLoc(casePfx+"div.archive.status","//div[@id='center']/div/div/table/tbody/tr[2]/td/font");
+ private final String SEL_ACTION = getLoc(casePfx+"sel.action","//div[@id='center']/div/div/div[1]/div/select");
private final String WORKSPACE = System.getProperty("workspace");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSDirectoryTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -17,15 +17,15 @@
/** prefix for locator properties = cms.dir.*/
public final String casePfx = "cms.dir.";
- private final String SEL_CMS_ACTION = getProp(casePfx + "sel.cms.action", "//div[@id='center']/div/div/div[1]/div/select");
- private final String ADR_CMS_INTERFACE = getProp(casePfx + "adr.cms.interface", "/portal/auth/portal/admin/CMS");
+ private final String SEL_CMS_ACTION = getLoc(casePfx + "sel.cms.action", "//div[@id='center']/div/div/div[1]/div/select");
+ private final String ADR_CMS_INTERFACE = getLoc(casePfx + "adr.cms.interface", "/portal/auth/portal/admin/CMS");
private final String defaultDirName = "default";
private final String tempDirName = "tempDir";
private final String copyDirName = "copySrc";
private final String moveDirName = "moveSrc";
- private final String CMS_FILE_TABLE = getProp(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
+ private final String CMS_FILE_TABLE = getLoc(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -19,9 +19,9 @@
/** prefix for locator properties = cms.file. */
private final String casePfx = "cms.file.";
- private final String TBL_CMS_FILEVER = getProp(casePfx + "tbl.cms.filever", "//div[@id='center']/div/div/table");
- public final String TBL_CMS_FILE = getProp(casePfx + "tbl.cms.file", "//div[@id='center']/div/div/div[3]/table");
- public final String TBL_FILE_PENDING = getProp(casePfx + "tbl.file.pending", "//div[@id='center']/div/div/table[2]");
+ private final String TBL_CMS_FILEVER = getLoc(casePfx + "tbl.cms.filever", "//div[@id='center']/div/div/table");
+ public final String TBL_CMS_FILE = getLoc(casePfx + "tbl.cms.file", "//div[@id='center']/div/div/div[3]/table");
+ public final String TBL_FILE_PENDING = getLoc(casePfx + "tbl.file.pending", "//div[@id='center']/div/div/table[2]");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileUploadTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -27,7 +27,7 @@
/** prefix for locator properties = cms.file.up. */
private final String casePfx = "cms.file.up.";
- private final String CMS_FILE_TABLE = getProp(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
+ private final String CMS_FILE_TABLE = getLoc(casePfx + "cms.file.table", "//div[@id='center']/div/div/div[3]/table");
private final String WORKSPACE = System.getProperty("workspace");
@BeforeMethod(groups = { "log" })
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileWorkflowTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -19,30 +19,30 @@
public final String casePfx = "cms.file.work.";
- private final String LAB_LANG_CZECH = getProp(casePfx+"lab.lang.czech","label=Czech");
- private final String LNK_DENY = getProp(casePfx+"lnk.deny","link=Deny");
- private final String LNK_PREVIEW = getProp(casePfx+"lnk.preview","link=Preview");
- private final String LNK_APPROVE = getProp(casePfx+"lnk.approve","link=Approve");
- private final String SUB_FILE_CREATE = getProp(casePfx+"sub.file.create","save");
- private final String SUB_FILE_CREATE_CANCEL = getProp(casePfx+"sub.file.create.cancel","cancel");
- private final String SEL_LANG = getProp(casePfx+"sel.lang","language");
- private final String INP_TITLE = getProp(casePfx+"inp.title","title");
- private final String INP_DESC = getProp(casePfx+"inp.desc","description");
- private final String INP_FILENAME = getProp(casePfx+"inp.filename","filename");
- private final String LAB_CREATE_FILE = getProp(casePfx+"lab.create.file","label=Create File");
- private final String LNK_CMS = getProp(casePfx+"lnk.cms","link=CMS");
- private final String LNK_ADMIN = getProp(casePfx+"lnk.admin","link=Admin");
+ private final String LAB_LANG_CZECH = getLoc(casePfx+"lab.lang.czech","label=Czech");
+ private final String LNK_DENY = getLoc(casePfx+"lnk.deny","link=Deny");
+ private final String LNK_PREVIEW = getLoc(casePfx+"lnk.preview","link=Preview");
+ private final String LNK_APPROVE = getLoc(casePfx+"lnk.approve","link=Approve");
+ private final String SUB_FILE_CREATE = getLoc(casePfx+"sub.file.create","save");
+ private final String SUB_FILE_CREATE_CANCEL = getLoc(casePfx+"sub.file.create.cancel","cancel");
+ private final String SEL_LANG = getLoc(casePfx+"sel.lang","language");
+ private final String INP_TITLE = getLoc(casePfx+"inp.title","title");
+ private final String INP_DESC = getLoc(casePfx+"inp.desc","description");
+ private final String INP_FILENAME = getLoc(casePfx+"inp.filename","filename");
+ private final String LAB_CREATE_FILE = getLoc(casePfx+"lab.create.file","label=Create File");
+ private final String LNK_CMS = getLoc(casePfx+"lnk.cms","link=CMS");
+ private final String LNK_ADMIN = getLoc(casePfx+"lnk.admin","link=Admin");
- public final String SELECT_CMS_MAIN = getProp(casePfx+"select.cms.main","//div[@id='center']/div/div/div[1]/div/select");
- public final String CMS_FILE_TABLE = getProp(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
+ public final String SELECT_CMS_MAIN = getLoc(casePfx+"select.cms.main","//div[@id='center']/div/div/div[1]/div/select");
+ public final String CMS_FILE_TABLE = getLoc(casePfx+"cms.file.table","//div[@id='center']/div/div/div[3]/table");
- public final String CMS_T_SELECT = getProp(casePfx+"cms.t.select","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select");
- public final String CMS_T_SUBMIT = getProp(casePfx+"cms.t.submit","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input");
+ public final String CMS_T_SELECT = getLoc(casePfx+"cms.t.select","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/select");
+ public final String CMS_T_SUBMIT = getLoc(casePfx+"cms.t.submit","//div[@id=''center'']/div/div/div[3]/table/tbody/tr[{0}]/td[2]/form/input");
- public final String CMS_WF_TABLE = getProp(casePfx+"cms.wf.table","//div[@id='center']/div/div/table[2]");
- public final String CMS_FV_TABLE = getProp(casePfx+"cms.fv.table","//div[@id='center']/div/div/table");
- public final String CMS_T_VER = getProp(casePfx+"cms.t.ver","//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a");
- public final String WYSIWYG_EDITOR_LOCATOR = getProp(casePfx+"wysiwyg.editor.locator","mce_editor_0");
+ public final String CMS_WF_TABLE = getLoc(casePfx+"cms.wf.table","//div[@id='center']/div/div/table[2]");
+ public final String CMS_FV_TABLE = getLoc(casePfx+"cms.fv.table","//div[@id='center']/div/div/table");
+ public final String CMS_T_VER = getLoc(casePfx+"cms.t.ver","//div[@id=''center'']/div/div/table/tbody/tr[{0}]/td[1]/a");
+ public final String WYSIWYG_EDITOR_LOCATOR = getLoc(casePfx+"wysiwyg.editor.locator","mce_editor_0");
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSSecureTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -21,46 +21,47 @@
/**
*
*/
- private static final String MSG_ACCESS_DENIED = "You are not allowed to access the resource";
-
+ /** prefix for locator properties = cms.sec. */
private final String casePfx = "cms.sec.";
- private final String LNK_EXPLORE = getProp(casePfx + "lnk.explore", "//area[@href='/portal/content/default/epp.html']");
- private final String LNK_CMS_EXPLORE = getProp(casePfx + "lnk.cms.explore", "Link=epp.html");
- private final String LNK_MEMBERS = getProp(casePfx + "lnk.members", "link=Members");
- private final String SUB_SECURITY_SET = getProp(casePfx + "sub.security.set", "//input[contains(@name,'submit')]");
- private final String SEL_SECUREUSERS_MANAGE = getProp(casePfx + "sel.secureusers.manage", "//select[contains(@name,'secureusers:manage')]");
- private final String SEL_SECUREROLES_MANAGE = getProp(casePfx + "sel.secureroles.manage", "//select[contains(@name,'secureroles:manage')]");
- private final String SEL_SECUREUSERS_WRITE = getProp(casePfx + "sel.secureusers.write", "//select[contains(@name,'secureusers:write')]");
- private final String SEL_SECUREROLES_WRITE = getProp(casePfx + "sel.secureroles.write", "//select[contains(@name,'secureroles:write')]");
- private final String SEL_SECUREUSERS_READ = getProp(casePfx + "sel.secureusers.read", "//select[contains(@name,'secureusers:read')]");
- private final String SEL_SECUREROLES_READ = getProp(casePfx + "sel.secureroles.read", "//select[contains(@name,'secureroles:read')]");
- private final String LNK_INDEX_HTML = getProp(casePfx + "lnk.index.html", "link=index.html");
- private final String LNK_DEFAULT = getProp(casePfx + "lnk.default", "link=default");
- private final String LNK_CMS = getProp(casePfx + "lnk.cms", "link=CMS");
- private final String LNK_ADMIN = getProp(casePfx + "lnk.admin", "link=Admin");
- private final String LNK_LOGOUT = getProp(casePfx + "lnk.logout", "link=Logout");
- private final String SEL_CMS_ACTION = getProp(casePfx + "sel.cms.action", "//div[@id='center']/div/div/div[1]/div/select");
+ private final String MSG_ACCESS_DENIED = getMess(casePfx + "denied", "You are nt allowed to access the resource");
+
+ private final String LNK_EXPLORE = getLoc(casePfx + "lnk.explore", "//area[@href='/portal/content/default/epp.html']");
+ private final String LNK_CMS_EXPLORE = getLoc(casePfx + "lnk.cms.explore", "Link=epp.html");
+ private final String LNK_MEMBERS = getLoc(casePfx + "lnk.members", "link=Members");
+ private final String SUB_SECURITY_SET = getLoc(casePfx + "sub.security.set", "//input[contains(@name,'submit')]");
+ private final String SEL_SECUREUSERS_MANAGE = getLoc(casePfx + "sel.secureusers.manage", "//select[contains(@name,'secureusers:manage')]");
+ private final String SEL_SECUREROLES_MANAGE = getLoc(casePfx + "sel.secureroles.manage", "//select[contains(@name,'secureroles:manage')]");
+ private final String SEL_SECUREUSERS_WRITE = getLoc(casePfx + "sel.secureusers.write", "//select[contains(@name,'secureusers:write')]");
+ private final String SEL_SECUREROLES_WRITE = getLoc(casePfx + "sel.secureroles.write", "//select[contains(@name,'secureroles:write')]");
+ private final String SEL_SECUREUSERS_READ = getLoc(casePfx + "sel.secureusers.read", "//select[contains(@name,'secureusers:read')]");
+ private final String SEL_SECUREROLES_READ = getLoc(casePfx + "sel.secureroles.read", "//select[contains(@name,'secureroles:read')]");
+ private final String LNK_INDEX_HTML = getLoc(casePfx + "lnk.index.html", "link=index.html");
+ private final String LNK_DEFAULT = getLoc(casePfx + "lnk.default", "link=default");
+ private final String LNK_CMS = getLoc(casePfx + "lnk.cms", "link=CMS");
+ private final String LNK_ADMIN = getLoc(casePfx + "lnk.admin", "link=Admin");
+ private final String LNK_LOGOUT = getLoc(casePfx + "lnk.logout", "link=Logout");
+ private final String SEL_CMS_ACTION = getLoc(casePfx + "sel.cms.action", "//div[@id='center']/div/div/div[1]/div/select");
/** prefix for locator properties = user.login. */
public String caseIPfx = "iden.man.";
- private final String LNK_ROLETAB = getProp(caseIPfx + "lnk.roletab", "//a[contains(@id,'user-temp-form:role-mgm-link')]");
- private final String LNK_ROLEMAIN = getProp(caseIPfx + "lnk.rolemain", "//a[contains(@id, 'role-temp-form1:role-admin-link')]");
- private final String LNK_ROLE_CREATE = getProp(caseIPfx + "lnk.role.create", "//a[contains(@id, 'create-role-form:create-role-link')]");
- private final String INP_ROLEDISNAME = getProp(caseIPfx + "inp.roledisname", "//input[contains(@id,'create-role-form:roledisplayname')]");
- private final String INP_ROLENAME = getProp(caseIPfx + "inp.rolename", "//input[contains(@id,'create-role-form:rolename')]");
- private final String SUB_ROLE_CREATE = getProp(caseIPfx + "sub.role.create", "//input[contains(@id,'create-role-form:submit')]");
- private final String SUB_ASSIGN_ROLE = getProp(caseIPfx + "sub.assign.role", "//input[contains(@id,'assign-roles-form:submit')]");
- private final String CHK_ROLE = getProp(caseIPfx + "chk.role", "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']");
- private final String LNK_USERTAB = getProp(caseIPfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
- private final String LNK_USERMAIN = getProp(caseIPfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
- private final String LNK_USERMANG_MAIN = getProp(caseIPfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
- private final String SUB_SEARCH_USER = getProp(caseIPfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
- private final String INP_SEARCH_USER = getProp(caseIPfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
- private final String LNK_SEARCH_USER = getProp(caseIPfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
- private final String TBL_USERLIST = getProp(caseIPfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
- private final String LNK_T_USRLIST_ROLES = getProp(caseIPfx + "lnk.t.usrlist.roles",
+ private final String LNK_ROLETAB = getLoc(caseIPfx + "lnk.roletab", "//a[contains(@id,'user-temp-form:role-mgm-link')]");
+ private final String LNK_ROLEMAIN = getLoc(caseIPfx + "lnk.rolemain", "//a[contains(@id, 'role-temp-form1:role-admin-link')]");
+ private final String LNK_ROLE_CREATE = getLoc(caseIPfx + "lnk.role.create", "//a[contains(@id, 'create-role-form:create-role-link')]");
+ private final String INP_ROLEDISNAME = getLoc(caseIPfx + "inp.roledisname", "//input[contains(@id,'create-role-form:roledisplayname')]");
+ private final String INP_ROLENAME = getLoc(caseIPfx + "inp.rolename", "//input[contains(@id,'create-role-form:rolename')]");
+ private final String SUB_ROLE_CREATE = getLoc(caseIPfx + "sub.role.create", "//input[contains(@id,'create-role-form:submit')]");
+ private final String SUB_ASSIGN_ROLE = getLoc(caseIPfx + "sub.assign.role", "//input[contains(@id,'assign-roles-form:submit')]");
+ private final String CHK_ROLE = getLoc(caseIPfx + "chk.role", "//input[contains(@name,''assign-roles-form:roles'') and @value=''{0}'']");
+ private final String LNK_USERTAB = getLoc(caseIPfx + "lnk.usertab", "//a[contains(@id,'role-temp-form:manage-users')]");
+ private final String LNK_USERMAIN = getLoc(caseIPfx + "lnk.usermain", "//a[contains(@id,'user-temp-form1:user-adm-link')]");
+ private final String LNK_USERMANG_MAIN = getLoc(caseIPfx + "lnk.usermang.main", "//a[contains(@id,'user-temp-form1:assign-role-link')]");
+ private final String SUB_SEARCH_USER = getLoc(caseIPfx + "sub.search.user", "//input[contains(@id,'search-user-form:search') and @type='submit']");
+ private final String INP_SEARCH_USER = getLoc(caseIPfx + "inp.search.user", "//input[contains(@id,'search-user-form:searchString')]");
+ private final String LNK_SEARCH_USER = getLoc(caseIPfx + "lnk.search.user", "//a[contains(@id,'user-form:search-user-link')]");
+ private final String TBL_USERLIST = getLoc(caseIPfx + "tbl.userlist", "//table[contains(@id,'search-user-form1:userlist')]");
+ private final String LNK_T_USRLIST_ROLES = getLoc(caseIPfx + "lnk.t.usrlist.roles",
"//a[contains(@id,''search-user-form1:userlist:{0}:assign-role-link'')]");
@AfterMethod(groups = { "log" })
@@ -268,7 +269,7 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();
-
+ System.out.println(MSG_ACCESS_DENIED);
Assert.assertTrue(selenium.isTextPresent(MSG_ACCESS_DENIED), "Secured resource is visible after logout.");
login("user", "user");
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/AdminPortalTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -20,71 +20,71 @@
/** prefix for locator properties = portal.admin.*/
public final String casePfx = "portal.admin.";
- private final String LNK_PP_PROP_DELETE = getProp(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
- private final String SUB_PP_PROPVAL_UPDATE = getProp(casePfx+"sub.pp.propval.update","//input[contains(@id,'common-manage-prop-form:update')]");
- private final String INP_PP_PROP_VAL = getProp(casePfx+"inp.pp.prop.val","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
- private final String SUB_PPA_FORM_UPDATE = getProp(casePfx+"sub.ppa.form.update","//input[contains(@id,'common-edit-page-error-form:update')]");
- private final String INP_PPA_RES_SELECT = getProp(casePfx+"inp.ppa.res.select","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
- private final String SEL_PPA_NF_SELECT = getProp(casePfx+"sel.ppa.nf.select","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
- private final String SEL_PPA_INTERNAL_SELECT = getProp(casePfx+"sel.ppa.internal.select","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
- private final String SEL_PPA_ERROR_SELECT = getProp(casePfx+"sel.ppa.error.select","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
- private final String SEL_PPA_CONTROL_SELECT = getProp(casePfx+"sel.ppa.control.select","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
- private final String SEL_PPA_ACCESS_SELECT = getProp(casePfx+"sel.ppa.access.select","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
- private final String CHK_PPA_RES_CHECK = getProp(casePfx+"chk.ppa.res.check","//input[contains(@id,'common-edit-page-error-form:page-res-check')]");
- private final String CHK_PPA_NF_CHECK = getProp(casePfx+"chk.ppa.nf.check","//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]");
- private final String CHK_PPA_INTERNAL_CHECK = getProp(casePfx+"chk.ppa.internal.check","//input[contains(@id,'common-edit-page-error-form:page-internal-check')]");
- private final String CHK_PPA_ERROR_CHECK = getProp(casePfx+"chk.ppa.error.check","//input[contains(@id,'common-edit-page-error-form:page-error-check')]");
- private final String CHK_PPA_CONTROL_CHECK = getProp(casePfx+"chk.ppa.control.check","//input[contains(@id,'common-edit-page-error-form:page-control-check')]");
- private final String CHK_PPA_ACCESS_CHECK = getProp(casePfx+"chk.ppa.access.check","//input[contains(@id,'common-edit-page-error-form:page-access-check')]");
- private final String SUB_PP_ERROR_FORM_UPDATE = getProp(casePfx+"sub.pp.error.form.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
- private final String INP_PP_RES_INPUT = getProp(casePfx+"inp.pp.res.input","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
- private final String SEL_PP_NF_SELECT = getProp(casePfx+"sel.pp.nf.select","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
- private final String SEL_PP_INTERNAL_SELECT = getProp(casePfx+"sel.pp.internal.select","//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]");
- private final String SEL_PP_ERROR_SELECT = getProp(casePfx+"sel.pp.error.select","//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]");
- private final String SEL_PP_UNAVAIL_SELECT = getProp(casePfx+"sel.pp.unavail.select","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
- private final String SEL_PP_ACCESS_SELECT = getProp(casePfx+"sel.pp.access.select","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
- private final String CHK_PP_RES_CHECK = getProp(casePfx+"chk.pp.res.check","//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]");
- private final String CHK_PP_NF_CHECK = getProp(casePfx+"chk.pp.nf.check","//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]");
- private final String CHK_PP_INTERNAL_CHECK = getProp(casePfx+"chk.pp.internal.check","//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]");
- private final String CHK_PP_ERROR_CHECK = getProp(casePfx+"chk.pp.error.check","//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]");
- private final String CHK_PP_ACCESS_CHECK = getProp(casePfx+"chk.pp.access.check","//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]");
- private final String CHK_PP_UNAVAIL_CHECK = getProp(casePfx+"chk.pp.unavail.check","//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]");
- private final String SUB_PP_PROPADD = getProp(casePfx+"sub.pp.propadd","//input[contains(@id,'common-edit-prop-form:add-property')]");
- private final String INP_PP_PROPNAME = getProp(casePfx+"inp.pp.propname","//input[contains(@id,'common-edit-prop-form:property')]");
- private final String SUB_PP_LISTENER = getProp(casePfx+"sub.pp.listener","//input[contains(@id,'edit-prop-form:update')]");
- private final String SEL_PP_LISTENER = getProp(casePfx+"sel.pp.listener","//select[contains(@id,'edit-prop-form:listener')]");
- private final String TBL_PP_PROPS = getProp(casePfx+"tbl.pp.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
+ private final String LNK_PP_PROP_DELETE = getLoc(casePfx+"lnk.pp.prop.delete","//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
+ private final String SUB_PP_PROPVAL_UPDATE = getLoc(casePfx+"sub.pp.propval.update","//input[contains(@id,'common-manage-prop-form:update')]");
+ private final String INP_PP_PROP_VAL = getLoc(casePfx+"inp.pp.prop.val","//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
+ private final String SUB_PPA_FORM_UPDATE = getLoc(casePfx+"sub.ppa.form.update","//input[contains(@id,'common-edit-page-error-form:update')]");
+ private final String INP_PPA_RES_SELECT = getLoc(casePfx+"inp.ppa.res.select","//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
+ private final String SEL_PPA_NF_SELECT = getLoc(casePfx+"sel.ppa.nf.select","//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
+ private final String SEL_PPA_INTERNAL_SELECT = getLoc(casePfx+"sel.ppa.internal.select","//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
+ private final String SEL_PPA_ERROR_SELECT = getLoc(casePfx+"sel.ppa.error.select","//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
+ private final String SEL_PPA_CONTROL_SELECT = getLoc(casePfx+"sel.ppa.control.select","//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
+ private final String SEL_PPA_ACCESS_SELECT = getLoc(casePfx+"sel.ppa.access.select","//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
+ private final String CHK_PPA_RES_CHECK = getLoc(casePfx+"chk.ppa.res.check","//input[contains(@id,'common-edit-page-error-form:page-res-check')]");
+ private final String CHK_PPA_NF_CHECK = getLoc(casePfx+"chk.ppa.nf.check","//input[contains(@id,'common-edit-page-error-form:page-not-found-check')]");
+ private final String CHK_PPA_INTERNAL_CHECK = getLoc(casePfx+"chk.ppa.internal.check","//input[contains(@id,'common-edit-page-error-form:page-internal-check')]");
+ private final String CHK_PPA_ERROR_CHECK = getLoc(casePfx+"chk.ppa.error.check","//input[contains(@id,'common-edit-page-error-form:page-error-check')]");
+ private final String CHK_PPA_CONTROL_CHECK = getLoc(casePfx+"chk.ppa.control.check","//input[contains(@id,'common-edit-page-error-form:page-control-check')]");
+ private final String CHK_PPA_ACCESS_CHECK = getLoc(casePfx+"chk.ppa.access.check","//input[contains(@id,'common-edit-page-error-form:page-access-check')]");
+ private final String SUB_PP_ERROR_FORM_UPDATE = getLoc(casePfx+"sub.pp.error.form.update","//input[contains(@id,'common-edit-portal-error-form:update')]");
+ private final String INP_PP_RES_INPUT = getLoc(casePfx+"inp.pp.res.input","//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
+ private final String SEL_PP_NF_SELECT = getLoc(casePfx+"sel.pp.nf.select","//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
+ private final String SEL_PP_INTERNAL_SELECT = getLoc(casePfx+"sel.pp.internal.select","//select[contains(@id,'common-edit-portal-error-form:portal-internal-select')]");
+ private final String SEL_PP_ERROR_SELECT = getLoc(casePfx+"sel.pp.error.select","//select[contains(@id,'common-edit-portal-error-form:portal-error-select')]");
+ private final String SEL_PP_UNAVAIL_SELECT = getLoc(casePfx+"sel.pp.unavail.select","//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
+ private final String SEL_PP_ACCESS_SELECT = getLoc(casePfx+"sel.pp.access.select","//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
+ private final String CHK_PP_RES_CHECK = getLoc(casePfx+"chk.pp.res.check","//input[contains(@id,'common-edit-portal-error-form:portal-res-check')]");
+ private final String CHK_PP_NF_CHECK = getLoc(casePfx+"chk.pp.nf.check","//input[contains(@id,'common-edit-portal-error-form:portal-not-found-check')]");
+ private final String CHK_PP_INTERNAL_CHECK = getLoc(casePfx+"chk.pp.internal.check","//input[contains(@id,'common-edit-portal-error-form:portal-internal-check')]");
+ private final String CHK_PP_ERROR_CHECK = getLoc(casePfx+"chk.pp.error.check","//input[contains(@id,'common-edit-portal-error-form:portal-error-check')]");
+ private final String CHK_PP_ACCESS_CHECK = getLoc(casePfx+"chk.pp.access.check","//input[contains(@id,'common-edit-portal-error-form:portal-access-check')]");
+ private final String CHK_PP_UNAVAIL_CHECK = getLoc(casePfx+"chk.pp.unavail.check","//input[contains(@id,'common-edit-portal-error-form:portal-unavail-check')]");
+ private final String SUB_PP_PROPADD = getLoc(casePfx+"sub.pp.propadd","//input[contains(@id,'common-edit-prop-form:add-property')]");
+ private final String INP_PP_PROPNAME = getLoc(casePfx+"inp.pp.propname","//input[contains(@id,'common-edit-prop-form:property')]");
+ private final String SUB_PP_LISTENER = getLoc(casePfx+"sub.pp.listener","//input[contains(@id,'edit-prop-form:update')]");
+ private final String SEL_PP_LISTENER = getLoc(casePfx+"sel.pp.listener","//select[contains(@id,'edit-prop-form:listener')]");
+ private final String TBL_PP_PROPS = getLoc(casePfx+"tbl.pp.props","//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
- private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
- private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
- private final String SUBMIT_RENAME_PORTAL = getProp(casePfx + "submit.rename.portal", "//input[contains(@id,'renameForm:rename')]");
- private final String INPUT_RENAME_PORTAL = getProp(casePfx + "input.rename.portal", "//input[contains(@id,'renameForm:newName')]");
- private final String SUBMIT_DELETE_PORTAL_CONF = getProp(casePfx + "submit.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
- private final String INPUT_SUBMIT_PAGECREATE = getProp(casePfx + "input.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
- private final String INPUT_PAGENAME = getProp(casePfx + "input.pagename", "//input[contains(@id,'create-page-form:pageName')]");
- private final String INPUT_PORTALNAME = getProp(casePfx + "input.portalname", "//input[contains(@id,'create-portal-form:name')]");
- private final String INPUT_SUBMIT_CREATEPORTAL = getProp(casePfx + "input.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
- private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
- private final String LINK_PORTALS_ID = getProp(casePfx + "link.portals.id", "link=*Portal Objects*");
- private final String LINK_PORTAL_HOME = getProp(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
- private final String TABLE_PORTAL_ADMIN = getProp(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
- private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
- private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
- private final String POR_TL_PROPERTIES = getProp(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
- private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
- private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
- private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
- private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
- private final String TABLE_PORTALPAGE_ADMIN = getProp(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
- private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
- private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
- private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
- private final String PAG_TL_PROPERTIES = getProp(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
- private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
- private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
- private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
- private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
- private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
+ private final String SUB_LAYOUT_ADD_CENTER = getLoc(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+ private final String INP_WINDOW_NAME = getLoc(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
+ private final String SUBMIT_RENAME_PORTAL = getLoc(casePfx + "submit.rename.portal", "//input[contains(@id,'renameForm:rename')]");
+ private final String INPUT_RENAME_PORTAL = getLoc(casePfx + "input.rename.portal", "//input[contains(@id,'renameForm:newName')]");
+ private final String SUBMIT_DELETE_PORTAL_CONF = getLoc(casePfx + "submit.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
+ private final String INPUT_SUBMIT_PAGECREATE = getLoc(casePfx + "input.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
+ private final String INPUT_PAGENAME = getLoc(casePfx + "input.pagename", "//input[contains(@id,'create-page-form:pageName')]");
+ private final String INPUT_PORTALNAME = getLoc(casePfx + "input.portalname", "//input[contains(@id,'create-portal-form:name')]");
+ private final String INPUT_SUBMIT_CREATEPORTAL = getLoc(casePfx + "input.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
+ private final String TAB_PORTALOBJ_ID = getLoc(casePfx + "tab.portalobj.id", "Link=Admin");
+ private final String LINK_PORTALS_ID = getLoc(casePfx + "link.portals.id", "link=*Portal Objects*");
+ private final String LINK_PORTAL_HOME = getLoc(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+ private final String TABLE_PORTAL_ADMIN = getLoc(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+ private final String POR_TL_MAIN = getLoc(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+ private final String POR_TL_SECURITY = getLoc(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+ private final String POR_TL_PROPERTIES = getLoc(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+ private final String POR_TL_THEME = getLoc(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+ private final String POR_TL_RENAME = getLoc(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+ private final String POR_TL_DELETE = getLoc(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+ private final String POR_TL_MAKEDEF = getLoc(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+ private final String TABLE_PORTALPAGE_ADMIN = getLoc(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+ private final String PAG_TL_MAIN = getLoc(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+ private final String PAG_TL_LAYOUT = getLoc(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+ private final String PAG_TL_SECURITY = getLoc(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+ private final String PAG_TL_PROPERTIES = getLoc(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+ private final String PAG_TL_THEME = getLoc(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+ private final String PAG_TL_RENAME = getLoc(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+ private final String PAG_TL_DISPLAY = getLoc(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+ private final String PAG_TL_DELETE = getLoc(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+ private final String PAG_TL_MAKEDEF = getLoc(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/DashboardsTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -19,35 +19,35 @@
/** prefix for locator properties = portal.dash. */
public final String casePfx = "portal.dash.";
- private final String T_DH_SUB_UPDATE = getProp(casePfx + "t.dh.sub.update", "//form[contains(@id,'common-edit-theme-form')]/input[@type='submit']");
- private final String T_DH_SEL_RENDERSET = getProp(casePfx + "t.dh.sel.renderset", "//select[contains(@id,'common-edit-theme-form:renderSet')]");
- private final String T_DH_SEL_THEME = getProp(casePfx + "t.dh.sel.theme", "//select[contains(@id,'common-edit-theme-form:theme')]");
- private final String T_DH_SEL_LAYOUT = getProp(casePfx + "t.dh.sel.layout", "//select[contains(@id,'common-edit-theme-form:layout')]");
- private final String T_PA_SUB_UPDATE = getProp(casePfx + "t.pa.sub.update", "//input[contains(@id,'common-edit-page-error-form:update')]");
- private final String T_PO_SUB_UPDATE = getProp(casePfx + "t.po.sub.update", "//input[contains(@id,'common-edit-portal-error-form:update')]");
- private final String T_PA_INP_PAGEADD = getProp(casePfx + "t.pa.inp.pageadd", "//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
- private final String T_PO_INP_PAGEADD = getProp(casePfx + "t.po.inp.pageadd", "//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
- private final String T_PA_SEL_PNF = getProp(casePfx + "t.pa.sel.pnf", "//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
- private final String T_PA_SEL_INTERN = getProp(casePfx + "t.pa.sel.intern", "//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
- private final String T_PA_SEL_ERROR = getProp(casePfx + "t.pa.sel.error", "//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
- private final String T_PA_SEL_CONTROL = getProp(casePfx + "t.pa.sel.control", "//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
- private final String T_PA_SEL_ACCESS = getProp(casePfx + "t.pa.sel.access", "//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
- private final String T_PO_SEL_PNF = getProp(casePfx + "t.po.sel.pnf", "//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
- private final String T_PO_SEL_UNAVAIL = getProp(casePfx + "t.po.sel.unavail",
+ private final String T_DH_SUB_UPDATE = getLoc(casePfx + "t.dh.sub.update", "//form[contains(@id,'common-edit-theme-form')]/input[@type='submit']");
+ private final String T_DH_SEL_RENDERSET = getLoc(casePfx + "t.dh.sel.renderset", "//select[contains(@id,'common-edit-theme-form:renderSet')]");
+ private final String T_DH_SEL_THEME = getLoc(casePfx + "t.dh.sel.theme", "//select[contains(@id,'common-edit-theme-form:theme')]");
+ private final String T_DH_SEL_LAYOUT = getLoc(casePfx + "t.dh.sel.layout", "//select[contains(@id,'common-edit-theme-form:layout')]");
+ private final String T_PA_SUB_UPDATE = getLoc(casePfx + "t.pa.sub.update", "//input[contains(@id,'common-edit-page-error-form:update')]");
+ private final String T_PO_SUB_UPDATE = getLoc(casePfx + "t.po.sub.update", "//input[contains(@id,'common-edit-portal-error-form:update')]");
+ private final String T_PA_INP_PAGEADD = getLoc(casePfx + "t.pa.inp.pageadd", "//input[contains(@id,'common-edit-page-error-form:page-res-select')]");
+ private final String T_PO_INP_PAGEADD = getLoc(casePfx + "t.po.inp.pageadd", "//input[contains(@id,'common-edit-portal-error-form:portal-res-input')]");
+ private final String T_PA_SEL_PNF = getLoc(casePfx + "t.pa.sel.pnf", "//select[contains(@id,'common-edit-page-error-form:page-not-found-select')]");
+ private final String T_PA_SEL_INTERN = getLoc(casePfx + "t.pa.sel.intern", "//select[contains(@id,'common-edit-page-error-form:page-internal-select')]");
+ private final String T_PA_SEL_ERROR = getLoc(casePfx + "t.pa.sel.error", "//select[contains(@id,'common-edit-page-error-form:page-error-select')]");
+ private final String T_PA_SEL_CONTROL = getLoc(casePfx + "t.pa.sel.control", "//select[contains(@id,'common-edit-page-error-form:page-control-select')]");
+ private final String T_PA_SEL_ACCESS = getLoc(casePfx + "t.pa.sel.access", "//select[contains(@id,'common-edit-page-error-form:page-access-select')]");
+ private final String T_PO_SEL_PNF = getLoc(casePfx + "t.po.sel.pnf", "//select[contains(@id,'common-edit-portal-error-form:portal-not-found-select')]");
+ private final String T_PO_SEL_UNAVAIL = getLoc(casePfx + "t.po.sel.unavail",
"//select[contains(@id,'common-edit-portal-error-form:portal-unavail-select')]");
- private final String T_PO_SEL_ACCESS = getProp(casePfx + "t.po.sel.access", "//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
- private final String SUBMIT_UPDATE_VALUE = getProp(casePfx + "submit.update.value", "//input[contains(@id,'common-manage-prop-form:update')]");
- private final String TABLE_PROPS = getProp(casePfx + "table.props", "//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
- private final String T_PROPS_INPUT_VALUE = getProp(casePfx + "t.props.input.value",
+ private final String T_PO_SEL_ACCESS = getLoc(casePfx + "t.po.sel.access", "//select[contains(@id,'common-edit-portal-error-form:portal-access-select')]");
+ private final String SUBMIT_UPDATE_VALUE = getLoc(casePfx + "submit.update.value", "//input[contains(@id,'common-manage-prop-form:update')]");
+ private final String TABLE_PROPS = getLoc(casePfx + "table.props", "//table[contains(@id,'common-manage-prop-form:prop-data-table')]");
+ private final String T_PROPS_INPUT_VALUE = getLoc(casePfx + "t.props.input.value",
"//input[contains(@id,''common-manage-prop-form:prop-data-table:{0}:prop-value-input'')]");
- private final String T_PROPS_LINK_DEL = getProp(casePfx + "t.props.link.del", "//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
- private final String TABLE_PA_ERR = getProp(casePfx + "table.pa.err", "//form[@id='common-edit-page-error-form']/table");
- private final String TABLE_PO_ERR = getProp(casePfx + "table.po.err", "//form[@id='common-edit-portal-error-form']/table");
- private final String TABLE_DH_THM = getProp(casePfx + "table.dh.thm", "//form[@id='common-edit-theme-form']/table");
- private final String INPUT_PROP_NAME = getProp(casePfx + "input.prop.name", "//input[contains(@id,'common-edit-prop-form:property')]");
- private final String SUBMIT_ADD_PROP = getProp(casePfx + "submit.add.prop", "//input[contains(@id,'common-edit-prop-form:add-property')]");
- private final String LINK_ADMIN = getProp(casePfx + "link.admin", "link=Admin");
- private final String LINK_TAB_DASH = getProp(casePfx + "link.tab.dash", "//a[contains(@id,'admin-subtab-form:dashboard-link')]");
+ private final String T_PROPS_LINK_DEL = getLoc(casePfx + "t.props.link.del", "//a[contains(@id,''common-manage-prop-form:prop-data-table:{0}:delete'')]");
+ private final String TABLE_PA_ERR = getLoc(casePfx + "table.pa.err", "//form[@id='common-edit-page-error-form']/table");
+ private final String TABLE_PO_ERR = getLoc(casePfx + "table.po.err", "//form[@id='common-edit-portal-error-form']/table");
+ private final String TABLE_DH_THM = getLoc(casePfx + "table.dh.thm", "//form[@id='common-edit-theme-form']/table");
+ private final String INPUT_PROP_NAME = getLoc(casePfx + "input.prop.name", "//input[contains(@id,'common-edit-prop-form:property')]");
+ private final String SUBMIT_ADD_PROP = getLoc(casePfx + "submit.add.prop", "//input[contains(@id,'common-edit-prop-form:add-property')]");
+ private final String LINK_ADMIN = getLoc(casePfx + "link.admin", "link=Admin");
+ private final String LINK_TAB_DASH = getLoc(casePfx + "link.tab.dash", "//a[contains(@id,'admin-subtab-form:dashboard-link')]");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/EndtoEndPortalAdminTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -22,43 +22,43 @@
/** prefix for locator properties = portal.e2e.*/
public static String casePfx = "portal.e2e.";
- private final String ADR_PORTAL = getProp(casePfx + "adr.home","/portal");
- public final String SEL_PORTLET_TYPE = getProp(casePfx + "sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");
- private final String SUB_LAYOUT_ADD_CENTER = getProp(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
- private final String INP_WINDOW_NAME = getProp(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
- private final String SUB_RENAME_PORTAL = getProp(casePfx + "sub.rename.portal", "//input[contains(@id,'renameForm:rename')]");
- private final String INP_RENAME_PORTAL = getProp(casePfx + "inp.rename.portal", "//input[contains(@id,'renameForm:newName')]");
- private final String SUB_DELETE_PORTAL_CONF = getProp(casePfx + "sub.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
- private final String INP_SUBMIT_PAGECREATE = getProp(casePfx + "inp.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
- private final String INP_PAGENAME = getProp(casePfx + "inp.pagename", "//input[contains(@id,'create-page-form:pageName')]");
- private final String INP_PORTALNAME = getProp(casePfx + "inp.portalname", "//input[contains(@id,'create-portal-form:name')]");
- private final String INP_SUBMIT_CREATEPORTAL = getProp(casePfx + "inp.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
- private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
- private final String LNK_PORTALS_ID = getProp(casePfx + "lnk.portals.id", "link=*Portal Objects*");
- private final String LNK_PORTAL_HOME = getProp(casePfx + "lnk.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
- private final String TBL_PORTAL_ADMIN = getProp(casePfx + "tbl.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
- private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
- private final String POR_TL_SECURITY = getProp(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
- private final String POR_TL_PROPERTIES = getProp(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
- private final String POR_TL_THEME = getProp(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
- private final String POR_TL_RENAME = getProp(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
- private final String POR_TL_DELETE = getProp(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
- private final String POR_TL_MAKEDEF = getProp(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
- private final String TBL_PORTALPAGE_ADMIN = getProp(casePfx + "tbl.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
- private final String PAG_TL_MAIN = getProp(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
- private final String PAG_TL_LAYOUT = getProp(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
- private final String PAG_TL_SECURITY = getProp(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
- private final String PAG_TL_PROPERTIES = getProp(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
- private final String PAG_TL_THEME = getProp(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
- private final String PAG_TL_RENAME = getProp(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
- private final String PAG_TL_DISPLAY = getProp(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
- private final String PAG_TL_DELETE = getProp(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
- private final String PAG_TL_MAKEDEF = getProp(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
- private final String DIV_PORT_CONTENT = getProp(casePfx + "div.por.cont", "conrrerertent-container");
- private final String INP_GOO_SEARCH = getProp(casePfx + "inp.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
- private final String SUB_GOO_SEARCH = getProp(casePfx + "sup.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
- private final String INP_NET_SEARCH = getProp(casePfx + "inp.net.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
- private final String SUB_NET_SEARCH = getProp(casePfx + "sub.net.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
+ private final String ADR_PORTAL = getLoc(casePfx + "adr.home","/portal");
+ public final String SEL_PORTLET_TYPE = getLoc(casePfx + "sel.portlet.type","//select[contains(@id,'windowForm:instanceId')]");
+ private final String SUB_LAYOUT_ADD_CENTER = getLoc(casePfx + "sub.layout.add.center", "//input[contains(@id,'layoutForm:a_center')]");
+ private final String INP_WINDOW_NAME = getLoc(casePfx + "inp.window.name", "//input[contains(@id,'windowForm:windowName')]");
+ private final String SUB_RENAME_PORTAL = getLoc(casePfx + "sub.rename.portal", "//input[contains(@id,'renameForm:rename')]");
+ private final String INP_RENAME_PORTAL = getLoc(casePfx + "inp.rename.portal", "//input[contains(@id,'renameForm:newName')]");
+ private final String SUB_DELETE_PORTAL_CONF = getLoc(casePfx + "sub.delete.portal.conf", "//input[contains(@id,'delete-view:confirm-form:delete')]");
+ private final String INP_SUBMIT_PAGECREATE = getLoc(casePfx + "inp.submit.pagecreate", "//input[contains(@id,'create-page-form:create-page')]");
+ private final String INP_PAGENAME = getLoc(casePfx + "inp.pagename", "//input[contains(@id,'create-page-form:pageName')]");
+ private final String INP_PORTALNAME = getLoc(casePfx + "inp.portalname", "//input[contains(@id,'create-portal-form:name')]");
+ private final String INP_SUBMIT_CREATEPORTAL = getLoc(casePfx + "inp.submit.createportal", "//input[contains(@id,'create-portal-form:create-portal')]");
+ private final String TAB_PORTALOBJ_ID = getLoc(casePfx + "tab.portalobj.id", "Link=Admin");
+ private final String LNK_PORTALS_ID = getLoc(casePfx + "lnk.portals.id", "link=*Portal Objects*");
+ private final String LNK_PORTAL_HOME = getLoc(casePfx + "lnk.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+ private final String TBL_PORTAL_ADMIN = getLoc(casePfx + "tbl.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+ private final String POR_TL_MAIN = getLoc(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+ private final String POR_TL_SECURITY = getLoc(casePfx + "por.tl.security", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:security-link'')]");
+ private final String POR_TL_PROPERTIES = getLoc(casePfx + "por.tl.properties", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:prop-link'')]");
+ private final String POR_TL_THEME = getLoc(casePfx + "por.tl.theme", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:theme-link'')]");
+ private final String POR_TL_RENAME = getLoc(casePfx + "por.tl.rename", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:rename'')]");
+ private final String POR_TL_DELETE = getLoc(casePfx + "por.tl.delete", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:delete'')]");
+ private final String POR_TL_MAKEDEF = getLoc(casePfx + "por.tl.makedef", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:default-link'')]");
+ private final String TBL_PORTALPAGE_ADMIN = getLoc(casePfx + "tbl.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+ private final String PAG_TL_MAIN = getLoc(casePfx + "pag.tl.main", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:object-link'')]");
+ private final String PAG_TL_LAYOUT = getLoc(casePfx + "pag.tl.layout", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:edit-page-layout'')]");
+ private final String PAG_TL_SECURITY = getLoc(casePfx + "pag.tl.security", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:security-link'')]");
+ private final String PAG_TL_PROPERTIES = getLoc(casePfx + "pag.tl.properties", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:prop-link'')]");
+ private final String PAG_TL_THEME = getLoc(casePfx + "pag.tl.theme", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:theme-link'')]");
+ private final String PAG_TL_RENAME = getLoc(casePfx + "pag.tl.rename", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-link'')]");
+ private final String PAG_TL_DISPLAY = getLoc(casePfx + "pag.tl.display", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:rename-display'')]");
+ private final String PAG_TL_DELETE = getLoc(casePfx + "pag.tl.delete", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:delete-link'')]");
+ private final String PAG_TL_MAKEDEF = getLoc(casePfx + "pag.tl.makedef", "//a[contains(@id,''obj-nav-form:pages-datatable:{0}:default-link'')]");
+ private final String DIV_PORT_CONTENT = getLoc(casePfx + "div.por.cont", "conrrerertent-container");
+ private final String INP_GOO_SEARCH = getLoc(casePfx + "inp.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
+ private final String SUB_GOO_SEARCH = getLoc(casePfx + "sup.goo.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
+ private final String INP_NET_SEARCH = getLoc(casePfx + "inp.net.search", "//div[contains(@id,'directory_search_div')]/form/input[@name='query']");
+ private final String SUB_NET_SEARCH = getLoc(casePfx + "sub.net.search", "//div[contains(@id,'directory_search_div')]/form/input[@type='submit']");
@BeforeMethod(groups = { "log" })
protected void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PageCoordinationTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -31,13 +31,13 @@
/** prefix for locator properties = portal.admin.*/
public final String casePfx = "portal.admin.";
- private final String TAB_PORTALOBJ_ID = getProp(casePfx + "tab.portalobj.id", "Link=Admin");
- private final String LINK_PORTALS_ID = getProp(casePfx + "link.portals.id", "link=*Portal Objects*");
- private final String LINK_PORTAL_HOME = getProp(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
- private final String TABLE_PORTAL_ADMIN = getProp(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
- private final String POR_TL_MAIN = getProp(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
- private final String TABLE_PORTALPAGE_ADMIN = getProp(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
- private final String PAG_TL_COORDINATION = getProp(casePfx + "pag.tl.coord", "//a[contains(@id,''pages-datatable:{0}:edit-coord'')]");
+ private final String TAB_PORTALOBJ_ID = getLoc(casePfx + "tab.portalobj.id", "Link=Admin");
+ private final String LINK_PORTALS_ID = getLoc(casePfx + "link.portals.id", "link=*Portal Objects*");
+ private final String LINK_PORTAL_HOME = getLoc(casePfx + "link.portal.home", "//a[contains(@id,'obj-temp-form:object-link-0')]");
+ private final String TABLE_PORTAL_ADMIN = getLoc(casePfx + "table.portal.admin", "//table[contains(@id,'obj-nav-form:portal-datatable')]");
+ private final String POR_TL_MAIN = getLoc(casePfx + "por.tl.main", "//a[contains(@id,''obj-nav-form:portal-datatable:{0}:object-iid-link'')]");
+ private final String TABLE_PORTALPAGE_ADMIN = getLoc(casePfx + "table.portalpage.admin", "//table[contains(@id,'obj-nav-form:pages-datatable')]");
+ private final String PAG_TL_COORDINATION = getLoc(casePfx + "pag.tl.coord", "//a[contains(@id,''pages-datatable:{0}:edit-coord'')]");
@BeforeMethod(groups = { "log" })
private void loginBeforeTest() {
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletDefinitionsTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -16,18 +16,18 @@
/** prefix for locator properties = portal.port.def.*/
public final String casePfx = "portal.port.def.";
- private final String T_LINK_PREF = getProp(casePfx+"t.link.pref","//a[contains(@id,''def-list:portlet-pref-{0}'')]");
- private final String SUBMIT_CREATE_INST = getProp(casePfx+"submit.create.inst","//input[contains(@name,'add_instance_form:j_id19')]");
- private final String INPUT_INSTANCE_NAME = getProp(casePfx+"input.instance.name","//input[contains(@id,'add_instance_form:instanceId')]");
- private final String T_LINK_CREATE = getProp(casePfx+"t.link.create","//a[contains(@id,''def-list:create-instance-{0}'')]");
- private final String SUBMIT_PROVIDER_VIEW = getProp(casePfx+"submit.provider.view","//input[contains(@id,'definition-form:view-portlets')]");
- private final String SELECT_PROVIDER = getProp(casePfx+"select.provider","//select[contains(@id,'definition-form:menu')]");
- private final String TABLE_PORTLET = getProp(casePfx+"table.portlet","//form[contains(@id,'def-list')]/table");
- private final String LINK_NAME_ADMIN_PORT = getProp(casePfx+"link.name.admin.port","//a[contains(@id,'common-show-portlet-detail-form:field1:select')]");
- private final String LINK_ADMIN_PORT = getProp(casePfx+"link.admin.port","//a[contains(@id,'def-list:portlet-def-0')]");
- private final String LINK_ADMIN = getProp(casePfx+"link.admin","link=Admin");
- private final String LINK_TAB_PD = getProp(casePfx+"link.tab.pd","//a[contains(@id,'admin-subtab-form:portlet-def-link')]");
- private final String LINK_PD_MAIN = getProp(casePfx+"link.pd.main","//a[contains(@id,'man-form:def-link')]");
+ private final String T_LINK_PREF = getLoc(casePfx+"t.link.pref","//a[contains(@id,''def-list:portlet-pref-{0}'')]");
+ private final String SUBMIT_CREATE_INST = getLoc(casePfx+"submit.create.inst","//input[contains(@name,'add_instance_form:j_id19')]");
+ private final String INPUT_INSTANCE_NAME = getLoc(casePfx+"input.instance.name","//input[contains(@id,'add_instance_form:instanceId')]");
+ private final String T_LINK_CREATE = getLoc(casePfx+"t.link.create","//a[contains(@id,''def-list:create-instance-{0}'')]");
+ private final String SUBMIT_PROVIDER_VIEW = getLoc(casePfx+"submit.provider.view","//input[contains(@id,'definition-form:view-portlets')]");
+ private final String SELECT_PROVIDER = getLoc(casePfx+"select.provider","//select[contains(@id,'definition-form:menu')]");
+ private final String TABLE_PORTLET = getLoc(casePfx+"table.portlet","//form[contains(@id,'def-list')]/table");
+ private final String LINK_NAME_ADMIN_PORT = getLoc(casePfx+"link.name.admin.port","//a[contains(@id,'common-show-portlet-detail-form:field1:select')]");
+ private final String LINK_ADMIN_PORT = getLoc(casePfx+"link.admin.port","//a[contains(@id,'def-list:portlet-def-0')]");
+ private final String LINK_ADMIN = getLoc(casePfx+"link.admin","link=Admin");
+ private final String LINK_TAB_PD = getLoc(casePfx+"link.tab.pd","//a[contains(@id,'admin-subtab-form:portlet-def-link')]");
+ private final String LINK_PD_MAIN = getLoc(casePfx+"link.pd.main","//a[contains(@id,'man-form:def-link')]");
@BeforeMethod(groups = { "log" })
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-04-24 11:12:08 UTC (rev 13267)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/src/org/jboss/portal/test/selenium/portal/PortletInstancesTestCase.java 2009-04-24 13:49:58 UTC (rev 13268)
@@ -21,46 +21,46 @@
/** prefix for locator properties = portal.port.ins. */
public final String casePfx = "portal.port.ins.";
- private final String TAB_PORTLET_INSTANCES = getProp(casePfx + "tab.portlet.instances", "//table[contains(@id,'instancesTable2')]");
- private final String UL_PAGINATOR = getProp(casePfx + "ul.paginator", "//ul[@class='pagination property-container']");
- private final String SUBMIT_SECURITY_UPDATE = getProp(casePfx + "submit.security.update", "//input[contains(@id,'common-edit-security-form:update')]");
- private final String SUBMIT_SECURITY_CANCEL = getProp(casePfx + "submit.security.cancel", "//input[contains(@id,'common-edit-security-form:cancel')]");
- private final String LINK_20_PAGE = getProp(casePfx + "link.20.page", "link=20");
- private final String LINK_PREF_WELCOMEPORT = getProp(casePfx + "link.pref.welcomeport", "//a[contains(@id,'security-JSPPortletInstance')]");
- private final String TABLE_PREF_KEY = getProp(casePfx + "table.pref.key", "//form[contains(@id,'common-edit-pref-form')]/table");
- private final String SUBMIT_PREF_DELETE = getProp(casePfx + "submit.pref.delete", "//input[contains(@id,'common-edit-exisiting-form:row_0')]");
- private final String LINK_PREF_GUESTNUM = getProp(casePfx + "link.pref.guestnum", "//a[contains(@id,'common-edit-pref-form:pref-link-0')]");
- private final String INPUT_PREF_NEWVAL = getProp(casePfx + "input.pref.newval", "//input[contains(@id,'common-append-form:new_value')]");
- private final String SUBMIT_PREF_UPDATE = getProp(casePfx + "submit.pref.update", "//input[contains(@id,'common-append-form:append-button')]");
- private final String SUBMIT_PREF_SAVE = getProp(casePfx + "submit.pref.save", "//input[contains(@id,':save')]");
- private final String INPUT_PREF_UPDATE = getProp(casePfx + "input.pref.update", "//input[contains(@id,'common-edit-exisiting-form:update')]");
- private final String INPUT_PREF_APPEND = getProp(casePfx + "input.pref.append", "//input[contains(@id,'common-edit-exisiting-form:pref-input-0')]");
- private final String SUBMIT_PREF_CANCEL = getProp(casePfx + "submit.pref.cancel", "//input[contains(@id,':cancel')]");
- private final String LINK_CURUSER_PREFERENCES = getProp(casePfx + "link.curuser.preferences",
+ private final String TAB_PORTLET_INSTANCES = getLoc(casePfx + "tab.portlet.instances", "//table[contains(@id,'instancesTable2')]");
+ private final String UL_PAGINATOR = getLoc(casePfx + "ul.paginator", "//ul[@class='pagination property-container']");
+ private final String SUBMIT_SECURITY_UPDATE = getLoc(casePfx + "submit.security.update", "//input[contains(@id,'common-edit-security-form:update')]");
+ private final String SUBMIT_SECURITY_CANCEL = getLoc(casePfx + "submit.security.cancel", "//input[contains(@id,'common-edit-security-form:cancel')]");
+ private final String LINK_20_PAGE = getLoc(casePfx + "link.20.page", "link=20");
+ private final String LINK_PREF_WELCOMEPORT = getLoc(casePfx + "link.pref.welcomeport", "//a[contains(@id,'security-JSPPortletInstance')]");
+ private final String TABLE_PREF_KEY = getLoc(casePfx + "table.pref.key", "//form[contains(@id,'common-edit-pref-form')]/table");
+ private final String SUBMIT_PREF_DELETE = getLoc(casePfx + "submit.pref.delete", "//input[contains(@id,'common-edit-exisiting-form:row_0')]");
+ private final String LINK_PREF_GUESTNUM = getLoc(casePfx + "link.pref.guestnum", "//a[contains(@id,'common-edit-pref-form:pref-link-0')]");
+ private final String INPUT_PREF_NEWVAL = getLoc(casePfx + "input.pref.newval", "//input[contains(@id,'common-append-form:new_value')]");
+ private final String SUBMIT_PREF_UPDATE = getLoc(casePfx + "submit.pref.update", "//input[contains(@id,'common-append-form:append-button')]");
+ private final String SUBMIT_PREF_SAVE = getLoc(casePfx + "submit.pref.save", "//input[contains(@id,':save')]");
+ private final String INPUT_PREF_UPDATE = getLoc(casePfx + "input.pref.update", "//input[contains(@id,'common-edit-exisiting-form:update')]");
+ private final String INPUT_PREF_APPEND = getLoc(casePfx + "input.pref.append", "//input[contains(@id,'common-edit-exisiting-form:pref-input-0')]");
+ private final String SUBMIT_PREF_CANCEL = getLoc(casePfx + "submit.pref.cancel", "//input[contains(@id,':cancel')]");
+ private final String LINK_CURUSER_PREFERENCES = getLoc(casePfx + "link.curuser.preferences",
"//a[contains(@id,'instances-form:preference-CurrentUsersPortletInstance')]");
- private final String LINK_DEL_EXCEPTPORT = getProp(casePfx + "link.del.exceptport", "//a[contains(@id,'instances-form:delete-GoogleMapPortletInstance')]");
- private final String SUBMIT_PI_DELETE_CONF = getProp(casePfx + "submit.pi.delete.conf", "//input[contains(@id,'confirm-delete-form1:delete')]");
- private final String SUBMIT_PI_DELETE_CANC = getProp(casePfx + "submit.pi.delete.canc", "//input[contains(@id,'confirm-delete-form1:cancel')]");
- private final String T_LINK_DELETENAME = getProp(casePfx + "t.link.deletename",
+ private final String LINK_DEL_EXCEPTPORT = getLoc(casePfx + "link.del.exceptport", "//a[contains(@id,'instances-form:delete-GoogleMapPortletInstance')]");
+ private final String SUBMIT_PI_DELETE_CONF = getLoc(casePfx + "submit.pi.delete.conf", "//input[contains(@id,'confirm-delete-form1:delete')]");
+ private final String SUBMIT_PI_DELETE_CANC = getLoc(casePfx + "submit.pi.delete.canc", "//input[contains(@id,'confirm-delete-form1:cancel')]");
+ private final String T_LINK_DELETENAME = getLoc(casePfx + "t.link.deletename",
"//a[contains(@id,''instance-display-form:locale-datatable:{0}:delete-link'')]");
- private final String T_LINK_MODIFYNAME = getProp(casePfx + "t.link.modifyname",
+ private final String T_LINK_MODIFYNAME = getLoc(casePfx + "t.link.modifyname",
"//a[contains(@id,''instance-display-form:locale-datatable:{0}:edit-link'')]");
- private final String LINK_COUNTPORT = getProp(casePfx + "link.countport", "//a[contains(@id,'instances-form:CurrentUsersPortletInstance')]");
- private final String NAME_COUNTPORT = getProp(casePfx + "name.countport", "CurrentUsersPortletInstance");
- private final String SUBMIT_MODIFY_NAME = getProp(casePfx + "submit.modify.name", "//input[contains(@id,'add-display-name-form:addDisplay')]");
- private final String INPUT_NAME = getProp(casePfx + "input.name", "//input[contains(@id,'add-display-name-form:newName')]");
- private final String SELECT_LANGUAGE = getProp(casePfx + "select.language", "//select[contains(@id,'add-display-name-form:locales')]");
- private final String LINK_ADMIN = getProp(casePfx + "link.admin", "link=Admin");
- private final String LINK_TAB_PI = getProp(casePfx + "link.tab.pi", "//a[contains(@id,'admin-subtab-form:portlet-instance-link')]");
- private final String LINK_PI_MAIN = getProp(casePfx + "link.pi.main", "//a[contains(@id,'instance-form1:instance-link')]");
- private final String TABLE_DISPNAMES = getProp(casePfx + "table.dispnames", "//table[contains(@id,'instance-display-form:locale-datatable')]");
- private final String LNK_SEC_BUTTON = getProp(casePfx + "lnk.sec.button",
+ private final String LINK_COUNTPORT = getLoc(casePfx + "link.countport", "//a[contains(@id,'instances-form:CurrentUsersPortletInstance')]");
+ private final String NAME_COUNTPORT = getLoc(casePfx + "name.countport", "CurrentUsersPortletInstance");
+ private final String SUBMIT_MODIFY_NAME = getLoc(casePfx + "submit.modify.name", "//input[contains(@id,'add-display-name-form:addDisplay')]");
+ private final String INPUT_NAME = getLoc(casePfx + "input.name", "//input[contains(@id,'add-display-name-form:newName')]");
+ private final String SELECT_LANGUAGE = getLoc(casePfx + "select.language", "//select[contains(@id,'add-display-name-form:locales')]");
+ private final String LINK_ADMIN = getLoc(casePfx + "link.admin", "link=Admin");
+ private final String LINK_TAB_PI = getLoc(casePfx + "link.tab.pi", "//a[contains(@id,'admin-subtab-form:portlet-instance-link')]");
+ private final String LINK_PI_MAIN = getLoc(casePfx + "link.pi.main", "//a[contains(@id,'instance-form1:instance-link')]");
+ private final String TABLE_DISPNAMES = getLoc(casePfx + "table.dispnames", "//table[contains(@id,'instance-display-form:locale-datatable')]");
+ private final String LNK_SEC_BUTTON = getLoc(casePfx + "lnk.sec.button",
"//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''Security'')]");
- private final String LNK_PREF_BUTTON = getProp(casePfx + "lnk.pref.button",
+ private final String LNK_PREF_BUTTON = getLoc(casePfx + "lnk.pref.button",
"//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''actionPreferences'')]");
- private final String LNK_DEL_BUTTON = getProp(casePfx + "lnk.del.button",
+ private final String LNK_DEL_BUTTON = getLoc(casePfx + "lnk.del.button",
"//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td/table/tbody/tr/td/a[contains(@class,''actionDeleteInstance'')]");
- private final String LNK_INSTANCE_BUTTON = getProp(casePfx + "lnk.instance.button", "//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td[1]/a[1]");
+ private final String LNK_INSTANCE_BUTTON = getLoc(casePfx + "lnk.instance.button", "//table[contains(@id,''instancesTable2'')]/tbody/tr[{0}]/td[1]/a[1]");
@BeforeMethod(groups = { "log" })
private void loginBeforeTest() {
15 years