[embjopr-commits] EMBJOPR SVN: r486 - in trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app: war and 1 other directory.
embjopr-commits at lists.jboss.org
embjopr-commits at lists.jboss.org
Tue Jun 2 12:14:32 EDT 2009
Author: ozizka at redhat.com
Date: 2009-06-02 12:14:32 -0400 (Tue, 02 Jun 2009)
New Revision: 486
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
Log:
EAR and WAR tests updated.
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-06-01 15:59:17 UTC (rev 485)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-06-02 16:14:32 UTC (rev 486)
@@ -484,7 +484,7 @@
// Resource Traits
infoTable = ejtt.getContentInfoTable(
- ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Resource Traits").getElement() );
+ ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Traits").getElement() );
props = infoTable.getProperties();
@@ -494,7 +494,7 @@
assertEquals("no", props.getProperty("Exploded?").trim());
// Metrics Summary
- HtmlTable summaryTable = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Metrics Summary").getElement();
+ HtmlTable summaryTable = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Numeric Metrics").getElement();
infoTable = ejtt.getContentInfoTable(summaryTable);
// (nothing here yet)
@@ -720,36 +720,38 @@
*/
public void testEarMetricsTab() throws IOException, EmbJoprTestException {
+ final String DEPLOYABLE_NAME = BASIC_EAR;
+
// Deploy the EAR.
- String earFilePath = ejtt.getTestDataDir() + "/ear/"+BASIC_EAR;
+ String earFilePath = ejtt.getTestDataDir() + "/ear/"+DEPLOYABLE_NAME;
deployEar( earFilePath );
try {
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.EAR, BASIC_EAR, 3000, 15);
+ ejtt.getNavTree().getNodeByLabel(APP_TYPE.getNavTreeLabel()).click();
+ ejtt.deployment.waitActivelyForDeployment(APP_TYPE, DEPLOYABLE_NAME, 3000, 15);
// Navigate to the Metrics tab
- ContentTableRow earRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(BASIC_EAR);
- earRow.getLinkByLabel(BASIC_EAR).click();
+ ContentTableRow earRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
+ earRow.getLinkByLabel(DEPLOYABLE_NAME).click();
ejtt.tabMenu.clickMetricsTab();
// Resource Traits
// Check the Path.
HtmlTable tbl = ejtt.getTabMenu().getTabContentBox().
- getTableUnderHeader("Trait Values").getElement();
+ getTableUnderHeader("Traits").getElement();
ContentInfoTable infoTable = ejtt.getContentInfoTable( tbl );
Properties props = infoTable.getProperties();
- log.debug("EAR Metrics tab - Trait Values: "+ props.toString());
+ log.debug("EAR Metrics tab - Traits: "+ props.toString());
- String path = ejtt.getDeployDir()+"/"+BASIC_EAR;
+ String path = ejtt.getDeployDir()+"/"+DEPLOYABLE_NAME;
assertEquals(path, props.getProperty("Path"));
}
finally {
try {
- undeployEar(BASIC_EAR);
+ undeployEar(DEPLOYABLE_NAME);
}catch( Exception ex ){
log.error("Caught exception when undeploying: "+ex, ex);
}
@@ -765,18 +767,20 @@
*/
public void testEarMetricsTabRefreshButton() throws IOException, EmbJoprTestException {
+ final String DEPLOYABLE_NAME = BASIC_EAR;
+
// Deploy the EAR.
- String earFilePath = ejtt.getTestDataDir() + "/ear/"+BASIC_EAR;
+ String earFilePath = ejtt.getTestDataDir() + "/ear/"+DEPLOYABLE_NAME;
deployEar( earFilePath );
try {
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
- ejtt.deployment.waitActivelyForDeployment(DeployableTypes.EAR, BASIC_EAR, 3000, 15);
+ ejtt.getNavTree().getNodeByLabel(APP_TYPE.getNavTreeLabel()).click();
+ ejtt.deployment.waitActivelyForDeployment(APP_TYPE, DEPLOYABLE_NAME, 3000, 15);
// Navigate to the Metrics tab
- ContentTableRow earRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(BASIC_EAR);
- earRow.getLinkByLabel(BASIC_EAR).click();
+ ContentTableRow earRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
+ earRow.getLinkByLabel(DEPLOYABLE_NAME).click();
ejtt.tabMenu.clickMetricsTab();
// Click the Refresh button.
@@ -785,13 +789,13 @@
// Check that we are still on the right tab.
assertTrue("Metrics tab is active", ejtt.tabMenu.isTabActive("Metrics") );
- assertTrue("Page contains EAR name", client.getPageAsText().contains(BASIC_EAR) );
- assertTrue("Page contains 'Refresh'", client.getPageAsText().contains("Refresh") );
+ assertTrue("Page should contain EAR name", client.getPageAsText().contains(DEPLOYABLE_NAME) );
+ assertTrue("Page should contain 'Refresh'", client.getPageAsText().contains("Refresh") );
}
finally {
try {
- undeployEar(BASIC_EAR);
+ undeployEar(DEPLOYABLE_NAME);
}catch( Exception ex ){
log.error("Caught exception when undeploying: "+ex, ex);
}
@@ -818,7 +822,7 @@
try {
// Loop, wait for the app to appear.
log.info("Waiting for EAR to appear.");
- ejtt.deployment.waitActivelyForDeployment( DeployableTypes.EAR, EAR_UNPACKED, 5000, 35, this);
+ ejtt.deployment.waitActivelyForDeployment( APP_TYPE, EAR_UNPACKED, 5000, 35, this);
ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java
===================================================================
--- trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java 2009-06-01 15:59:17 UTC (rev 485)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java 2009-06-02 16:14:32 UTC (rev 486)
@@ -138,7 +138,7 @@
ejtt.deployment.deployViaEmbJopr(APP_TYPE, filePath);
// Check the success message.
- String expectedMessage = "Resource hellothere.war created successfully!";
+ String expectedMessage = "Resource "+DEPLOYABLE_NAME+" created successfully!";
checkClientAndServerMessages(expectedMessage, expectedMessage, false);
ejtt.deployment.waitActivelyForDeployment(APP_TYPE, DEPLOYABLE_NAME,
@@ -364,7 +364,7 @@
/**
* Tests the values shown in the Summary tab of WAR.
*
- * FAILS because of: EMBJOPR-110 (missing / at the beginning of the path)
+ * Was failing because of: EMBJOPR-110 (missing / at the beginning of the path)
*/
public void testWarSummaryTab() throws EmbJoprTestException, IOException, Exception {
@@ -431,9 +431,9 @@
// Resource Traits
infoTable = ejtt.getContentInfoTable(
- ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Resource Traits").getElement() );
+ ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Traits").getElement() );
props = infoTable.getProperties();
- log.info("Resource Traits: "+props.toString());
+ log.info("Traits: "+props.toString());
log.debug("Path: "+props.getProperty("Path"));///
@@ -442,7 +442,7 @@
assertEquals("no", props.getProperty("Exploded?").trim());
// Metrics Summary
- HtmlTable summaryTable = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Metrics Summary").getElement();
+ HtmlTable summaryTable = ejtt.getTabMenu().getTabContentBox().getTableUnderHeader("Numeric Metrics").getElement();
infoTable = ejtt.getContentInfoTable(summaryTable);
// (nothing here yet)
@@ -784,11 +784,11 @@
// Check the Path.
HtmlTable tbl = ejtt.getTabMenu().getTabContentBox().
- getTableUnderHeader("Trait Values").getElement();
+ getTableUnderHeader("Traits").getElement();
ContentInfoTable infoTable = ejtt.getContentInfoTable( tbl );
Properties props = infoTable.getProperties();
- log.debug("Trait Values: "+ props.toString());
+ log.debug("Traits: "+ props.toString());
String path = ejtt.getDeployDir()+"/"+DEPLOYABLE_NAME;
assertEquals(path, props.getProperty("Path").trim());
More information about the embjopr-commits
mailing list