Author: ozizka(a)redhat.com
Date: 2009-08-27 23:22:42 -0400 (Thu, 27 Aug 2009)
New Revision: 714
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
Log:
* JMSOperationsTest updated.
Modified:
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java
===================================================================
---
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28
03:06:01 UTC (rev 713)
+++
trunk/jsfunit/src/test/java/org/jboss/jopr/jsfunit/as5/jmsDestinations/JMSOperationsTest.java 2009-08-28
03:22:42 UTC (rev 714)
@@ -43,6 +43,7 @@
import org.jboss.jms.server.messagecounter.MessageCounter;
import org.jboss.jms.destination.JBossDestination;
import javax.management.ObjectName;
+import org.jboss.jopr.jsfunit.exceptions.HtmlElementNotFoundException;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTable;
import org.jboss.jopr.jsfunit.util.EmbJoprTestToolkit.ContentTableRow;
@@ -645,7 +646,7 @@
expectedBuffer.append(formatTableCell("(-|\\d+)")); // Count delta
-
expectedBuffer.append(formatTableCell("2")); // Depth
2
expectedBuffer.append(formatTableCell("\\d+")); // Depth delta
2
- expectedBuffer.append(formatTableCell(".*")); // Depth delta 2
+ expectedBuffer.append(formatTableCell(".*")); // Date
8/27/09 12:07:39 AM
expectedValues.add(expectedBuffer.toString());
@@ -653,7 +654,8 @@
DestinationType.QUEUE,
LIST_MSG_COUNTER_AS_HTML,
Boolean.FALSE,
- expectedValues);
+ expectedValues,
+ true);
}
/* OPERATION #8 - LIST MESSAGE COUNTER HISTORY AS HTML - APPLIES TO QUEUES ONLY*/
@@ -1766,14 +1768,25 @@
* Make sure the correct number of messages gets displayed in the
* output of the "List * Messages" operations.
*/
- private void checkListMessagesTable(int expectedNumMessages) {
+ private void checkListMessagesTable(int expectedNumMessages) throws IOException,
HtmlElementNotFoundException {
+
+ // The table is loaded by AJAX? We are getting a table with the header row only.
+ ejtt.sleep(500);
+ ejtt.refreshPage();
+ ejtt.sleep(500);
// Get the result of the operation
HtmlDivision historyPanel =
(HtmlDivision)client.getElement(OPERATION_HISTORY_FORM);
HtmlTable resultsTable =
(HtmlTable)historyPanel.getFirstByXPath(".//table[@class='property-map-summary-table']");
assertNotNull("Could not get the result of the operation",
resultsTable);
- List<HtmlTableRow> rows = resultsTable.getRows();
+ List<HtmlTableRow> rows = resultsTable.getRows();
+
+ // Try it with EJTT - HtmlUnit is giving us zero rows.
+ ContentTable table = ejtt.getTabMenu().getTabContentBox().getTable(resultsTable);
+ log.info("(EJTT reports "+table.getRows().size() +" rows in the
table.)");
+
+
// Don't include the header row
int numMessages = rows.size() - 1;
Show replies by date