Author: smcgowan(a)redhat.com
Date: 2010-04-14 15:14:56 -0400 (Wed, 14 Apr 2010)
New Revision: 928
Modified:
trunk/jsfunit/pom.xml
trunk/jsfunit/src/main/webapp/WEB-INF/web.xml
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/JavaScriptTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/MultipleUserLoginTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
trunk/jsfunit/testdata/jboss6-configuration/conf/jboss-service.xml
trunk/jsfunit/testdata/jboss6-configuration/deploy/jbossweb.sar/server.xml
Log:
EMBJOPR-283 - commit local changes so debugging can continue
Modified: trunk/jsfunit/pom.xml
===================================================================
--- trunk/jsfunit/pom.xml 2010-04-13 16:49:29 UTC (rev 927)
+++ trunk/jsfunit/pom.xml 2010-04-14 19:14:56 UTC (rev 928)
@@ -9,7 +9,7 @@
<mavenConflictResolvers>newest,nearest</mavenConflictResolvers>
<cargo.plugin.version>1.0.1-SNAPSHOT</cargo.plugin.version>
- <cargo.plugin.version.as6>1.0.1-alpha-2</cargo.plugin.version.as6>
+ <cargo.plugin.version.as6>1.0.1-SNAPSHOT</cargo.plugin.version.as6>
<jvm.args.debug></jvm.args.debug> <!-- Used by the -Pdebug profile.
-->
<jvm.args.profiler></jvm.args.profiler> <!-- Used by the -Pprofile
profile. -->
<jvm.args.exposejmx></jvm.args.exposejmx> <!-- Expose JMX - used to
enable the Hibernate statistics. -->
@@ -98,19 +98,26 @@
</dependency>
- <!-- Dropping back to HtmlUnit 2.3 with Rhino until bug can be addressed -->
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<scope>compile</scope>
- <version>2.5</version>
+ <version>2.7</version>
</dependency>
<dependency>
+ <groupId>net.sourceforge.htmlunit</groupId>
+ <artifactId>htmlunit-core-js</artifactId>
+ <scope>compile</scope>
+ <version>2.7</version>
+ </dependency>
+ <!--
+ <dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
<scope>compile</scope>
<version>1.7R2</version>
</dependency>
+ -->
<!-- For version comparison -->
<dependency>
@@ -123,7 +130,7 @@
<dependency>
<groupId>org.jboss.jsfunit</groupId>
<artifactId>jboss-jsfunit-core</artifactId>
- <version>1.1.0.GA</version>
+ <version>1.2.0.Final</version>
<scope>compile</scope>
<exclusions>
<exclusion> <groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId> </exclusion>
@@ -133,7 +140,7 @@
<dependency>
<groupId>org.jboss.jsfunit</groupId>
<artifactId>jboss-jsfunit-richfaces</artifactId>
- <version>1.1.0.GA</version>
+ <version>1.2.0.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
@@ -164,19 +171,24 @@
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<scope>provided</scope>
- <version>2.8.1</version> <!-- 2.9.1 -->
+ <version>2.9.1</version> <!-- 2.9.1 -->
</dependency>
<dependency>
- <groupId>jdom</groupId>
+ <groupId>org.jdom</groupId>
<artifactId>jdom</artifactId>
- <version>1.0</version> <!-- 1.1 -->
+ <version>1.1</version> <!-- 1.1 -->
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.4</version>
+ <version>2.5</version>
</dependency>
<dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.0.jboss</version>
+ </dependency>
+ <dependency>
<groupId>org.jboss.integration</groupId>
<artifactId>jboss-profileservice-spi</artifactId>
<version>6.0.0-Alpha8</version> <!-- 5.1.0.SP1 -->
@@ -211,6 +223,12 @@
<version>5.0.1.GA</version> <!-- 5.2.0.Beta1 -->
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
@@ -361,6 +379,7 @@
<artifactId>maven-replacer-plugin</artifactId>
<version>0.0.9</version>
<executions>
+ <!--
<execution><id>mrp1</id>
<phase>initialize</phase><goals><goal>replace</goal></goals>
<configuration>
@@ -385,6 +404,7 @@
<value>attribute
name="EnableMessageCounters">true</value>
</configuration>
</execution>
+ -->
</executions>
</plugin>
@@ -722,7 +742,7 @@
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
- <version>1.3</version>
+ <version>1.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
@@ -779,6 +799,9 @@
toFile="${project.build.directory}/${project.build.finalName}_archive.${project.packaging}"/>
<unzip
src="${project.build.directory}/${project.build.finalName}_archive.${project.packaging}"
dest="${project.build.directory}/${project.build.finalName}.${project.packaging}"/>
+ <echo> *** Disabling navtree AJAX... *** </echo>
+ <replace
file="${project.build.directory}/${project.build.finalName}.${project.packaging}/WEB-INF/facelets/resourceNavigation.xhtml"
+ token="switchType="ajax"
value="switchType="server"/>
</tasks></configuration>
</execution>
<!-- Write "Don't kill" to hudson log/ -->
@@ -846,7 +869,7 @@
<containerId>jboss6x</containerId>
<home>${JBOSS_HOME}</home> <!-- Binaries used by
Cargo. -->
<log>${basedir}/target/jboss6.x.logs/cargo.log</log>
- <timeout>420000</timeout> <!-- 7 minutes -->
+ <timeout>180000</timeout> <!-- 3 minutes -->
<systemProperties>
<!-- Used in jboss-log4j.xml. See /testdata/... -->
<jboss.server.log.threshold>ALL</jboss.server.log.threshold>
@@ -883,15 +906,11 @@
<cargo.jboss.configuration>${cargo.jboss.configuration}</cargo.jboss.configuration>
<!-- Set explicitely because of Cargo's bad port settings
for JBoss. -->
<cargo.rmi.port>1099</cargo.rmi.port>
+ <cargo.jboss.user>admin</cargo.jboss.user>
+ <cargo.jboss.password>admin</cargo.jboss.password>
</properties>
<!-- Override Cargo's default files (some taken from
cargo's .jar, some from 'default') -->
<configfiles>
- <!-- Override jboss-service even with this cargo version
-->
- <configfile>
-
<file>${basedir}/testdata/jboss6-configuration/conf/jboss-service.xml</file>
- <tofile>conf/jboss-service.xml</tofile>
- </configfile>
- <!-- Limit logging - need to limit using
deploy/jboss-logging.xml in AS 6-->
<!-- Open Tomcat's HTTP logging valve -->
<configfile>
<file>${basedir}/testdata/jboss6-configuration/deploy/jbossweb.sar/server.xml</file>
@@ -916,18 +935,20 @@
<!-- Deploy the test files -->
<files>
+ <!--
<copy>
<file>${basedir}/testdata/destinations</file>
<toDir>deploy</toDir>
- </copy>
+ </copy> -->
<copy>
<file>${basedir}/testdata/datasources/testFiles</file>
<toDir>deploy</toDir>
</copy>
+ <!--
<copy>
<file>${basedir}/testdata/connfactories</file>
<toDir>deploy</toDir>
- </copy>
+ </copy> -->
<copy>
<file>${basedir}/testdata/rar/embjoprtestadapter.rar</file>
<toDir>deploy</toDir>
@@ -1013,60 +1034,6 @@
</execution>
</executions>
</plugin>
-
- <!-- XSLT plugin - To separate the reports by package. Each execution
separates one. -->
- <!-- Disabled - bug:
- javax.xml.transform.TransformerException:
javax.xml.transform.TransformerException:
- com.sun.org.apache.xml.internal.utils.WrappedRuntimeException:
Premature end of file.
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>xslt-maven-plugin</artifactId>
- <executions>
-
<execution><id>xslt-as5</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.</packageName></parameters>
- </configuration>
- </execution>
-
<execution><id>xslt-war</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.app.war.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.app.war.</packageName></parameters>
- </configuration>
- </execution>
-
<execution><id>xslt-ear</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.app.ear.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.app.ear.</packageName></parameters>
- </configuration>
- </execution>
-
<execution><id>xslt-rar</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.app.rar.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.app.rar.</packageName></parameters>
- </configuration>
- </execution>
-
<execution><id>xslt-ejb</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.app.ejb.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.app.ejb.</packageName></parameters>
- </configuration>
- </execution>
-
<execution><id>xslt-datasources</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.app.datasources.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.app.datasources.</packageName></parameters>
- </configuration>
- </execution>
-
<execution><id>xslt-jmsDestinations</id><phase>post-integration-test</phase><goals><goal>transform</goal></goals>
- <configuration>
-
<fileNameReplacement>TEST-org.jboss.jopr.jsfunit.as5.app.jmsDestinations.xml</fileNameReplacement>
-
<parameters><packageName>org.jboss.jopr.jsfunit.as5.app.jmsDestinations.</packageName></parameters>
- </configuration>
- </execution>
- </executions>
- </plugin>
- -->
</plugins>
</build>
</profile>
@@ -1124,7 +1091,7 @@
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
- <version>${cargo.plugin.version}</version>
+ <version>${cargo.plugin.version.as6}</version>
<configuration>
<!-- Container configuration -->
<configuration>
@@ -1186,89 +1153,6 @@
</properties>
</profile>
-
-
-
- <!-- MyFaces - workaround for AS 5.2 w/ JSF 2.0 -->
- <profile>
- <id>myfaces</id>
- <dependencies>
- <dependency>
- <groupId>apache-myfaces</groupId>
- <artifactId>myfaces-api</artifactId>
- <version>1.2.7</version>
- </dependency>
- <dependency>
- <groupId>apache-myfaces</groupId>
- <artifactId>myfaces-impl</artifactId>
- <version>1.2.7</version>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- <version>1.3</version>
- </dependency>
- <dependency>
- <groupId>apache-discovery</groupId>
- <artifactId>commons-discovery</artifactId>
- <version>0.4-brew</version>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
-
- <!-- Change web.xml to set up MyFaces instead of RichFaces.
-
http://fisheye.jboss.org/browse/EMBJOPR/branches/EmbJopr_1_3_3_MyFaces/co...
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>xml-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>switch-web.xml-to-myfaces</id> <goals>
<goal>transform</goal> </goals>
- <phase>package</phase>
- <configuration>
- <transformationSets>
- <transformationSet>
-
<outputDir>${project.build.directory}/war/work/org.jboss.jopr/jopr-embedded-jbas5</outputDir>
<!-- /WEB-INF:
http://jira.codehaus.org/browse/MOJO-1453 -->
- <!-- javax.xml.transform.OutputKeys.INDENT -->
- <outputProperties>
- <outputProperty>
<
name>{http://xml.apache.org/xslt}indent-amount</name><value&g...
</outputProperty>
- <outputProperty>
<name>indent</name><value>yes</value> </outputProperty>
- </outputProperties>
-
<stylesheet>${basedir}/src/build/resources/switch-web.xml-to-myfaces.xsl</stylesheet>
-
<dir>${project.build.directory}/war/work/org.jboss.jopr/jopr-embedded-jbas5/WEB-INF</dir>
-
<includes><include>web.xml</include></includes>
- </transformationSet>
- </transformationSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!-- AntRun - move the modified web.xml - overwrite the original
(MOJO-1453 workaround) . -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <!-- This has to be named this way, otherwise it would execute AFTER
web.xml XSLT processing. That's Maven. -->
- <id>move-new-web.xml-overwrite-the-original-one</id>
<!-- move-new-web.xml-overwrite-the-original-one -->
- <phase>package</phase>
- <configuration><tasks>
- <echo>Moving
${project.build.directory}/war/work/org.jboss.jopr/jopr-embedded-jbas5/web.xml to
${project.build.directory}/war/work/org.jboss.jopr/jopr-embedded-jbas5/WEB-INF/web.xml</echo>
- <move
file="${project.build.directory}/war/work/org.jboss.jopr/jopr-embedded-jbas5/web.xml"
todir="${project.build.directory}/war/work/org.jboss.jopr/jopr-embedded-jbas5/WEB-INF"
/>
- </tasks></configuration>
- <goals><goal>run</goal></goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
- </profile>
-
-
<!-- Sleep after build, before killing JBoss AS. -->
<profile>
<id>pause</id>
@@ -1406,12 +1290,21 @@
<configuration><tasks>
<echo>Deleting
${JBOSS_HOME}/server/default/deploy/admin-console.war</echo>
<delete
dir="${JBOSS_HOME}/server/default/deploy/admin-console.war" />
+ <delete
dir="${JBOSS_HOME}/server/common/deploy/admin-console.war" />
</tasks></configuration>
<goals><goal>run</goal></goals>
</execution>
</executions>
</plugin>
-
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.0.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
</plugins>
</build>
Modified: trunk/jsfunit/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/jsfunit/src/main/webapp/WEB-INF/web.xml 2010-04-13 16:49:29 UTC (rev 927)
+++ trunk/jsfunit/src/main/webapp/WEB-INF/web.xml 2010-04-14 19:14:56 UTC (rev 928)
@@ -19,10 +19,10 @@
~ License along with this program; if not, write to the Free Software
~ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-->
-<web-app version="2.5"
+<web-app version="3.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<!-- RichFaces -->
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2010-04-13
16:49:29 UTC (rev 927)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/EmbjoprTestCase.java 2010-04-14
19:14:56 UTC (rev 928)
@@ -210,7 +210,7 @@
HtmlAnchor link = getLinkInsideForm(formId, resourceName);
// The id will look like "resourceSummaryForm:dataTable:2:resourceName"
// I need the row number. (2 in the above example)
- String id = link.getIdAttribute();
+ String id = link.getId();
String[] idElements = id.split(":");
String row = idElements[idElements.length - 2];
// resourceSummaryForm:dataTable:2:removeButton
@@ -243,7 +243,7 @@
* (eg. "Web Applications (WAR)", "Datasources", etc.) in the
* navigation tree.
*/
- public ClickableElement getNavTreeArrow(String resourceName) throws
EmbJoprTestException {
+ public HtmlElement getNavTreeArrow(String resourceName) throws EmbJoprTestException
{
// Tree.Item JS object can be still loading.
ejtt.navTree.waitUntilReady(100, 15);
@@ -252,13 +252,13 @@
ejtt.navTree.waitUntilNodeLoadedByAjax(resourceName, 200, 10);
HtmlAnchor link = getNavTreeLink(resourceName);
- String id = link.getIdAttribute();
+ String id = link.getId();
// An example id is:
"navTreeForm:navTree:81:82:83:84::typeSummaryLink"
// The icon's id would be:
"81:82:83:84::typeSummary:handle:img:collapsed"
int index = id.lastIndexOf("Link");
id = id.substring(0, index) + ":handle";
- return (ClickableElement)client.getElement(id);
+ return (HtmlElement)client.getElement(id);
}
/**
@@ -267,7 +267,7 @@
public void expandNavTreeArrow(String resourceName) throws IOException,
EmbJoprTestException {
// Expand the tree node
- ClickableElement resourceArrow = getNavTreeArrow(resourceName);
+ HtmlElement resourceArrow = getNavTreeArrow(resourceName);
resourceArrow.click();
}
@@ -299,7 +299,7 @@
HtmlTableCell metric = row.getCell(0);
if(metric.asText().equals(metricName)) {
- String id = metric.getIdAttribute();
+ String id = metric.getId();
// An example id is: dataTable:0:j_id118:2:j_id119
// We would need: dataTable:0:j_id118:2:measurementValue
@@ -664,7 +664,7 @@
public void refreshTreeNode(String nodeName) throws EmbJoprTestException {
try {
// Collapse and then expand the nav tree node
- ClickableElement nodeArrow = getNavTreeArrow(nodeName);
+ HtmlElement nodeArrow = getNavTreeArrow(nodeName);
nodeArrow.click();
nodeArrow = getNavTreeArrow(nodeName);
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java 2010-04-13
16:49:29 UTC (rev 927)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/HelloJoprTest.java 2010-04-14
19:14:56 UTC (rev 928)
@@ -213,7 +213,7 @@
HtmlAnchor link = getLinkInsideForm("resourceSummaryForm", resourceName);
// The id will look like "resourceSummaryForm:dataTable:2:resourceName"
// I need the row number. (2 in the above example)
- String id = link.getIdAttribute();
+ String id = link.getId();
String[] idElements = id.split(":");
String row = idElements[idElements.length - 2];
return (HtmlButtonInput) client.getElement(row + ":removeButton");
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/JavaScriptTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/JavaScriptTest.java 2010-04-13
16:49:29 UTC (rev 927)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/JavaScriptTest.java 2010-04-14
19:14:56 UTC (rev 928)
@@ -31,7 +31,7 @@
import org.jboss.jopr.jsfunit.util.ActiveConditionChecker;
import org.jboss.jopr.jsfunit.util.DescribedCondition;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit;
-import org.mozilla.javascript.NativeFunction;
+import net.sourceforge.htmlunit.corejs.javascript.NativeFunction;
/**
* JavaScript tests. Primarily written to try how Rhino JavaScript impl works.
@@ -97,4 +97,4 @@
}
-}
\ No newline at end of file
+}
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/MultipleUserLoginTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/MultipleUserLoginTest.java 2010-04-13
16:49:29 UTC (rev 927)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/MultipleUserLoginTest.java 2010-04-14
19:14:56 UTC (rev 928)
@@ -235,10 +235,10 @@
protected Page clickSubmitComponent(HtmlPage page, String elementName) throws
IOException
{
HtmlElement htmlElement = getElement(page, elementName);
- if (!(htmlElement instanceof ClickableElement))
- throw new IllegalStateException("Component with name=" + elementName +
" is not a ClickableElement.");
+ if (!(htmlElement instanceof HtmlElement))
+ throw new IllegalStateException("Component with name=" + elementName +
" is not a HtmlElement.");
- ClickableElement clickable = (ClickableElement)htmlElement;
+ HtmlElement clickable = (HtmlElement)htmlElement;
return clickable.click();
}
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceTest.java 2010-04-13
16:49:29 UTC (rev 927)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/datasources/DatasourceTest.java 2010-04-14
19:14:56 UTC (rev 928)
@@ -67,7 +67,7 @@
Map<String, String> propertiesMap) throws
IOException, EmbJoprTestException {
// Expand the "Datasources" tree node
- ClickableElement datasourcesArrow = getNavTreeArrow(DS_NAV_LABEL);
+ HtmlElement datasourcesArrow = getNavTreeArrow(DS_NAV_LABEL);
datasourcesArrow.click();
HtmlAnchor datasourceLink = getNavTreeLink(datasourceType.getLabel());
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2010-04-13
16:49:29 UTC (rev 927)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/util/EmbJoprTestToolkit.java 2010-04-14
19:14:56 UTC (rev 928)
@@ -44,7 +44,7 @@
import org.jboss.jsfunit.jsfsession.*;
import org.jboss.logging.Logger;
import org.jboss.mx.util.MBeanServerLocator;
-import org.mozilla.javascript.NativeFunction;
+import net.sourceforge.htmlunit.corejs.javascript.NativeFunction;
import org.w3c.dom.Element;
@@ -409,16 +409,16 @@
* navigation tree.
* @see getNodeByLabel().getArrowLink()
*/
- public ClickableElement getNodeArrow(String resourceName) throws
HtmlElementNotFoundException
+ public HtmlElement getNodeArrow(String resourceName) throws
HtmlElementNotFoundException
{
HtmlAnchor link = getNodeLink(resourceName);
- String id = link.getIdAttribute();
+ String id = link.getId();
// An example id is:
"navTreeForm:navTree:81:82:83:84::typeSummaryLink"
// The icon's id would be:
"81:82:83:84::typeSummary:handle:img:collapsed"
int index = id.lastIndexOf("Link");
id = id.substring(0, index) + ":handle";
- return (ClickableElement)client.getElement(id);
+ return (HtmlElement)client.getElement(id);
}
@@ -640,11 +640,11 @@
return new TabContentBox(tabContentBox);
}
- public ClickableElement getTabByLabel( String label ) throws
HtmlElementNotFoundException
+ public HtmlElement getTabByLabel( String label ) throws HtmlElementNotFoundException
{
DomElement element = (DomElement)client.getElement("tabmenu");
String xPath =
"ul/li/span[normalize-space(string())='"+label+"'] |
ul/li/a[normalize-space(string())='"+label+"']";
- ClickableElement tabContent = element.getFirstByXPath(xPath);
+ HtmlElement tabContent = element.getFirstByXPath(xPath);
if( null == tabContent )
@@ -653,9 +653,9 @@
return tabContent;
}
- public ClickableElement getTabByID( String tabID ) throws HtmlElementNotFoundException
+ public HtmlElement getTabByID( String tabID ) throws HtmlElementNotFoundException
{
- ClickableElement element = (ClickableElement)client.getElement(tabID);
+ HtmlElement element = (HtmlElement)client.getElement(tabID);
if( null == element )
throw new HtmlElementNotFoundException("Tab with id
'"+tabID+"' not found, perhaps disabled?", currentTest);
@@ -688,24 +688,24 @@
return isTabDisabled( getTabByID(id) );
}
- public boolean isTabActive( StyledElement tab ){
+ public boolean isTabActive( HtmlElement tab ){
return "span".equals( tab.getTagName() )
- && tab.getClassAttribute().contains("active");
+ && tab.getAttribute("class").contains("active");
}
- public boolean isTabDisabled( StyledElement tab ){
+ public boolean isTabDisabled( HtmlElement tab ){
return "span".equals( tab.getTagName() )
- && tab.getClassAttribute().contains("disabled");
+ && tab.getAttribute("class").contains("disabled");
}
/** Shotcut - getTab(label).click(); Not necesarilly clicks an anchor. */
public void clickTab( String label ) throws IOException, ActionNotAvailableException,
HtmlElementNotFoundException {
- StyledElement tabContent = getTabByLabel(label);
- if( !( tabContent instanceof ClickableElement ) )
+ HtmlElement tabContent = getTabByLabel(label);
+ if( !( tabContent instanceof HtmlElement ) )
throw new ActionNotAvailableException("Tab element
<"+tabContent.getTagName()+"> is not clickable: "+label);
- ((ClickableElement)tabContent).click();
+ ((HtmlElement)tabContent).click();
}
@@ -972,11 +972,11 @@
/**
* Finds first button with given label inside this tab box.
*/
- public ClickableElement getButtonByLabel( String label )
+ public HtmlElement getButtonByLabel( String label )
throws HtmlElementNotFoundException, ActionOutOfSyncException
{
checkIfStillValid();
- ClickableElement button =
this.element.getFirstByXPath(".//input[normalize-space(@value)='"+label+"']");
+ HtmlElement button =
this.element.getFirstByXPath(".//input[normalize-space(@value)='"+label+"']");
if( null == button )
throw new HtmlElementNotFoundException("Button labelled
'"+label+"' not found.", currentTest);
@@ -1709,7 +1709,7 @@
* @returns the button element - either HtmlButtonInput or HtmlButton.
* @throws org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException
*/
- public ClickableElement getButtonByLabel( String label ) throws
HtmlElementNotFoundException
+ public HtmlElement getButtonByLabel( String label ) throws
HtmlElementNotFoundException
{
String xPath = ".//input[@type='button' and normalize-space(@value) =
'"+label+"']" +
" | .//button[normalize-space() = '"+label+"']";
@@ -1719,7 +1719,7 @@
if( !(elm instanceof HtmlButton ) && !(elm instanceof HtmlButtonInput) )
throw new HtmlElementNotFoundException("Element is not a button, but:
"+elm.getClass().getName());
- return (ClickableElement)elm;
+ return (HtmlElement)elm;
}
@@ -1935,7 +1935,7 @@
public boolean isPageActive( int pageNumber ) throws IOException,
HtmlElementNotFoundException{
- return !getGoPage(pageNumber).getStyleAttribute().contains("-inact");
+ return
!getGoPage(pageNumber).getAttribute("style").contains("-inact");
}
public int getPageCount() throws HtmlElementNotFoundException {
@@ -2043,8 +2043,8 @@
/**
* Finds element by ID and returns retyped as HTML button.
*/
- public ClickableElement getClickableByID( String id ) throws
HtmlElementNotFoundException {
- ClickableElement clickable = (ClickableElement) client.getElement( id );
+ public HtmlElement getClickableByID( String id ) throws HtmlElementNotFoundException {
+ HtmlElement clickable = (HtmlElement) client.getElement( id );
if( null == clickable )
throw new HtmlElementNotFoundException("Can't find element with ID:
"+id);
return clickable;
Modified: trunk/jsfunit/testdata/jboss6-configuration/conf/jboss-service.xml
===================================================================
--- trunk/jsfunit/testdata/jboss6-configuration/conf/jboss-service.xml 2010-04-13 16:49:29
UTC (rev 927)
+++ trunk/jsfunit/testdata/jboss6-configuration/conf/jboss-service.xml 2010-04-14 19:14:56
UTC (rev 928)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- $Id: jboss-service.xml 96504 2009-11-18 19:01:09Z scott.stark(a)jboss.org $ -->
+<!-- $Id: jboss-service.xml 100443 2010-02-04 23:11:36Z bstansberry(a)jboss.com $
-->
<!-- ===================================================================== -->
<!-- JBoss Server Configuration -->
@@ -16,4 +16,18 @@
<classpath codebase="${jboss.server.lib.url}"
archives="*"/>
<classpath codebase="${jboss.common.lib.url}"
archives="*"/>
+ <!--
+ JBAS-JBAS-7274. Temporary workaround to set java.rmi.server.codebase
+ early in the startup process. Will be removed before AS 6.0.0.CR1
+ -->
+ <mbean code="org.jboss.web.RMICodebaseConfigurer"
+ name="jboss:service=RMICodebaseConfigurer">
+
+ <attribute
name="CodebaseHost">${java.rmi.server.hostname}</attribute>
+ <attribute name="CodebasePort">
+ <!-- Get the port to use from ServiceBindingManager. -->
+ <value-factory bean="ServiceBindingManager"
method="getIntBinding" parameter="jboss:service=WebService"/>
+ </attribute>
+ </mbean>
+
</server>
Modified: trunk/jsfunit/testdata/jboss6-configuration/deploy/jbossweb.sar/server.xml
===================================================================
--- trunk/jsfunit/testdata/jboss6-configuration/deploy/jbossweb.sar/server.xml 2010-04-13
16:49:29 UTC (rev 927)
+++ trunk/jsfunit/testdata/jboss6-configuration/deploy/jbossweb.sar/server.xml 2010-04-14
19:14:56 UTC (rev 928)
@@ -12,8 +12,8 @@
<Service name="jboss.web">
<!-- A HTTP/1.1 Connector on port 8080 -->
- <Connector protocol="HTTP/1.1" port="8080"
address="${jboss.bind.address}"
- connectionTimeout="20000" redirectPort="8443" />
+ <Connector protocol="HTTP/1.1" port="${jboss.web.http.port}"
address="${jboss.bind.address}"
+ connectionTimeout="20000"
redirectPort="${jboss.web.https.port}" />
<!-- Add this option to the connector to avoid problems with
.NET clients that don't implement HTTP/1.1 correctly
@@ -21,12 +21,12 @@
-->
<!-- A AJP 1.3 Connector on port 8009 -->
- <Connector protocol="AJP/1.3" port="8009"
address="${jboss.bind.address}"
- redirectPort="8443" />
+ <Connector protocol="AJP/1.3" port="${jboss.web.ajp.port}"
address="${jboss.bind.address}"
+ redirectPort="${jboss.web.https.port}" />
<!-- SSL/TLS Connector configuration using the admin devl guide keystore
<Connector protocol="HTTP/1.1" SSLEnabled="true"
- port="8443" address="${jboss.bind.address}"
+ port="${jboss.web.https.port}"
address="${jboss.bind.address}"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore"
keystorePass="rmi+ssl" sslProtocol = "TLS" />