[embjopr-commits] EMBJOPR SVN: r487 - 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:24:08 EDT 2009


Author: ozizka at redhat.com
Date: 2009-06-02 12:24:08 -0400 (Tue, 02 Jun 2009)
New Revision: 487

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 - operations tests.

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-02 16:14:32 UTC (rev 486)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/ear/EarTest.java	2009-06-02 16:24:08 UTC (rev 487)
@@ -957,25 +957,9 @@
 			// Click the Stop button.
 			ejtt.tabMenu.getTabContentBox().getButtonByLabel("Stop").click();
 
-			// Check the latest message.
-			//DebugUtils.writeFile("target/testStopAndStartEar-opsTable.html", client.getPageAsText() );///
-			//OperationStatusType status = ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().getLastOperationStatus();
-			//assertEquals("Stop operation did not succeed, the status is: "+status, OperationStatusType.SUCCESS, status);
-			//assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
-			/*try {
-				new ActiveConditionChecker( new DescribedCondition("Stop operation status changes from 'In Progreess'.") {
-					int calls = 0;
-					public boolean isTrue() throws Exception {
-						if( ++calls > 1 ) ((HtmlPage)client.getContentPage()).refresh();
-						OperationStatusType status = ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().getLastOperationStatus();
-						return ! OperationStatusType.IN_PROGRESS.equals( status );
-					}
-				}).dumpPageOnTimeout(this).throwOnTimeout().waitWithTimeout(1500, 5);
-			}
-			catch(Exception ex){
-				throw new EmbJoprTestException(ex.getMessage(), ex.getCause());
-			}/**/
+			// Wait for the op to finish and check the final status.
 			ejtt.operations.waitActivelyForOperationToFinish("Stop", 1500, 5);
+			assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
 
 
 
@@ -1086,10 +1070,9 @@
 			// Click the Restart button.
 			ejtt.tabMenu.getTabContentBox().getButtonByLabel("Restart").click();
 
-			// Check the latest message. TODO: EJTT class for ops history table?
-			//OperationStatusType status = ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().getLastOperationStatus();
-			//assertEquals("Stop operation did not succeed, the status is: "+status, OperationStatusType.SUCCESS, status);
+			// Wait for the op to finish and check the final status.
 			ejtt.operations.waitActivelyForOperationToFinish("Restart", 1500, 5);
+			assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
 
 
 

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-02 16:14:32 UTC (rev 486)
+++ trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/app/war/WarTest.java	2009-06-02 16:24:08 UTC (rev 487)
@@ -969,8 +969,8 @@
 			ejtt.tabMenu.getTabContentBox().getButtonByLabel("Stop").click();
 
 			// Check the latest message.
+			ejtt.operations.waitActivelyForOperationToFinish("Stop", 1500, 5);
 			assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
-			ejtt.operations.waitActivelyForOperationToFinish("Stop", 1500, 5);
 
 
 
@@ -982,9 +982,9 @@
 			// Click the Start button.
 			ejtt.tabMenu.getTabContentBox().getButtonByLabel("Start").click();
 
-			// Check the latest message. TODO: EJTT class for ops history table?
-			//assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
+			// Wait for the op to finish and check the final status.
 			ejtt.operations.waitActivelyForOperationToFinish("Start", 1500, 5);
+			assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
 
 
 			// Assert that the app is running.
@@ -1063,9 +1063,9 @@
 			// Click the Restart button.
 			ejtt.tabMenu.getTabContentBox().getButtonByLabel("Restart").click();
 
-			// Check the latest message. TODO: EJTT class for ops history table?
-			//assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
+			// Wait for the op to finish and check the final status.
 			ejtt.operations.waitActivelyForOperationToFinish("Restart", 1500, 5);
+			assertTrue( ejtt.getTabMenu().getTabContentBox().getOperationsHistoryTable().wasLastOperationSuccesful() );
 			
 
 			// Assert that the app is running.




More information about the embjopr-commits mailing list