[seam-commits] Seam SVN: r9957 - in trunk: src/test/ftest and 10 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Jan 20 06:07:32 EST 2009


Author: jharting
Date: 2009-01-20 06:07:32 -0500 (Tue, 20 Jan 2009)
New Revision: 9957

Added:
   trunk/src/test/ftest/examples/seambay/
   trunk/src/test/ftest/examples/seambay/build.xml
   trunk/src/test/ftest/examples/seambay/jboss-embedded.xml
   trunk/src/test/ftest/examples/seambay/jboss.xml
   trunk/src/test/ftest/examples/seambay/src/
   trunk/src/test/ftest/examples/seambay/src/org/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java
   trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
Modified:
   trunk/examples/seambay/view/auction.xhtml
   trunk/examples/seambay/view/bid.xhtml
   trunk/examples/seambay/view/bidhistory.xhtml
   trunk/examples/seambay/view/header.xhtml
   trunk/examples/seambay/view/home.xhtml
   trunk/examples/seambay/view/login.xhtml
   trunk/examples/seambay/view/preview.xhtml
   trunk/examples/seambay/view/register.xhtml
   trunk/examples/seambay/view/sell.xhtml
   trunk/examples/seambay/view/sell2.js
   trunk/examples/seambay/view/sell2.xhtml
   trunk/examples/seambay/view/sell3.xhtml
   trunk/examples/seambay/view/sell4.xhtml
   trunk/examples/seambay/view/sell5.xhtml
   trunk/src/test/ftest/build.xml
Log:
JBSEAM-3690 Added tests for seambay example

Modified: trunk/examples/seambay/view/auction.xhtml
===================================================================
--- trunk/examples/seambay/view/auction.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/auction.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -88,7 +88,7 @@
 
         <div class="itemDetails">
           <div class="itemDetailRow">
-            <h:form>
+            <h:form id="bid">
               <label>
                 <s:fragment rendered="#{auction.highBid ne null}">
                   Current bid:
@@ -133,7 +133,7 @@
             <label>History:</label>
             <div>
                           
-              <h:outputLink value="#{facesContext.externalContext.requestContextPath}/bidhistory/#{auction.auctionId}">
+              <h:outputLink id="bidHistory" value="#{facesContext.externalContext.requestContextPath}/bidhistory/#{auction.auctionId}">
                 #{auction.bids} bids
               </h:outputLink>              
               
@@ -143,7 +143,7 @@
           <div class="itemDetailRow">
             <label>High bidder:</label>
             <div>
-              <span>#{auction.highBid.account.name}</span>
+              <span id="highBidder">#{auction.highBid.account.name}</span>
               <h:outputText value="No bids" rendered="#{auction.highBid eq null}"/>
             </div>
           </div>
@@ -225,7 +225,7 @@
           <b>Place a bid</b>
           <hr class="blueLine"/>
 
-          <h:form>
+          <h:form id="newBid">
 
             <div class="bidRow">
               <s:fragment rendered="#{auction.highBid ne null}">

Modified: trunk/examples/seambay/view/bid.xhtml
===================================================================
--- trunk/examples/seambay/view/bid.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/bid.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -56,7 +56,7 @@
         </div>   
       </s:div>
       
-      <s:div rendered="#{bidAction.outcome == 'outbid'}" styleClass="subSection">
+      <s:div id="outbid" rendered="#{bidAction.outcome == 'outbid'}" styleClass="subSection">
         <div class="outbidImage"/>
         <div class="alertContent">
           <b>Your bid has been submitted</b>
@@ -132,7 +132,7 @@
           </div>
         </s:div>
         
-        <h:form rendered="#{bidAction.outcome == 'invalid' or bidAction.outcome == 'required'}">
+        <h:form id="newBid" rendered="#{bidAction.outcome == 'invalid' or bidAction.outcome == 'required'}">
           <div class="maximumBidRow">
             <label>Your maximum bid:</label>
             <div>
@@ -144,13 +144,13 @@
           </div>
           
           <div class="placeBid">
-            <h:commandButton action="#{bidAction.updateBid}" value="Continue >"/>
+            <h:commandButton id="placeBidWithAmount" action="#{bidAction.updateBid}" value="Continue >"/>
           </div>
         </h:form>
       
       </div>
       
-      <h:form rendered="#{bidAction.outcome == 'outbid'}">
+      <h:form id="increaseBid" rendered="#{bidAction.outcome == 'outbid'}">
         <div class="increaseBid" >
           <label>Increase your maximum bid:</label>
           <div>
@@ -160,14 +160,14 @@
             </h:outputText> <b>or more</b>)</span>            
           </div>
         </div>
-        <h:commandButton styleClass="bidAgain" action="#{bidAction.updateBid}" value="Bid Again >"/>
+        <h:commandButton id="bidAgain" styleClass="bidAgain" action="#{bidAction.updateBid}" value="Bid Again >"/>
       </h:form>
                        
-      <h:form rendered="#{bidAction.outcome == 'confirm'}">
+      <h:form id="confirm" rendered="#{bidAction.outcome == 'confirm'}">
         <div class="confirmBid">
           <b>By clicking on the button below, you agree to buy this item if you're the
             winning bidder.</b><br/>
-          <h:commandButton styleClass="placeBid" action="#{bidAction.confirmBid}" value="Confirm Bid"/>
+          <h:commandButton id="confirmBid" styleClass="placeBid" action="#{bidAction.confirmBid}" value="Confirm Bid"/>
         </div>
         
       </h:form>          

Modified: trunk/examples/seambay/view/bidhistory.xhtml
===================================================================
--- trunk/examples/seambay/view/bidhistory.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/bidhistory.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -22,7 +22,7 @@
         <h:outputLink value="#{facesContext.externalContext.requestContextPath}/itemdetail/#{auction.auctionId}">
           <img src="#{facesContext.externalContext.requestContextPath}/img/arrow_left.png" border="0"/>
         </h:outputLink>
-        <h:outputLink value="#{facesContext.externalContext.requestContextPath}/itemdetail/#{auction.auctionId}">
+        <h:outputLink id="back" value="#{facesContext.externalContext.requestContextPath}/itemdetail/#{auction.auctionId}">
           Back to auction details
         </h:outputLink>
       </div>

Modified: trunk/examples/seambay/view/header.xhtml
===================================================================
--- trunk/examples/seambay/view/header.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/header.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -15,18 +15,18 @@
         </div>
         
         <div class="header_search">
-          <h:form>
+          <h:form id="search">
             <h:inputText id="searchTerm" value="#{auctionSearch.searchTerm}"/>
-            <h:commandButton action="#{auctionSearch.queryAllAuctions}" value="Search"/>
+            <h:commandButton id="submit" action="#{auctionSearch.queryAllAuctions}" value="Search"/>
           </h:form>
         </div>
       </div>
 
       <div class="header_tools_bottom">    
         <div>          
-          <s:link view="/buy.xhtml" value="Buy" styleClass="header_action" propagation="none"
-          /><s:link view="/sell.xhtml" value="Sell" styleClass="header_action" propagation="none"
-          /><s:link view="/help.xhtml" value="Help" styleClass="header_action" propagation="none"/>
+          <s:link id="buy" view="/buy.xhtml" value="Buy" styleClass="header_action" propagation="none"
+          /><s:link id="sell" view="/sell.xhtml" value="Sell" styleClass="header_action" propagation="none"
+          /><s:link id="help" view="/help.xhtml" value="Help" styleClass="header_action" propagation="none"/>
         </div>       
 
       </div>
@@ -34,14 +34,14 @@
     
     <s:fragment rendered="#{not identity.loggedIn}">
       <span>Hello! </span>
-      <s:link view="/login.seam" value="Sign in" propagation="none"/>
+      <s:link id="login" view="/login.seam" value="Sign in" propagation="none"/>
       <span> or </span>
-      <s:link view="/register.seam" value="register" propagation="none"/>.
+      <s:link id="register" view="/register.seam" value="register" propagation="none"/>.
     </s:fragment>
     
     <s:fragment rendered="#{identity.loggedIn}">
       Hello, #{authenticatedAccount.name}. 
-      <span>(</span><s:link action="#{identity.logout}" propagation="none" value="Sign out"/><span>)</span>
+      <span>(</span><s:link id="logout" action="#{identity.logout}" propagation="none" value="Sign out"/><span>)</span>
     </s:fragment>
     
   </ui:composition>

Modified: trunk/examples/seambay/view/home.xhtml
===================================================================
--- trunk/examples/seambay/view/home.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/home.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -23,8 +23,8 @@
           Categories
         </div>
         
-        <ui:repeat value="#{categories}" var="cat">
-          <s:link view="/search.xhtml" action="#{auctionSearch.queryAuctions}" value="#{cat.name}" propagation="none">
+        <ui:repeat id="categories" value="#{categories}" var="cat">
+          <s:link id="link" view="/search.xhtml" action="#{auctionSearch.queryAuctions}" value="#{cat.name}" propagation="none">
             <f:param name="categoryId" value="#{cat.categoryId}"/>
           </s:link>
         </ui:repeat>

Modified: trunk/examples/seambay/view/login.xhtml
===================================================================
--- trunk/examples/seambay/view/login.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/login.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -67,7 +67,7 @@
               <b>*tip*</b> you can log in using <i>demo/demo</i>.            
             </p>
             
-            <h:form>
+            <h:form id="login">
               <p>
                 <b>seamBay User ID</b><br/>
                 <h:inputText id="username" value="#{identity.username}"/>
@@ -78,7 +78,7 @@
                 <h:inputSecret id="password" value="#{identity.password}"/>
               </p>
               
-              <h:commandButton action="#{identity.login}" value="Sign In > "/>
+              <h:commandButton id="submit" action="#{identity.login}" value="Sign In > "/>
           
               <p>
                 <h:selectBooleanCheckbox id="rememberMe" value="#{identity.rememberMe}"/>

Modified: trunk/examples/seambay/view/preview.xhtml
===================================================================
--- trunk/examples/seambay/view/preview.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/preview.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -75,7 +75,7 @@
                   Starting price:
                 </label>
                 <div>
-                  $<b><h:outputText value="#{auctionAction.auction.currentPrice}">
+                  $<b><h:outputText id="price" value="#{auctionAction.auction.currentPrice}">
                     <f:convertNumber minFractionDigits="2" maxFractionDigits="2"/>
                   </h:outputText></b>
                 </div>
@@ -87,7 +87,7 @@
                 <label>End time:</label>
                 <div>
                   <b>
-                    <h:outputText value="#{auctionAction.auction.endDate}">
+                    <h:outputText id="endDate" value="#{auctionAction.auction.endDate}">
                       <f:convertDateTime pattern="dd-MMM-yyyy H:mm:ss"/>
                     </h:outputText>
                   </b>
@@ -168,7 +168,7 @@
             Description
           </div>
     
-          <div class="descriptionContent">
+          <div id="description" class="descriptionContent">
             <s:formattedText value="#{auctionAction.auction.description}" />
       
             <hr/>      
@@ -182,7 +182,7 @@
           </div>
         </div>
                   
-        <h:form>
+        <h:form id="sellForm">
                   
           <div class="navBar">
             <div class="navBarLeft">
@@ -190,7 +190,7 @@
             </div>
             
             <div class="navBarRight">
-              <h:commandButton action="#{auctionAction.confirm}" value="Confirm Listing"/>
+              <h:commandButton id="confirm" action="#{auctionAction.confirm}" value="Confirm Listing"/>
             </div>              
             
             <br class="clear"/>                          

Modified: trunk/examples/seambay/view/register.xhtml
===================================================================
--- trunk/examples/seambay/view/register.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/register.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -42,32 +42,32 @@
         Fill in the following details to register.
       </div>
      
-      <h:form>
+      <h:form id="registration">
         <p>
           <b>seamBay User ID</b><br/>
           <h:inputText id="username" value="#{newuser.username}"/>
-          <div class="validationError"><h:message for="username"/></div>
+          <div class="validationError"><h:message id="usernameMessage" for="username"/></div>
         </p>        
 
         <p>
           <b>Password</b><br/>
           <h:inputSecret id="password" value="#{newuser.password}"/>
-          <div class="validationError"><h:message for="password"/></div>
+          <div class="validationError"><h:message id="passwordMessage" for="password"/></div>
         </p>              
         
         <p>
           <b>Confirm Password</b><br/>
           <h:inputSecret id="confirm" value="#{registerAction.confirm}"/>
-          <div class="validationError"><h:message for="confirm"/></div>
+          <div class="validationError"><h:message id="confirmMessage" for="confirm"/></div>
         </p>
 
         <p>
           <b>Location</b><br/>
           <h:inputText id="location" class="location" value="#{newuser.account.location}"/>
-          <div class="validationError"><h:message for="location"/></div>
+          <div class="validationError"><h:message id="locationMessage" for="location"/></div>
         </p>
         
-        <h:commandButton value="Register >" action="#{registerAction.register}"/>
+        <h:commandButton id="submit" value="Register >" action="#{registerAction.register}"/>
         
       </h:form>
       

Modified: trunk/examples/seambay/view/sell.xhtml
===================================================================
--- trunk/examples/seambay/view/sell.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/sell.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -28,7 +28,7 @@
           Enter the details below then click next
         </div>
 
-        <h:form>
+        <h:form id="sellForm">
         
           <s:validateAll>
             <div class="formRow">
@@ -40,7 +40,7 @@
 
           <div class="navBar">
             <div class="navBarRight">
-              <h:commandButton action="next" value="Next >"/>
+              <h:commandButton id="next" action="next" value="Next >"/>
             </div>            
             <br class="clear"/>
           </div>

Modified: trunk/examples/seambay/view/sell2.js
===================================================================
--- trunk/examples/seambay/view/sell2.js	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/sell2.js	2009-01-20 11:07:32 UTC (rev 9957)
@@ -26,7 +26,7 @@
     }
   }   
   
-  var catId = document.getElementById("catSelection:categoryId").value;  
+  var catId = document.getElementById("sellForm:categoryId").value;  
   
   // If the category ID is valid, select it
   if ((typeof(catId) == "number" || !isNaN(parseInt(catId))))
@@ -139,7 +139,7 @@
 {  
   var opt = getSelectedOption(ctl);
   
-  var ctl = document.getElementById("catSelection:categoryId");
+  var ctl = document.getElementById("sellForm:categoryId");
   var previous = findCategory(ctl.value);
   ctl.value = opt.value;
   

Modified: trunk/examples/seambay/view/sell2.xhtml
===================================================================
--- trunk/examples/seambay/view/sell2.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/sell2.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -28,7 +28,7 @@
           Select the category that most closely matches the item you're selling
         </div>
 
-        <h:form id="catSelection">
+        <h:form id="sellForm">
                 
           <div id="container" class="category">
             <div>
@@ -46,7 +46,7 @@
             </div>
             
             <div class="navBarRight">
-              <h:commandButton value="Next >" action="next"/>
+              <h:commandButton id="next" value="Next >" action="next"/>
             </div>              
             
             <br class="clear"/>                          

Modified: trunk/examples/seambay/view/sell3.xhtml
===================================================================
--- trunk/examples/seambay/view/sell3.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/sell3.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -28,7 +28,7 @@
           Set the running time for your auction, and the starting price
         </div>
 
-        <h:form>
+        <h:form id="sellForm">
         
           <s:validateAll>
             <div class="formRow">
@@ -53,7 +53,7 @@
             </div>
             
             <div class="navBarRight">
-              <h:commandButton value="Next >" action="next"/>
+              <h:commandButton id="next" value="Next >" action="next"/>
             </div>              
             
             <br class="clear"/>                          

Modified: trunk/examples/seambay/view/sell4.xhtml
===================================================================
--- trunk/examples/seambay/view/sell4.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/sell4.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -59,7 +59,7 @@
           <hr class="thinLine"/>
         </ui:repeat>  
 
-        <h:form>
+        <h:form id="sellForm">
                 
           <div class="navBar">
             <div class="navBarLeft">
@@ -67,7 +67,7 @@
             </div>
             
             <div class="navBarRight">
-              <h:commandButton value="Next >" action="next"/>
+              <h:commandButton id="next" value="Next >" action="next"/>
             </div>              
             
             <br class="clear"/>                          

Modified: trunk/examples/seambay/view/sell5.xhtml
===================================================================
--- trunk/examples/seambay/view/sell5.xhtml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/examples/seambay/view/sell5.xhtml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -28,7 +28,7 @@
           Enter a detailed description of the item you wish to sell
         </div>
         
-        <h:form>
+        <h:form id="sellForm">
         
           <div class="formRow">
             <h:inputTextarea id="description" value="#{auctionAction.auction.description}" styleClass="description"/>            
@@ -41,7 +41,7 @@
             </div>
             
             <div class="navBarRight">
-              <h:commandButton value="Next >" action="next"/>
+              <h:commandButton id="next" value="Next >" action="next"/>
             </div>              
             
             <br class="clear"/>                          

Modified: trunk/src/test/ftest/build.xml
===================================================================
--- trunk/src/test/ftest/build.xml	2009-01-20 09:53:13 UTC (rev 9956)
+++ trunk/src/test/ftest/build.xml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -64,6 +64,7 @@
    	  <testexample name="numberguess" />
       <testexample name="quartz" />
    	  <testexample name="registration" />
+   	  <testexample name="seambay" />
       <testexample name="seampay" />
       <testexample name="spring" />
       <testexample name="wicket" />
@@ -79,6 +80,7 @@
    	<testexample name="messages" />
    	<testexample name="numberguess" />
    	<testexample name="registration" />
+   	<testexample name="seambay" />
     <testexample name="seampay" />
     <testexample name="booking" />
     <testexample name="jpa" />
@@ -140,6 +142,7 @@
    	  <cleanexample name="numberguess" />
       <cleanexample name="quartz" />
    	  <cleanexample name="registration" />
+   	  <cleanexample name="seambay" />
       <cleanexample name="seampay" />
       <cleanexample name="spring" />
       <cleanexample name="wicket" />
@@ -160,6 +163,7 @@
    	  <undeployexample name="numberguess" />
       <undeployexample name="quartz" />
    	  <undeployexample name="registration" />
+   	  <undeployexample name="seambay" />
       <undeployexample name="seampay" />
       <undeployexample name="spring" />
       <undeployexample name="wicket" />

Added: trunk/src/test/ftest/examples/seambay/build.xml
===================================================================
--- trunk/src/test/ftest/examples/seambay/build.xml	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/build.xml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+--> 
+<project name="seambay.ftest.build" basedir="." default="build">
+   <property name="example.name" value="seambay"/>
+   <property name="jboss.deploy.target" value="deploy"/>
+   <property name="jboss.undeploy.target" value="undeploy"/>
+   <property name="jboss.example.ready.check.url" value="seam-bay/home.seam"/>
+   <property name="jboss-embedded.deploy.target" value="tomcat.deploy"/>
+   <property name="jboss-embedded.undeploy.target" value="tomcat.undeploy"/>
+   <property name="jboss-embedded.example.ready.check.url" value="jboss-seam-bay/home.seam"/>
+  
+   <import file="../build.xml" />
+</project>


Property changes on: trunk/src/test/ftest/examples/seambay/build.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/jboss-embedded.xml
===================================================================
--- trunk/src/test/ftest/examples/seambay/jboss-embedded.xml	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/jboss-embedded.xml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,34 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+--> 
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Seambay example" verbose="2" parallel="false">
+   <test name="seambay_jboss-embedded">
+      <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/seambay/test/selenium/seambay.properties" />
+      <parameter name="CONTEXT_PATH" value="/jboss-seam-bay" />
+      	<classes>
+		<class name="org.jboss.seam.example.seambay.test.selenium.RegistrationTest" />
+		<class name="org.jboss.seam.example.seambay.test.selenium.SellTest" />
+		<class name="org.jboss.seam.example.seambay.test.selenium.SearchTest" />
+		<class name="org.jboss.seam.example.seambay.test.selenium.BidTest" />
+      </classes>
+   </test>
+</suite>


Property changes on: trunk/src/test/ftest/examples/seambay/jboss-embedded.xml
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/jboss.xml
===================================================================
--- trunk/src/test/ftest/examples/seambay/jboss.xml	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/jboss.xml	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,34 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2008, Red Hat Middleware LLC, and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+--> 
+<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
+<suite name="Seambay example" verbose="2" parallel="false">
+   <test name="seambay_jboss">
+      <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/seambay/test/selenium/seambay.properties" />
+      <parameter name="CONTEXT_PATH" value="/seam-bay" />
+      	<classes>
+		<class name="org.jboss.seam.example.seambay.test.selenium.RegistrationTest" />
+		<class name="org.jboss.seam.example.seambay.test.selenium.SellTest" />
+		<class name="org.jboss.seam.example.seambay.test.selenium.SearchTest" />
+		<class name="org.jboss.seam.example.seambay.test.selenium.BidTest" />
+      </classes>
+   </test>
+</suite>


Property changes on: trunk/src/test/ftest/examples/seambay/jboss.xml
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
===================================================================
--- trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.seam.example.seambay.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.fail;
+
+import org.jboss.seam.example.common.test.selenium.SeamSelenium;
+import org.testng.annotations.Test;
+
+/**
+ * 
+ * @author Jozef Hartinger
+ *
+ */
+public class BidTest extends SeleniumSeamBayTest
+{
+   @Test(dependsOnGroups = { "searchTest"})
+   public void simpleBidTest()
+   {
+      String title = "Lost Tales Volume 1 by J.R.R. Tolkien";
+      String price = "10";
+      int bidCount;
+
+      login();
+      search(title);
+      browser.clickAndWait(getProperty("SEARCH_RESULTS_FIRST_ROW_LINK"));
+      browser.clickAndWait(getProperty("ITEM_BID_HISTORY"));
+      bidCount = browser.getXpathCount(getProperty("BID_HISTORY_COUNT")).intValue();
+      browser.goBackAndWait();
+      placeBid(price);
+      assertTrue("Auction page expected.", browser.getLocation().contains(getProperty("AUCTION_URL")));
+      browser.clickAndWait(getProperty("ITEM_BID_HISTORY"));
+      assertEquals("Unexpected count of bids.", ++bidCount, browser.getXpathCount(getProperty("BID_HISTORY_COUNT")));
+   }
+
+   @Test(dependsOnGroups = { "searchTest", "registrationTest" }, dependsOnMethods = { "simpleBidTest" })
+   public void complexBidTest()
+   {
+      String firstBidderName = "honestjoe";
+      String secondBidderName = "bidTester";
+      String title = "Nikon D80 Digital Camera";
+
+      SeamSelenium firstBrowser = browser;
+      SeamSelenium secondBrowser = startBrowser();
+      try
+      {
+         // register new user in first browser
+         browser.clickAndWait(getProperty("REGISTRATION"));
+         submitRegistrationForm(secondBidderName, "password", "password", "Slovakia");
+         assertTrue("Creating new user failed.", isLoggedIn());
+         // place a bid for a camera
+         search(title);
+         browser.clickAndWait(getProperty("SEARCH_RESULTS_FIRST_ROW_LINK"));
+         placeBid("2000");
+         // switch to second browser and place several bids
+         browser = secondBrowser;
+         browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
+         login();
+         search(title);
+         browser.clickAndWait(getProperty("SEARCH_RESULTS_FIRST_ROW_LINK"));
+         for (int i = 1100; i < 2000; i += 200)
+         {
+            placeBid(String.valueOf(i));
+            assertTrue("'You have been outbid' page expected.", browser.isElementPresent(getProperty("BID_OUTBID")));
+         }
+         placeBid("2200");
+         assertFalse("Outbid unexpectedly", browser.isElementPresent(getProperty("BID_OUTBID")));
+         assertEquals("High bidder not recognized.", firstBidderName, browser.getText(getProperty("BID_HIGH_BIDDER")));
+         // switch to first browser again and place the highest bid again
+         browser = firstBrowser;
+         placeBid("2100");
+         assertTrue("'You have been outbid' page expected.", browser.isElementPresent(getProperty("BID_OUTBID")));
+         placeBid("2500");
+         assertEquals("High bidder not recognized.", secondBidderName, browser.getText(getProperty("BID_HIGH_BIDDER")));
+      }
+      finally
+      {
+         browser = firstBrowser;
+         secondBrowser.stop();
+      }
+   }
+
+   public void placeBid(String price)
+   {
+      if (browser.isElementPresent(getProperty("ITEM_NEW_BID_FIELD")))
+      {
+         browser.type(getProperty("ITEM_NEW_BID_FIELD"), price);
+         browser.clickAndWait(getProperty("ITEM_NEW_BID_SUBMIT"));
+      }
+      else if (browser.isElementPresent(getProperty("BID_INCREASE_FIELD")))
+      {
+         browser.type(getProperty("BID_INCREASE_FIELD"), price);
+         browser.clickAndWait(getProperty("BID_INCREASE_SUBMIT"));
+      }
+      else
+      {
+         fail("Unable to place a bid.");
+      }
+      browser.clickAndWait(getProperty("BID_CONFIRM"));
+   }
+}


Property changes on: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java
===================================================================
--- trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.seam.example.seambay.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * 
+ * @author Jozef Hartinger
+ *
+ */
+public class RegistrationTest extends SeleniumSeamBayTest
+{
+   
+   @Override
+   @BeforeMethod
+   public void setUp() {
+      super.setUp();
+      browser.clickAndWait(getProperty("REGISTRATION"));
+   }
+   
+   @Test(groups="registrationTest")
+   public void testRegistration() {
+      submitRegistrationForm("tester", "password", "password", "location");
+      assertTrue("Registration failed.", isLoggedIn());
+   }
+   
+   /**
+    * This test verifies that application will not crash after submitting empty registration form
+    */
+   @Test
+   public void testEmptyRegistration() {
+      submitRegistrationForm("", "", "", "");
+      assertFalse("Registration resulted in debug page.", browser.getLocation().contains(getProperty("DEBUG_PAGE")));
+   }
+   
+   @Test
+   public void testPasswordConfirmation() {
+      submitRegistrationForm("tester1", "password", "differentPassword", "location");
+      assertTrue("Registration page expected.",
+            browser.getLocation().contains(getProperty("REGISTRATION_PAGE")));
+      assertTrue("Error message not displayed.", browser.isElementPresent(getProperty("REGISTRATION_CONFIRM_MESSAGE")));
+   }
+
+}


Property changes on: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java
===================================================================
--- trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.seam.example.seambay.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * 
+ * @author Jozef Hartinger
+ *
+ */
+public class SearchTest extends SeleniumSeamBayTest
+{
+   @Test(groups={"searchTest"})
+   public void searchTest() {
+      String title = "Pontiac Firebird Trans Am T-top";
+      assertEquals("Unexpected number of search results.", 1, search(title));
+   }
+}


Property changes on: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java
===================================================================
--- trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.seam.example.seambay.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.fail;
+
+/**
+ * Main class for SeamBay example tests
+ * 
+ * @author Jozef Hartinger
+ * 
+ */
+public class SeleniumSeamBayTest extends SeamSeleniumTest
+{
+
+   protected String defaultLogin = "demo";
+   protected String defaultPassword = "demo";
+
+   @Override
+   @BeforeMethod
+   public void setUp()
+   {
+      super.setUp();
+      browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
+      browser.waitForPageToLoad(TIMEOUT);
+   }
+
+   public void login(String username, String password)
+   {
+      if (isLoggedIn())
+      {
+         fail("User already logged in.");
+      }
+      browser.clickAndWait(getProperty("LOGIN"));
+      submitLoginForm(username, password);
+   }
+
+   public void login()
+   {
+      login(defaultLogin, defaultPassword);
+   }
+
+   public boolean isLoggedIn()
+   {
+      return browser.isElementPresent(getProperty("LOGOUT"));
+   }
+
+   public void submitRegistrationForm(String username, String password, String verify, String location)
+   {
+      assertTrue("Registration page expected.", browser.getLocation().contains(getProperty("REGISTRATION_URL")));
+      browser.type(getProperty("REGISTRATION_USERNAME"), username);
+      browser.type(getProperty("REGISTRATION_PASSWORD"), password);
+      browser.type(getProperty("REGISTRATION_VERIFY"), verify);
+      browser.type(getProperty("REGISTRATION_LOCATION"), location);
+      browser.clickAndWait(getProperty("REGISTRATION_SUBMIT"));
+   }
+
+   public void submitLoginForm(String username, String password)
+   {
+      browser.type(getProperty("LOGIN_USERNAME"), username);
+      browser.type(getProperty("LOGIN_PASSWORD"), password);
+      browser.clickAndWait(getProperty("LOGIN_SUBMIT"));
+   }
+
+   public int search(String keyword)
+   {
+      browser.type(getProperty("SEARCH_FIELD"), keyword);
+      browser.clickAndWait(getProperty("SEARCH_SUBMIT"));
+      return browser.getXpathCount(getProperty("SEARCH_RESULTS_COUNT")).intValue();
+   }
+
+}


Property changes on: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java
===================================================================
--- trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */ 
+package org.jboss.seam.example.seambay.test.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.Wait;
+
+/**
+ * 
+ * @author Jozef Hartinger
+ *
+ */
+public class SellTest extends SeleniumSeamBayTest
+{
+   @Test(dependsOnGroups={"searchTest"})
+   public void joystickSellingTest()
+   {
+      String title = "Saitek X52 Pro Flight System";
+      int category = 7;
+      int subcategory = 3;
+      String duration = "7";
+      String price = "100";
+      String description = "The most fully integrated Stick and throttle flight controller: built to meet the demands of the best virtual pilots in the world!";
+
+      sellItem(title, category, subcategory, duration, price, description);
+   }
+
+   protected void sellItem(String title, int category, int subcategory, String duration, String price, String description)
+   {
+      login();
+      browser.clickAndWait(getProperty("SELL"));
+      submitSell1Page(title);
+      submitSell2Page(category, subcategory);
+      submitSell3Page(duration, price);
+      submitSell4Page();
+      submitSell5Page(description);
+      validatePreview(price, description);
+      browser.clickAndWait(getProperty("SELL_CONFIRM"));
+      assertTrue("Navigation failure, home page expected", browser.getLocation().contains(getProperty("HOME_PAGE")));
+      assertEquals("Unexpected number of search results.", 1, search(title));
+   }
+
+   protected void submitSell1Page(String title) {
+      assertTrue("Navigation failure, sell1 page expected", browser.getLocation().contains(getProperty("SELL_1_URL")));
+      browser.type(getProperty("SELL_TITLE"), title);
+      browser.clickAndWait(getProperty("SELL_NEXT"));
+   }
+   
+   protected void submitSell2Page(int category, int subcategory) {
+      assertTrue("Navigation failure, sell2 page expected", browser.getLocation().contains(getProperty("SELL_2_URL")));
+      new Wait()
+      {
+         @Override
+         public boolean until()
+         {
+            return browser.isElementPresent(getProperty("SELL_CATEGORY_SELECT"));
+         }
+      };
+      browser.select(getProperty("SELL_CATEGORY_SELECT"), "index=" + category);
+      if (subcategory != 0)
+      {
+         new Wait()
+         {
+            @Override
+            public boolean until()
+            {
+               return browser.isElementPresent(getProperty("SELL_SUBCATEGORY_SELECT"));
+            }
+         };
+         browser.select(getProperty("SELL_SUBCATEGORY_SELECT"), "index=" + subcategory);
+      }
+      browser.clickAndWait(getProperty("SELL_NEXT"));
+   }
+   
+   protected void submitSell3Page(String duration, String price) {
+      assertTrue("Navigation failure, sell3 page expected", browser.getLocation().contains(getProperty("SELL_3_URL")));
+      browser.type(getProperty("SELL_DURATION"), duration);
+      browser.type(getProperty("SELL_PRICE"), price);
+      browser.clickAndWait(getProperty("SELL_NEXT"));
+   }
+   
+   protected void submitSell4Page() {
+      assertTrue("Navigation failure, sell4 page expected", browser.getLocation().contains(getProperty("SELL_4_URL")));
+      browser.clickAndWait(getProperty("SELL_NEXT"));
+   }
+   
+   protected void submitSell5Page(String description) {
+      assertTrue("Navigation failure, sell5 page expected", browser.getLocation().contains(getProperty("SELL_5_URL")));
+      browser.type(getProperty("SELL_DESCRIPTION"), description);
+      browser.clickAndWait(getProperty("SELL_NEXT"));
+   }
+   
+   protected void validatePreview(String price, String description)
+   {
+      assertTrue("Must be on preview page to validate preview.", browser.getLocation().contains(getProperty("SELL_PREVIEW_URL")));
+      assertEquals("Unexpected price on preview page.", Double.valueOf(price), Double.valueOf(browser.getText(getProperty("SELL_PREVIEW_PRICE"))));
+      assertEquals("Unexpected description on description page.", description, browser.getText(getProperty("SELL_PREVIEW_DESCRIPTION")));
+   }
+}


Property changes on: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
===================================================================
--- trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties	                        (rev 0)
+++ trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties	2009-01-20 11:07:32 UTC (rev 9957)
@@ -0,0 +1,55 @@
+HOME_PAGE /home.seam
+DEBUG_PAGE debug.seam
+REGISTRATION_PAGE register.seam
+LOGIN id=login
+LOGOUT id=logout
+REGISTRATION id=register
+SELL id=sell
+LOGIN_URL login.seam
+LOGIN_USERNAME id=login:username
+LOGIN_PASSWORD id=login:password
+LOGIN_SUBMIT id=login:submit
+REGISTRATION_USERNAME id=registration:username
+REGISTRATION_PASSWORD id=registration:password
+REGISTRATION_VERIFY id=registration:confirm
+REGISTRATION_LOCATION id=registration:location
+REGISTRATION_SUBMIT id=registration:submit
+REGISTRATION_CONFIRM_MESSAGE id=registration:confirmMessage
+SELL_LINK id=sell
+REGISTRATION_URL register.seam
+ITEMDETAIL_URL itemdetail
+AUCTION_URL auction.seam
+SELL_1_URL sell.seam
+SELL_2_URL sell2.seam
+SELL_3_URL sell3.seam
+SELL_4_URL sell4.seam
+SELL_5_URL sell5.seam
+SELL_PREVIEW_URL preview.seam
+SELL_PREVIEW_PRICE id=price
+SELL_PREVIEW_DESCRIPTION id=description
+SELL_TITLE id=sellForm:title
+SELL_DURATION id=sellForm:duration
+SELL_PRICE id=sellForm:price
+SELL_DESCRIPTION id=sellForm:description
+SELL_NEXT id=sellForm:next
+SELL_CONFIRM id=sellForm:confirm
+SELL_CATEGORY_SELECT id=rootCategory
+SELL_SUBCATEGORY_SELECT id\=tier2
+
+SEARCH_FIELD id=search:searchTerm
+SEARCH_SUBMIT id=search:submit
+SEARCH_RESULTS_COUNT //table[@id='auctions']/tbody/tr
+SEARCH_RESULTS_FIRST_ROW_LINK //table[@id='auctions']/tbody/tr[1]/td[2]/a
+
+ITEM_NEW_BID_FIELD id=newBid:bidAmount
+ITEM_NEW_BID_SUBMIT id=newBid:placeBidWithAmount
+ITEM_NEW_BID_LINK id=bid:placeBid
+ITEM_BID_HISTORY id=bidHistory
+BID_INCREASE_FIELD id=increaseBid:bidAmount
+BID_INCREASE_SUBMIT id=increaseBid:bidAgain
+
+BID_CONFIRM id=confirm:confirmBid
+BID_HISTORY_COUNT //table[@id='history']/tbody/tr
+BID_OUTBID id=outbid
+BID_HIGH_BIDDER id\=highBidder
+BID_HISTORY_BACK id\=back
\ No newline at end of file


Property changes on: trunk/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the seam-commits mailing list