Author: charles.crouch(a)jboss.com
Date: 2009-05-06 10:11:22 -0400 (Wed, 06 May 2009)
New Revision: 385
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
Log:
logs operation result on failed operations
Modified: trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-05-06
13:15:27 UTC (rev 384)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/ResourceTestBase.java 2009-05-06
14:11:22 UTC (rev 385)
@@ -304,7 +304,10 @@
// Make sure the operation completed successfully
String status = getLatestOperationStatus();
- assertTrue("The status of the operation was: " + status,
status.contains(SUCCESSFUL));
+ String actualOperationResults = getOperationResults();
+ String shortenedResult =
actualOperationResults.substring(actualOperationResults.indexOf("Viewing"),
+
actualOperationResults.indexOf("]") + 1);
+ assertTrue("The operation was not successful, result was [" +
shortenedResult +"].", status.contains(SUCCESSFUL));
}
/**
@@ -463,4 +466,16 @@
String cellValueAsHtml = TABLE_CELL_DELIM + cellValue + TABLE_CELL_END_DELIM;
return cellValueAsHtml;
}
+
+ protected String getOperationResults() {
+ // Make sure the operation parameters and results are displayed
+ // correctly
+ HtmlAnchor detailsLink = getLinkInsideForm(OPERATION_HISTORY_FORM,
+ OPERATION_DETAILS);
+ detailsLink.click();
+
+ String actualOperationResults = ((HtmlSpan) client
+ .getElement(OPERATION_RESULTS)).getTextContent();
+ return actualOperationResults;
+ }
}
Show replies by date