[embjopr-commits] EMBJOPR SVN: r633 - trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear.
embjopr-commits at lists.jboss.org
embjopr-commits at lists.jboss.org
Wed Jul 29 19:51:28 EDT 2009
Author: ozizka at redhat.com
Date: 2009-07-29 19:51:28 -0400 (Wed, 29 Jul 2009)
New Revision: 633
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java
Log:
* EarTest 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-07-29 23:37:53 UTC (rev 632)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java 2009-07-29 23:51:28 UTC (rev 633)
@@ -252,7 +252,7 @@
* PASSED.
*/
- public void testEarNavigation() throws IOException, HtmlElementNotFoundException, ActionOutOfSyncException, ActionNotAvailableException, EmbJoprTestException, InterruptedException
+ public void testEarNavigation() throws IOException, EmbJoprTestException, InterruptedException
{
// JBossAS Servers node
@@ -322,48 +322,61 @@
}
- {
- // Go back to applications Sumary screen.
- ejtt.getNavTree().getNodeByLabel("Applications").click();
- }
+ }
+
+ /**
+ * Deploys an EAR and clicks a bit through the UI.
+ */
+ public void testEarDeploymentNavigation() throws IOException, EmbJoprTestException {
// Concrete appliction node.
{
- // Deploy the EAR.
- String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+BASIC_EAR;
- deployEar( earFilePath );
- ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
+ final String DEPLOYABLE_NAME = BASIC_EAR;
- ContentTableRow earRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(BASIC_EAR);
- assertTrue("Page doesn't list "+BASIC_EAR+" in Summary tab.", earRow != null );
+ // Go back to applications Sumary screen.
+ ejtt.getNavTree().getNodeByLabel(NAV_APPLICATIONS).click();
- // Go to the summary through listed item.
- earRow.getLinkByLabel(BASIC_EAR).click();
- // Check that we have the summary tab for the selected EAR.
- assertTrue( "EAR name ("+BASIC_EAR+" not found in the content box.",
- ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(BASIC_EAR) );
+ try {
+ // Deploy the EAR.
+ String earFilePath = System.getProperty(SYSPROP_TESTDATA_DIR) + "/ear/"+DEPLOYABLE_NAME;
+ //deployEar( earFilePath );
+ ejtt.deployment.deployViaEmbJopr(APP_TYPE, earFilePath);
- // Go to the summary through nav tree node.
- NavTreeNode earNode = ejtt.getNavTree().getNodeByLabel(NAV_EAR);
- if( !earNode.isExpanded() ){
- log.info("Expanding.");
- earNode.getArrowLink().click();
- Thread.sleep(2000);
- }
- ejtt.getNavTree().getNodeByLabel(BASIC_EAR).click();
- // Check that we have the summary tab for the selected EAR.
- ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(BASIC_EAR);
+ ejtt.getNavTree().getNodeByLabel(NAV_EAR).click();
- undeployEar(BASIC_EAR);
+ ContentTableRow earRow = ejtt.getDefaultContentTable().getFirstRowContainingLink(DEPLOYABLE_NAME);
+ assertTrue("Page doesn't list "+DEPLOYABLE_NAME+" in Summary tab.", earRow != null );
- }
+ // Go to the summary through listed item.
+ earRow.getLinkByLabel(DEPLOYABLE_NAME).click();
+ // Check that we have the summary tab for the selected EAR.
+ assertTrue( "EAR name '"+DEPLOYABLE_NAME+"' not found in the content box.",
+ ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(DEPLOYABLE_NAME) );
-
- }// testNavigationToEar()
+ // Go to the summary through nav tree node.
+ NavTreeNode earNode = ejtt.getNavTree().getNodeByLabel(NAV_EAR);
+ if( !earNode.isExpanded() ){
+ log.info("Expanding.");
+ earNode.getArrowLink().click();
+ ejtt.sleep(2000);
+ }
+ ejtt.getNavTree().getNodeByLabel(DEPLOYABLE_NAME).click();
+ // Check that we have the summary tab for the selected EAR.
+ ejtt.getTabMenu().getTabContentBox().getElement().getTextContent().contains(DEPLOYABLE_NAME);
+ }
+ finally {
+ try {
+ undeployEar(DEPLOYABLE_NAME);
+ }catch(Exception ex) {
+ log.error("Failed to undeploy "+DEPLOYABLE_NAME+": "+ex);
+ }
+ }
+ }
+ }//
More information about the embjopr-commits
mailing list