[seam-commits] Seam SVN: r12036 - branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Feb 11 07:03:32 EST 2010


Author: mgencur at redhat.com
Date: 2010-02-11 07:03:32 -0500 (Thu, 11 Feb 2010)
New Revision: 12036

Modified:
   branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
   branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
Log:
fixed test so that it works with both jboss5 and jboss6

Modified: branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java	2010-02-11 09:29:56 UTC (rev 12035)
+++ branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java	2010-02-11 12:03:32 UTC (rev 12036)
@@ -47,7 +47,14 @@
       search(title);
       browser.clickAndWait(getProperty("SEARCH_RESULTS_FIRST_ROW_LINK"));
       browser.clickAndWait(getProperty("ITEM_BID_HISTORY"));
-      bidCount = browser.getXpathCount(getProperty("BID_HISTORY_COUNT")).intValue();
+      if (browser.isElementPresent(getProperty("BID_HISTORY_COUNT_EMPTY")))
+      {
+         bidCount = 0;
+      }
+      else
+      {         
+         bidCount = browser.getXpathCount(getProperty("BID_HISTORY_COUNT")).intValue();
+      }      
       browser.goBackAndWait();
       placeBid(price);
       assertTrue("Auction page expected.", browser.getLocation().contains(getProperty("AUCTION_URL")));

Modified: branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
===================================================================
--- branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties	2010-02-11 09:29:56 UTC (rev 12035)
+++ branches/community/Seam_2_2/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties	2010-02-11 12:03:32 UTC (rev 12036)
@@ -51,6 +51,7 @@
 
 BID_CONFIRM id=confirm:confirmBid
 BID_HISTORY_COUNT //table[@id='history']/tbody/tr
+BID_HISTORY_COUNT_EMPTY //table[@id='history']/tbody/tr/td[not(text())]
 BID_OUTBID id=outbid
 BID_HIGH_BIDDER id\=highBidder
 BID_HISTORY_BACK id\=back



More information about the seam-commits mailing list