[seam-commits] Seam SVN: r10055 - in branches/enterprise/JBPAPP_4_3_FP01: examples/drools/view and 235 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Wed Feb 18 11:07:30 EST 2009
Author: manaRH
Date: 2009-02-18 11:07:30 -0500 (Wed, 18 Feb 2009)
New Revision: 10055
Added:
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/selenium/booking.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/CommentTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactCRUDTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactlistConstants.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/Person.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/SeleniumContactlistTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/LoginTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/Person.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/RegistrationTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SeleniumDvdTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/ShoppingCartTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/dvd.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/selenium/groovybooking.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/selenium/hibernate.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/selenium/icefaces.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/test/selenium/SeleniumItextTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/selenium/jpa.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/test/selenium/SeleniumMailTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/test/selenium/MessageTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedSimpleBookingTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/QuartzPaymentTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/quartz.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/test/selenium/SeleniumChatroomTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/selenium/seampay.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/LoginTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/UserTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/SpringChangePasswordTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/spring.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/build.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/jboss.xml
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/test/selenium/SeleniumUITest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/ftest.properties
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/selenium-java-client-driver.jar
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/selenium-server-standalone.jar
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/testng-5.8-jdk15.jar
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/AjaxTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/BackButtonTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ChangePasswordTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ConversationTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/RegistrationTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SeleniumBookingTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SimpleBookingTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSelenium.java
branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSeleniumTest.java
Modified:
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/404.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/entry.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/index.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/login.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/menu.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/nav.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/search.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/drools/view/numberGuess.jsp
branches/enterprise/JBPAPP_4_3_FP01/examples/messages/view/messages.jsp
branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/numberguess/view/numberGuess.jspx
branches/enterprise/JBPAPP_4_3_FP01/examples/registration/view/register.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/auction.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bid.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bidhistory.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/header.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/home.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/login.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/preview.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.js
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell3.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell4.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell5.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/createBlog.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/home.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/profile.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/template.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/userdetail.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/usermanager.xhtml
branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/login.jsp
branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/todo.jsp
Log:
JBPAPP-1700
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/404.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/404.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/404.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -7,7 +7,7 @@
template="#{theme.template}">
<ui:define name="content">
- <h3>Page not found</h3>
+ <h3 id="404">Page not found</h3>
</ui:define>
</ui:composition>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/entry.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/entry.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/entry.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -10,8 +10,8 @@
<ui:define name="content">
<s:cache key="entry-#{blogEntry.id}" region="pageFragments">
<div class="blogEntry">
- <h3>#{blogEntry.title}</h3>
- <div>
+ <h3 id="title">#{blogEntry.title}</h3>
+ <div id="body">
<s:formattedText value="#{blogEntry.body}"/>
</div>
<p>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/index.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/index.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/index.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -9,15 +9,15 @@
<ui:define name="content">
<s:cache key="index" region="pageFragments">
- <h:dataTable value="#{blog.recentBlogEntries}" var="blogEntry" rows="3">
+ <h:dataTable id="entryTable" value="#{blog.recentBlogEntries}" var="blogEntry" rows="3">
<h:column>
<div class="blogEntry">
- <h3>#{blogEntry.title}</h3>
+ <h3><h:outputText id="title" value="#{blogEntry.title}" /></h3>
<div>
- <s:formattedText value="#{blogEntry.excerpt==null ? blogEntry.body : blogEntry.excerpt}"/>
+ <s:formattedText id="excerpt" value="#{blogEntry.excerpt==null ? blogEntry.body : blogEntry.excerpt}"/>
</div>
<p>
- <h:outputLink value="entry.xhtml" rendered="#{blogEntry.excerpt!=null}">
+ <h:outputLink id="link" value="entry.xhtml" rendered="#{blogEntry.excerpt!=null}">
<f:param name="blogEntryId" value="#{blogEntry.id}"/>
Read more...
</h:outputLink>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/login.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/login.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/login.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -8,7 +8,7 @@
<ui:define name="content">
<div class="blogEntry">
- <h:form>
+ <h:form id="login">
<div>
<h:outputLabel for="password">Password:</h:outputLabel>
</div>
@@ -17,7 +17,7 @@
value="#{identity.password}"
size="15"
maxlength="15"/>
- <h:commandButton value="Login"/>
+ <h:commandButton id="login" value="Login"/>
<span class="errors"><h:message for="password"/></span>
<span class="errors"><h:messages globalOnly="true"/></span>
</div>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/menu.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/menu.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/menu.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -1,11 +1,11 @@
-<h:form xmlns="http://www.w3.org/1999/xhtml"
+<h:form id="searchForm" xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<span class="menuItem">
- <h:inputText value="#{searchService.searchPattern}"/>
- <h:commandButton value="Search" action="/search.xhtml"/>
+ <h:inputText id="field" value="#{searchService.searchPattern}"/>
+ <h:commandButton id="submit" value="Search" action="/search.xhtml"/>
</span>
<span class="menuItem">
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/nav.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/nav.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/nav.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -3,15 +3,15 @@
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
- <h:outputLink value="search.xhtml">
+ <h:outputLink id="allPosts" value="search.xhtml">
[All posts]
<f:param name="searchPattern" value=""/>
</h:outputLink>
- <h:outputLink value="index.xhtml">[Recent posts]</h:outputLink>
+ <h:outputLink id="recentPosts" value="index.xhtml">[Recent posts]</h:outputLink>
- <h:outputLink value="post.xhtml">[Write new post]</h:outputLink>
+ <h:outputLink id="newPost" value="post.xhtml">[Write new post]</h:outputLink>
- <h:outputLink value="index.xml">[Atom feed]</h:outputLink>
+ <h:outputLink id="atomFeed" value="index.xml">[Atom feed]</h:outputLink>
</span>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/search.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/search.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/blog/view/search.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -7,10 +7,10 @@
template="#{theme.template}">
<ui:define name="content">
- <h:dataTable value="#{searchResults}" var="blogEntry">
+ <h:dataTable id="searchResultTable" value="#{searchResults}" var="blogEntry">
<h:column>
<div>
- <h:outputLink value="entry.xhtml">
+ <h:outputLink id="link" value="entry.xhtml">
<f:param name="blogEntryId" value="#{blogEntry.id}"/>
#{blogEntry.title}
</h:outputLink>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/drools/view/numberGuess.jsp
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/drools/view/numberGuess.jsp 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/drools/view/numberGuess.jsp 2009-02-18 16:07:30 UTC (rev 10055)
@@ -7,20 +7,20 @@
<body>
<h1>Guess a number...</h1>
<f:view>
- <h:form>
+ <h:form id="NumberGuessMain">
<h:outputText value="Higher!" rendered="#{randomNumber>guess.value}" />
<h:outputText value="Lower!" rendered="#{randomNumber<guess.value}" />
<br />
- I'm thinking of a number between <h:outputText value="#{game.smallest}" /> and
- <h:outputText value="#{game.biggest}" />.
+ I'm thinking of a number between <h:outputText id="Smallest" value="#{game.smallest}" /> and
+ <h:outputText id="Biggest" value="#{game.biggest}" />.
<br />
Your guess:
- <h:inputText value="#{guess.value}" id="guess" required="true">
+ <h:inputText value="#{guess.value}" id="inputGuess" required="true">
<f:validateLongRange
maximum="#{game.biggest}"
minimum="#{game.smallest}"/>
</h:inputText>
- <h:commandButton type="submit" value="Guess" action="guess" />
+ <h:commandButton id="GuessButton" type="submit" value="Guess" action="guess" />
<br/>
<h:message for="guess" style="color: red"/>
</h:form>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/messages/view/messages.jsp
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/messages/view/messages.jsp 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/messages/view/messages.jsp 2009-02-18 16:07:30 UTC (rev 10055)
@@ -8,34 +8,34 @@
<body>
<f:view>
<h2>Message List</h2>
- <h:outputText value="No messages to display" rendered="#{messageList.rowCount==0}"/>
- <h:dataTable var="msg" value="#{messageList}" rendered="#{messageList.rowCount>0}">
+ <h:outputText id="noMessages" value="No messages to display" rendered="#{messageList.rowCount==0}"/>
+ <h:dataTable id="messages" var="msg" value="#{messageList}" rendered="#{messageList.rowCount>0}">
<h:column>
<f:facet name="header">
<h:outputText value="Read"/>
</f:facet>
- <h:selectBooleanCheckbox value="#{msg.read}" disabled="true"/>
+ <h:selectBooleanCheckbox id="read" value="#{msg.read}" disabled="true"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Title"/>
</f:facet>
- <s:link value="#{msg.title}" action="#{messageManager.select}"/>
+ <s:link id="link" value="#{msg.title}" action="#{messageManager.select}"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Date/Time"/>
</f:facet>
- <h:outputText value="#{msg.datetime}">
+ <h:outputText id="date" value="#{msg.datetime}">
<s:convertDateTime type="both" dateStyle="medium" timeStyle="short"/>
</h:outputText>
</h:column>
<h:column>
- <s:button value="Delete" action="#{messageManager.delete}"/>
+ <s:button id="delete" value="Delete" action="#{messageManager.delete}"/>
</h:column>
</h:dataTable>
- <h3><h:outputText value="#{message.title}"/></h3>
- <div><h:outputText value="#{message.text}"/></div>
+ <h3><h:outputText id="title" value="#{message.title}"/></h3>
+ <div><h:outputText id="text" value="#{message.text}"/></div>
</f:view>
</body>
</html>
\ No newline at end of file
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/nestedbooking/view/main.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -43,7 +43,7 @@
<a:outputPanel id="searchResults">
<div class="section">
- <h:outputText id="NoBookingsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
+ <h:outputText id="NoHotelsFoundMessage" value="No Hotels Found" rendered="#{hotels != null and hotels.rowCount==0}"/>
<h:dataTable id="hotels" value="#{hotels}" var="hot" rendered="#{hotels.rowCount>0}">
<h:column id="column1">
<f:facet id="NameFacet" name="header">Name</f:facet>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/numberguess/view/numberGuess.jspx
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/numberguess/view/numberGuess.jspx 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/numberguess/view/numberGuess.jspx 2009-02-18 16:07:30 UTC (rev 10055)
@@ -18,44 +18,45 @@
<body>
<h1>Guess a number...</h1>
<f:view>
- <h:form styleClass="niceform">
+ <h:form id="NumberGuessMain" styleClass="niceform">
<div>
- <h:messages globalOnly="true"/>
- <h:outputText value="Higher!"
+ <h:messages id="messages" globalOnly="true"/>
+ <h:outputText id="Higher"
+ value="Higher!"
rendered="#{numberGuess.randomNumber gt numberGuess.currentGuess}"/>
- <h:outputText value="Lower!"
+ <h:outputText id="Lower" value="Lower!"
rendered="#{numberGuess.randomNumber lt numberGuess.currentGuess}"/>
</div>
<div>
- I'm thinking of a number between <h:outputText value="#{numberGuess.smallest}"/> and
- <h:outputText value="#{numberGuess.biggest}"/>. You have
- <h:outputText value="#{numberGuess.remainingGuesses}"/> guesses.
+ I'm thinking of a number between <h:outputText id="Smallest" value="#{numberGuess.smallest}"/> and
+ <h:outputText id="Biggest" value="#{numberGuess.biggest}"/>. You have
+ <h:outputText id="RemainingGuesses" value="#{numberGuess.remainingGuesses}"/> guesses.
</div>
<div>
Your guess:
- <h:inputText value="#{numberGuess.currentGuess}" id="inputGuess" required="true" size="3"
+ <h:inputText id="inputGuess" value="#{numberGuess.currentGuess}" required="true" size="3"
rendered="#{(numberGuess.biggest-numberGuess.smallest) gt 20}">
<f:validateLongRange maximum="#{numberGuess.biggest}"
minimum="#{numberGuess.smallest}"/>
</h:inputText>
- <h:selectOneMenu value="#{numberGuess.currentGuess}" id="selectGuessMenu" required="true"
+ <h:selectOneMenu id="selectGuessMenu" value="#{numberGuess.currentGuess}" required="true"
rendered="#{(numberGuess.biggest-numberGuess.smallest) le 20 and (numberGuess.biggest-numberGuess.smallest) gt 4}">
- <s:selectItems value="#{numberGuess.possibilities}" var="i" label="#{i}"/>
+ <s:selectItems id="PossibilitiesMenuItems" value="#{numberGuess.possibilities}" var="i" label="#{i}"/>
</h:selectOneMenu>
- <h:selectOneRadio value="#{numberGuess.currentGuess}" id="selectGuessRadio" required="true"
+ <h:selectOneRadio id="selectGuessRadio" value="#{numberGuess.currentGuess}" required="true"
rendered="#{(numberGuess.biggest-numberGuess.smallest) le 4}">
- <s:selectItems value="#{numberGuess.possibilities}" var="i" label="#{i}"/>
+ <s:selectItems id="PossibilitiesRadioItems" value="#{numberGuess.possibilities}" var="i" label="#{i}"/>
</h:selectOneRadio>
- <h:commandButton value="Guess" action="guess"/>
- <s:button value="Cheat" action="cheat"/>
- <s:button value="Give up" action="giveup"/>
+ <h:commandButton id="GuessButton" value="Guess" action="guess"/>
+ <s:button id="CheatButton" value="Cheat" action="cheat"/>
+ <s:button id="GiveUpButton" value="Give up" action="giveup"/>
</div>
<div>
- <h:message for="inputGuess" style="color: red"/>
+ <h:message id="message" for="inputGuess" style="color: red"/>
</div>
</h:form>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/registration/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/registration/view/register.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/registration/view/register.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -11,16 +11,16 @@
</head>
<body>
<f:view>
- <h:form>
+ <h:form id="registration">
<s:validateAll>
<h:panelGrid columns="2">
- Username: <h:inputText value="#{user.username}" required="true"/>
- Real Name: <h:inputText value="#{user.name}" required="true"/>
- Password: <h:inputSecret value="#{user.password}" required="true"/>
+ Username: <h:inputText id="username" value="#{user.username}" required="true"/>
+ Real Name: <h:inputText id="name" value="#{user.name}" required="true"/>
+ Password: <h:inputSecret id="password" value="#{user.password}" required="true"/>
</h:panelGrid>
</s:validateAll>
- <h:messages/>
- <h:commandButton value="Register" action="#{register.register}"/>
+ <h:messages id="messages"/>
+ <h:commandButton id="register" value="Register" action="#{register.register}"/>
</h:form>
</f:view>
</body>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/auction.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/auction.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/auction.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bid.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bid.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bid.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bidhistory.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bidhistory.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/bidhistory.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/header.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/header.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/header.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/home.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/home.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/home.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/login.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/login.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/login.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/preview.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/preview.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/preview.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/register.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.js
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.js 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.js 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell2.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell3.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell3.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell3.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell4.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell4.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell4.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell5.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell5.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seambay/view/sell5.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/createBlog.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/createBlog.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/createBlog.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -32,7 +32,7 @@
</s:div>
<div class="blogEntry">
- <h:form>
+ <h:form id="newBlog">
<div class="formRow">
<h:outputLabel for="title">Please type a title for your blog entry</h:outputLabel><br/>
@@ -45,8 +45,8 @@
</div>
<div class="buttons">
- <h:commandButton action="#{blog.saveEntry}" value="Add entry" styleClass="action"/>
- <h:commandButton value="Preview" styleClass="action"/>
+ <h:commandButton id="submit" action="#{blog.saveEntry}" value="Add entry" styleClass="action"/>
+ <h:commandButton id="preview" value="Preview" styleClass="action"/>
</div>
<br class="clear"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/home.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/home.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/home.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -23,11 +23,11 @@
<div id="contentSide">
<div class="advertising"></div>
- <h:form rendered="#{not identity.loggedIn}">
+ <h:form id="loginForm" rendered="#{not identity.loggedIn}">
<div class="memberLogin">
<div class="loginHeader">Member Login</div>
- <h:messages globalOnly="true"/>
+ <h:messages id="messages" globalOnly="true"/>
<div class="loginRow">
<h:outputLabel for="name" value="Member name" styleClass="loginLabel"/>
@@ -53,8 +53,8 @@
</div>
<div class="buttons">
- <h:commandButton value="LOGIN" action="#{identity.login}" styleClass="loginButton"/>
- <h:commandButton value="SIGN UP!" action="#{register.start}" styleClass="registerButton"/>
+ <h:commandButton id="login" value="LOGIN" action="#{identity.login}" styleClass="loginButton"/>
+ <h:commandButton id="register" value="SIGN UP!" action="#{register.start}" styleClass="registerButton"/>
</div>
<br class="clear"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/profile.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/profile.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/profile.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -48,11 +48,11 @@
</div>
</ui:repeat>
- [<s:link view="/blog.seam" value="View all blog entries" propagation="none">
+ [<s:link id="viewBlog" view="/blog.seam" value="View all blog entries" propagation="none">
<f:param name="name" value="#{selectedMember.memberName}"/>
</s:link>]
- <s:span rendered="#{s:hasPermission('blog', 'create', selectedMember)}">
+ <s:span id="createBlog" rendered="#{s:hasPermission('blog', 'create', selectedMember)}">
[<s:link action="#{blog.createEntry}" value="Create new blog entry" propagation="none"/>]
</s:span>
</s:div>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/template.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/template.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/template.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -17,8 +17,8 @@
<div class="headerRight">
<div class="headerMenu">
<!--s:link action="" value="SignUp"/-->
- <s:link action="#{identity.logout}" value="Log out" rendered="#{identity.loggedIn}"/>
- <h:outputLink value="home.seam" rendered="#{not identity.loggedIn}">Log in</h:outputLink>
+ <s:link id="logout" action="#{identity.logout}" value="Log out" rendered="#{identity.loggedIn}"/>
+ <h:outputLink id="login" value="home.seam" rendered="#{not identity.loggedIn}">Log in</h:outputLink>
</div>
<br style="clear:both"/>
<h:form>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/userdetail.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/userdetail.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/userdetail.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -51,8 +51,8 @@
</div>
<div class="formButtons">
- <h:commandButton value="Save" action="#{userAction.save}" styleClass="formButton"/>
- <s:button view="/usermanager.xhtml" value="Cancel" propagation="end" styleClass="formButton"/>
+ <h:commandButton id="save" value="Save" action="#{userAction.save}" styleClass="formButton"/>
+ <s:button id="cancel" view="/usermanager.xhtml" value="Cancel" propagation="end" styleClass="formButton"/>
</div>
<br class="clear"/>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/usermanager.xhtml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/usermanager.xhtml 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/seamspace/view/usermanager.xhtml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -21,7 +21,7 @@
<h2>User Manager</h2>
- <s:button action="#{userAction.createUser}" styleClass="newuser" rendered="#{s:hasPermission('seam.account', 'create', null)}"/>
+ <s:button id="newUser" action="#{userAction.createUser}" styleClass="newuser" rendered="#{s:hasPermission('seam.account', 'create', null)}"/>
<rich:dataTable
id="threads"
@@ -51,14 +51,14 @@
<rich:column width="auto">
#{userSearch.getUserRoles(user)}
</rich:column>
- <rich:column width="auto">
+ <rich:column id="enabled" width="auto">
<div class="#{identityManager.isEnabled(user) ? 'checkmark' : 'cross'}"/>
</rich:column>
- <rich:column width="auto">
+ <rich:column id="action" width="auto">
<s:fragment rendered="#{s:hasPermission('seam.account', 'update', null)}">
- <s:link value="Edit" action="#{userAction.editUser(userSearch.selectedUser)}"/><span> | </span>
+ <s:link id="edit" value="Edit" action="#{userAction.editUser(userSearch.selectedUser)}"/><span> | </span>
</s:fragment>
- <s:link value="Delete" action="#{identityManager.deleteAccount(userSearch.selectedUser)}"
+ <s:link id="delete" value="Delete" action="#{identityManager.deleteAccount(userSearch.selectedUser)}"
rendered="#{s:hasPermission('seam.account', 'delete', null)}"
onclick="return confirmDelete()"/>
</rich:column>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/login.jsp
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/login.jsp 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/login.jsp 2009-02-18 16:07:30 UTC (rev 10055)
@@ -7,10 +7,10 @@
<body>
<h1>Login</h1>
<f:view>
- <h:form>
+ <h:form id="login">
<div>
- <h:inputText value="#{login.user}"/>
- <h:commandButton value="Login" action="#{login.login}"/>
+ <h:inputText id="username" value="#{login.user}"/>
+ <h:commandButton id="submit" value="Login" action="#{login.login}"/>
</div>
</h:form>
</f:view>
Modified: branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/todo.jsp
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/todo.jsp 2009-02-18 14:03:11 UTC (rev 10054)
+++ branches/enterprise/JBPAPP_4_3_FP01/examples/todo/view/todo.jsp 2009-02-18 16:07:30 UTC (rev 10055)
@@ -10,13 +10,13 @@
<f:view>
<h:form id="list">
<div>
- <h:outputText value="There are no todo items." rendered="#{empty taskInstancePriorityList}"/>
- <h:dataTable value="#{taskInstancePriorityList}" var="task" rendered="#{not empty taskInstancePriorityList}">
+ <h:outputText id="noItems" value="There are no todo items." rendered="#{empty taskInstancePriorityList}"/>
+ <h:dataTable id="items" value="#{taskInstancePriorityList}" var="task" rendered="#{not empty taskInstancePriorityList}">
<h:column>
<f:facet name="header">
<h:outputText value="Description"/>
</f:facet>
- <h:inputText value="#{task.description}" style="width: 400"/>
+ <h:inputText id="description" value="#{task.description}" style="width: 400"/>
</h:column>
<h:column>
<f:facet name="header">
@@ -30,18 +30,18 @@
<f:facet name="header">
<h:outputText value="Priority"/>
</f:facet>
- <h:inputText value="#{task.priority}" style="width: 30"/>
+ <h:inputText id="priority" value="#{task.priority}" style="width: 30"/>
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Due Date"/>
</f:facet>
- <h:inputText value="#{task.dueDate}" style="width: 100">
+ <h:inputText id="dueDate" value="#{task.dueDate}" style="width: 100">
<s:convertDateTime type="date" dateStyle="short"/>
</h:inputText>
</h:column>
<h:column>
- <s:button action="#{todoList.done}" taskInstance="#{task}" value="Done"/>
+ <s:button id="done" action="#{todoList.done}" taskInstance="#{task}" value="Done"/>
</h:column>
</h:dataTable>
</div>
@@ -49,13 +49,13 @@
<h:messages/>
</div>
<div>
- <h:commandButton value="Update Items" rendered="#{not empty taskInstanceList}"/>
+ <h:commandButton id="update" value="Update Items" rendered="#{not empty taskInstanceList}"/>
</div>
</h:form>
<h:form id="new">
<div>
- <h:inputText value="#{todoList.description}" style="width: 400"/>
- <h:commandButton value="Create New Item" action="#{todoList.createTodo}"/>
+ <h:inputText id="description" value="#{todoList.description}" style="width: 400"/>
+ <h:commandButton id="create" value="Create New Item" action="#{todoList.createTodo}"/>
</div>
</h:form>
</f:view>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,211 @@
+<?xml version="1.0"?>
+<!--
+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.
+-->
+
+<!-- core build file for executing and managing Seam functional tests -->
+<project name="ftest.base.build" default="testall" basedir=".">
+
+ <!-- Location of Seam -->
+ <dirname property="seam.dir" file="${ant.file.ftest.base.build}/../../../" />
+
+ <!--Import properties -->
+ <property file="ftest.properties" />
+
+ <property name="ftest.dir" value="${seam.dir}/src/test/ftest" />
+
+ <!-- TODO : should the libs be in seam/lib and managed with mvn? -->
+ <property name="lib.dir" value="${ftest.dir}/lib" />
+ <property name="log.dir" value="${ftest.dir}/log" />
+
+ <path id="selenium.server.classpath">
+ <fileset dir="${lib.dir}">
+ <include name="selenium-server-standalone.jar" />
+ </fileset>
+ </path>
+
+ <target name="testall">
+ <antcall target="testall.jboss" />
+ </target>
+
+ <target name="testall.jboss">
+ <property name="container" value="jboss" />
+ <antcall target="start.selenium.server" />
+ <!-- Execute tests for all examples jboss-->
+ <testexample name="blog" />
+ <testexample name="booking" />
+ <testexample name="drools" />
+ <testexample name="dvdstore" />
+ <testexample name="contactlist" />
+ <testexample name="groovybooking" />
+ <testexample name="hibernate" />
+ <testexample name="icefaces" />
+ <testexample name="itext" />
+ <testexample name="jpa" />
+ <testexample name="mail" />
+ <testexample name="messages" />
+ <testexample name="nestedbooking" />
+ <testexample name="numberguess" />
+ <testexample name="quartz" />
+ <testexample name="registration" />
+ <testexample name="remoting/chatroom" />
+ <testexample name="seambay" />
+ <testexample name="seampay" />
+ <testexample name="seamspace" />
+ <testexample name="spring" />
+ <testexample name="todo" />
+ <testexample name="ui" />
+ <antcall target="stop.selenium.server" />
+ </target>
+
+
+ <target name="test">
+ <property name="container" value="jboss" />
+ <antcall target="test.single.example" />
+ </target>
+
+
+ <target name="test.single.example">
+ <antcall target="start.selenium.server" />
+
+ <!-- Execute tests for a specific example-->
+ <testexample name="${test}" />
+
+ <antcall target="stop.selenium.server" />
+ </target>
+
+ <target name="cleanall">
+ <cleanexample name="blog" />
+ <cleanexample name="booking" />
+ <cleanexample name="drools" />
+ <cleanexample name="dvdstore" />
+ <cleanexample name="contactlist" />
+ <cleanexample name="groovybooking" />
+ <cleanexample name="hibernate" />
+ <cleanexample name="icefaces" />
+ <cleanexample name="itext" />
+ <cleanexample name="jpa" />
+ <cleanexample name="mail" />
+ <cleanexample name="messages" />
+ <cleanexample name="nestedbooking" />
+ <cleanexample name="numberguess" />
+ <cleanexample name="quartz" />
+ <cleanexample name="registration" />
+ <cleanexample name="remoting/chatroom" />
+ <cleanexample name="seambay" />
+ <cleanexample name="seampay" />
+ <cleanexample name="seamspace" />
+ <cleanexample name="spring" />
+ <cleanexample name="todo" />
+ <cleanexample name="ui" />
+ </target>
+
+ <target name="undeployall">
+ <property name="container" value="jboss" />
+ <undeployexample name="blog" />
+ <undeployexample name="booking" />
+ <undeployexample name="drools" />
+ <undeployexample name="dvdstore" />
+ <undeployexample name="contactlist" />
+ <undeployexample name="groovybooking" />
+ <undeployexample name="hibernate" />
+ <undeployexample name="icefaces" />
+ <undeployexample name="itext" />
+ <undeployexample name="jpa" />
+ <undeployexample name="mail" />
+ <undeployexample name="messages" />
+ <undeployexample name="nestedbooking" />
+ <undeployexample name="numberguess" />
+ <undeployexample name="quartz" />
+ <undeployexample name="registration" />
+ <undeployexample name="remoting/chatroom" />
+ <undeployexample name="seambay" />
+ <undeployexample name="seampay" />
+ <undeployexample name="seamspace" />
+ <undeployexample name="spring" />
+ <undeployexample name="todo" />
+ <undeployexample name="ui" />
+ </target>
+
+
+ <target name="start.selenium.server">
+ <java classpathref="selenium.server.classpath" classname="org.openqa.selenium.server.SeleniumServer" fork="true" spawn="true">
+ <arg line="-port ${selenium.server.port}" />
+ <arg line="${selenium.server.cmd.args}" />
+ </java>
+
+ <waitfor maxwait="30" maxwaitunit="second">
+ <and>
+ <socket server="${selenium.host}" port="${selenium.server.port}" />
+ <!-- this url will 403, so we say that it should start counting errors at 404 to skip -->
+ <http url="http://${selenium.host}:${selenium.server.port}/selenium-server/core/index.html" errorsBeginAt="404" />
+ </and>
+ </waitfor>
+ </target>
+
+ <target name="stop.selenium.server">
+ <get taskname="selenium-shutdown" src="http://${selenium.host}:${selenium.server.port}/selenium-server/driver/?cmd=shutDown" dest="${log.dir}/server.shutdown.dest.log" ignoreerrors="true" />
+ <echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
+ </target>
+
+
+ <!-- duplicated from ${seam.dir}/build.xml -->
+ <!-- TODO can we avoid duplication -->
+ <macrodef name="testexample">
+ <attribute name="name" />
+ <attribute name="path" default="examples/@{name}" />
+ <attribute name="message" default="Running functional tests on @{name} example" />
+ <sequential>
+ <echo>@{message}</echo>
+ <callExample path="@{path}" target="test" />
+ </sequential>
+ </macrodef>
+
+ <macrodef name="cleanexample">
+ <attribute name="name" />
+ <attribute name="path" default="examples/@{name}" />
+ <attribute name="message" default="Cleaning @{name} example" />
+ <sequential>
+ <echo>@{message}</echo>
+ <callExample path="@{path}" target="clean" />
+ </sequential>
+ </macrodef>
+
+ <macrodef name="undeployexample">
+ <attribute name="name" />
+ <attribute name="path" default="examples/@{name}" />
+ <sequential>
+ <callExample path="@{path}" target="undeploy.example.jboss" />
+ </sequential>
+ </macrodef>
+
+ <macrodef name="callExample">
+ <attribute name="path" />
+ <attribute name="target" />
+ <sequential>
+ <ant dir="@{path}" target="@{target}" inheritall="false">
+ <property name="container" value="${container}">
+ </property>
+ </ant>
+ </sequential>
+ </macrodef>
+</project>
+
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,27 @@
+<?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="blog.ftest.build" basedir="." default="build">
+ <property name="example.name" value="blog" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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="Blog example" verbose="2" parallel="false">
+ <test name="blog_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/blog/test/selenium/blog.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-blog" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.blog.test.selenium.NewEntryTest" />
+ <class
+ name="org.jboss.seam.example.blog.test.selenium.SearchTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,49 @@
+/*
+ * 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.blog.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertFalse;
+
+/**
+ *
+ * @author Jozef Hartinger
+ */
+public class NewEntryTest extends SeleniumBlogTest
+{
+
+ @Test(groups="entryTest")
+ public void simpleEntryTest() {
+
+ String id = "simpleBlogEntry";
+ String title = "Simple blog entry";
+ String excerpt = "This is an excerpt";
+ String body = "This is a simple blog entry posted for testing purposes.";
+
+ enterNewEntry(id, title, excerpt, body);
+ browser.open(CONTEXT_PATH + "/seam/entry.xhtml?blogEntryId=" + id);
+ assertFalse("Entry not found.", browser.isElementPresent(getProperty("ENTRY_404")));
+ assertEquals("Unexpected entry title found.", title, browser.getText(getProperty("ENTRY_TITLE")));
+ assertEquals("Unexpected entry body found.", body, browser.getText(getProperty("ENTRY_BODY")));
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,52 @@
+/*
+ * 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.blog.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * Test class for search functionality.
+ * @author Jozef Hartinger
+ */
+public class SearchTest extends SeleniumBlogTest
+{
+
+ @Test(dependsOnGroups="entryTest")
+ public void simpleEntrySearchTest() {
+
+ String id = "searchTestEntry";
+ String title = "Search Test Entry";
+ String excerpt = "";
+ String searchString = "9e107d9d372bb6826bd81d3542a419d6";
+ String body = "This is a simple blog entry used for testing search functionality. " + searchString;
+
+ enterNewEntry(id, title, excerpt, body);
+
+ browser.type(getProperty("SEARCH_FIELD"), searchString);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unexpected search result.", 1, browser.getXpathCount(getProperty("SEARCH_RESULT_COUNT")));
+
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,73 @@
+/*
+ * 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.blog.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+
+/**
+ * This class holds basic methods for interacting with blog example.
+ * @author Jozef Hartinger
+ */
+public class SeleniumBlogTest extends SeamSeleniumTest
+{
+
+ protected String password = "tokyo";
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + "/seam/index.xhtml");
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected void enterNewEntry(String id, String title, String excerpt, String body)
+ {
+ browser.click(getProperty("NEW_POST"));
+ browser.waitForPageToLoad(TIMEOUT);
+ if (browser.getLocation().contains(getProperty("LOGIN_URL")))
+ {
+ login();
+ }
+ fillNewEntryForm(id, title, excerpt, body);
+ }
+
+ protected void fillNewEntryForm(String id, String title, String excerpt, String body)
+ {
+ browser.type(getProperty("NEW_ENTRY_ID"), id);
+ browser.type(getProperty("NEW_ENTRY_TITLE"), title);
+ browser.type(getProperty("NEW_ENTRY_EXCERPT"), excerpt);
+ browser.type(getProperty("NEW_ENTRY_BODY"), body);
+ browser.click(getProperty("NEW_ENTRY_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected void login()
+ {
+ browser.type(getProperty("LOGIN_PASSWORD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,15 @@
+NEW_POST id=newPost
+LOGIN_PASSWORD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGIN_URL login
+NEW_ENTRY_ID id=newBlogEntry:id:idInput
+NEW_ENTRY_TITLE id=newBlogEntry:title:titleInput
+NEW_ENTRY_EXCERPT id=newBlogEntry:excerpt:excerptInput
+NEW_ENTRY_BODY id=newBlogEntry:body:bodyInput
+NEW_ENTRY_SUBMIT id=newBlogEntry:post
+ENTRY_404 id=404
+ENTRY_TITLE id=title
+ENTRY_BODY id=body
+SEARCH_FIELD id=searchForm:field
+SEARCH_SUBMIT id=searchForm:submit
+SEARCH_RESULT_COUNT //table[@id="searchResultTable"]/tbody/tr
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="booking.ftest.build" basedir="." default="build">
+ <property name="example.name" value="booking" />
+ <property name="jboss.example.ready.check.url" value="seam-booking/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,40 @@
+<!--
+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="Booking example" verbose="2" parallel="false">
+ <test name="booking_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/booking/test/selenium/booking.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-booking" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ConversationTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/selenium/booking.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/selenium/booking.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/selenium/booking.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,84 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE Re-enter new password
+PASSWORD_VALUE_REQUIRED_MESSAGE //span[text() = 'value is required']
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=searchCriteria:searchString
+SEARCH_SUBMIT id=searchCriteria:findHotels
+NO_HOTELS_FOUND id=NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDateInputDate
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:checkinDateDecorate:message
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDateInputDate
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:checkoutDateDecorate:message
+HOTEL_SMOKING_1 id=booking:smokingDecorate:smoking:0
+HOTEL_SMOKING_2 id=booking:smokingDecorate:smoking:1
+HOTEL_CREDIT_CARD id=booking:creditCardDecorate:creditCard
+HOTEL_CREDIT_CARD_NAME id=booking:creditCardNameDecorate:creditCardName
+HOTEL_PROCEED id=booking:proceed
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='messages']/li
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=registration:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=registration:usernameDecorate:message
+REGISTRATION_NAME id=registration:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=registration:nameDecorate:message
+REGISTRATION_PASSWORD id=registration:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=registration:passwordDecorate:message
+REGISTRATION_VERIFY id=registration:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=registration:verifyDecorate:message
+REGISTRATION_SUBMIT id=registration:register
+REGISTRATION_REENTER_MESSAGE Re-enter your password
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check in date must be a future date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id='ConversationListForm:ConversationListDataTable']/tbody/tr
+SPINNER id\=searchCriteria\:SpinnerGif
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/booking/src/org/jboss/seam/example/booking/test/selenium/booking.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,185 @@
+<?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="ftest.example.common.build" basedir="." default="build">
+
+ <!-- Location of Seam -->
+ <dirname property="seam.dir" file="${ant.file.ftest.example.common.build}/../../../../" />
+
+ <!-- default property setup -->
+ <property file="${seam.dir}/src/test/ftest/ftest.properties" />
+
+ <property name="ftest.dir" value="${seam.dir}/src/test/ftest" />
+ <property name="src.dir" value="src" />
+ <property name="common.src.dir" value="${ftest.dir}/src/main" />
+ <property name="build.dir" value="build" />
+ <property name="classes.dir" value="${build.dir}/classes" />
+ <property name="test.output.dir" value="${seam.dir}/test-output" />
+ <property name="ftest.lib.dir" value="${ftest.dir}/lib" />
+ <property name="log.dir" value="log" />
+ <property name="test.report.dir" value="test-report" />
+
+ <!-- common path setup -->
+
+ <path id="classpath.build">
+ <fileset dir="${ftest.lib.dir}" includes="**/*.jar" />
+ </path>
+
+ <path id="classpath.test">
+ <path refid="classpath.build" />
+ <path location="${classes.dir}" />
+ </path>
+
+ <!-- common target definitions -->
+
+ <target name="clean" description="Delete all generated files">
+ <delete dir="${build.dir}" />
+ <delete dir="${test.output.dir}" />
+ <delete dir="${report.dir}" />
+ <delete dir="${log.dir}" />
+ </target>
+
+ <target name="build" depends="build.common" description="Compiles the Test">
+ <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath.build" debug="true" />
+ <copy todir="${classes.dir}">
+ <fileset dir="src">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </target>
+
+ <!-- TODO we should compile this once to a common place not build for each example -->
+ <!-- TODO if needed we should allow examples to exclude/include src under
+ common dvd does not care about booking for example-->
+ <target name="build.common" description="Compiles the common selenium test code">
+ <mkdir dir="${classes.dir}" />
+ <javac srcdir="${common.src.dir}" destdir="${classes.dir}" classpathref="classpath.build" debug="true" />
+ <copy todir="${classes.dir}">
+ <fileset dir="src">
+ <exclude name="**/*.java" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="selenium.test" depends="build" description="Run Tests">
+ <taskdef resource="testngtasks" classpathref="classpath.test" />
+ <mkdir dir="${test.output.dir}" />
+
+ <!-- execute testng tests -->
+ <testng haltonfailure="false" outputdir="${test.output.dir}" classpathref="classpath.test">
+ <xmlfileset file="${container}.xml" />
+ <sysproperty key="selenium.server.port" value="${selenium.server.port}" />
+ <sysproperty key="selenium.host" value="${selenium.host}" />
+ <sysproperty key="selenium.browser" value="${selenium.browser}" />
+ <sysproperty key="selenium.browser.url" value="${selenium.browser.url}" />
+ <sysproperty key="selenium.speed" value="${selenium.speed}" />
+ <sysproperty key="selenium.timeout" value="${selenium.timeout}" />
+ </testng>
+ </target>
+
+ <target name="test" depends="build" description="Run Tests">
+ <!-- TODO all of these jboss commands must be optional with checks -->
+ <!-- TODO go get JBoss and extract -->
+
+ <!-- TODO start JBoss -->
+ <!-- clean example -->
+ <ant antfile="${seam.dir}/examples/${example.name}/build.xml" target="clean" inheritall="false" dir="${seam.dir}/examples/${example.name}" />
+
+ <!-- deploy the example-->
+ <antcall target="deploy.example.${container}" />
+
+ <!-- execute testng tests -->
+ <antcall target="selenium.test" />
+
+ <!-- undeploy the example -->
+ <antcall target="undeploy.example.${container}" />
+
+ <!-- TODO stop jboss -->
+
+ <!-- TODO remove jboss -->
+ </target>
+
+ <!-- TODO get this to next level too - how to combine into one report -->
+ <target name="testreport" depends="test" description="generate html report">
+ <mkdir dir="${test.report.dir}" />
+ <junitreport todir="${test.report.dir}">
+ <fileset dir="${test.output.dir}">
+ <include name="**/*.xml" />
+ <exclude name="**/testng-*.xml" />
+ </fileset>
+ <report format="noframes" todir="${test.report.dir}" />
+ </junitreport>
+ <echo>Report available at ${report.dir}/junit-noframes.html</echo>
+ </target>
+
+ <target name="deploy.example.jboss">
+ <deploy.example target="${jboss.deploy.target}" wait.url="${jboss.example.ready.check.url}" wait.time="${jboss.deploy.waittime}" />
+ </target>
+
+ <target name="undeploy.example.jboss">
+ <undeploy.example target="${jboss.undeploy.target}" />
+ </target>
+
+ <target name="deploy.example.tomcat6">
+ <deploy.example target="${tomcat6.deploy.target}" wait.url="${tomcat6.example.ready.check.url}" wait.time="${tomcat6.deploy.waittime}" />
+ </target>
+
+ <target name="undeploy.example.tomcat6">
+ <undeploy.example target="${tomcat6.undeploy.target}" />
+ </target>
+
+ <target name="deploy.example.jboss-embedded">
+ <deploy.example target="${jboss-embedded.deploy.target}" wait.url="${jboss-embedded.example.ready.check.url}" wait.time="${jboss-embedded.deploy.waittime}" />
+ </target>
+
+ <target name="undeploy.example.jboss-embedded">
+ <undeploy.example target="${jboss-embedded.undeploy.target}" />
+ </target>
+
+ <macrodef name="deploy.example">
+ <attribute name="target" />
+ <attribute name="wait.url" />
+ <attribute name="wait.time" />
+ <attribute name="absolute.wait.url" default="${selenium.browser.url}/@{wait.url}"/>
+ <sequential>
+ <echo>Deploying ${example.name} example to ${container}</echo>
+ <ant antfile="${seam.dir}/examples/${example.name}/build.xml" target="@{target}" inheritall="false" dir="${seam.dir}/examples/${example.name}" />
+ <!-- wait for the application to be active -->
+ <!-- TODO is there a better way? -->
+ <echo>Waiting @{wait.time} seconds for @{absolute.wait.url}</echo>
+ <waitfor maxwait="@{wait.time}" maxwaitunit="second">
+ <and>
+ <!-- wait for the application to not throw 404 -->
+ <http url="@{absolute.wait.url}" errorsBeginAt="404" />
+ </and>
+ </waitfor>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="undeploy.example">
+ <attribute name="target" />
+ <sequential>
+ <echo>Undeploying example ${example.name} from ${container}</echo>
+ <ant antfile="${seam.dir}/examples/${example.name}/build.xml" target="@{target}" inheritall="false" dir="${seam.dir}/examples/${example.name}" />
+ </sequential>
+ </macrodef>
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="contactlist.ftest.build" basedir="." default="build">
+ <property name="example.name" value="contactlist" />
+ <property name="jboss.example.ready.check.url" value="seam-contactlist/search.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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="Contactlist example" verbose="2" parallel="false">
+ <test name="contactlist_jboss">
+ <parameter name="PROPERTY_FILE" value="empty" />
+ <parameter name="CONTEXT_PATH" value="/seam-contactlist" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.contactlist.test.selenium.ContactCRUDTest" />
+ <class
+ name="org.jboss.seam.example.contactlist.test.selenium.CommentTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/CommentTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/CommentTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/CommentTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,62 @@
+/*
+ * 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.contactlist.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.*;
+
+import com.thoughtworks.selenium.Wait;
+
+public class CommentTest extends SeleniumContactlistTest {
+
+ @Test
+ public void testComment() {
+ String firstName = "Gavin";
+ String lastName = "King";
+ String message = "founder of the Hibernate open source object/relational mapping project";
+ // find contact
+ browser.open(CONTEXT_PATH + START_PAGE);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(SEARCH_SUBMIT);
+ }
+ }.wait("Search submit link not found.");
+ search(firstName, lastName);
+ assertTrue("Contact not found. Application is in unexpected state.",
+ searchResultPresent(firstName, lastName));
+ browser.click(SEARCH_RESULT_FIRST_ROW_LINK);
+ browser.waitForPageToLoad(TIMEOUT);
+ // submit comment
+ browser.type(COMMENT_TEXTAREA, message);
+ browser.click(COMMENT_SUBMIT);
+ browser.waitForPageToLoad(TIMEOUT);
+ // assert comment is stored
+ browser.click(SEARCH_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ search(firstName, lastName);
+ browser.click(SEARCH_RESULT_FIRST_ROW_LINK);
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Comment is not stored.", browser
+ .isTextPresent(message));
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/CommentTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactCRUDTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactCRUDTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactCRUDTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,154 @@
+/*
+ * 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.contactlist.test.selenium;
+
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.*;
+import com.thoughtworks.selenium.Wait;
+
+public class ContactCRUDTest extends SeleniumContactlistTest {
+
+ // used for creation test
+ private Person john = new Person("John", "Doe", "0123456789", "0123456789",
+ "Street", "City", "State", "01234", "US");
+ private Person jane = new Person("Jane", "Doe", "0123456789", "0123456789",
+ "Street", "City", "State", "01234", "US");
+ // used for edit test
+ private Person jozef = new Person("Jozef", "Hartinger", "0123456789",
+ "0123456789", "Cervinkova 99", "Brno", "Czech Republic", "01234",
+ "CZ");
+
+ @Test
+ public void testCreateContact() {
+ browser.open(CONTEXT_PATH + START_PAGE);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(CREATE_CONTACT_PAGE);
+ }
+ }.wait("Create contact link not found.");
+ browser.click(CREATE_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ fillCreateContactForm(john);
+ browser.click(CREATE_CONTACT_SUBMIT);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(SEARCH_CONTACT_PAGE);
+ }
+ }.wait("Search link not found.");
+ browser.click(SEARCH_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ search(john);
+ assertTrue("Creating new contact failed.", searchResultPresent(john));
+ }
+
+ @Test
+ public void testCreationCanceling() {
+ browser.open(CONTEXT_PATH + START_PAGE);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(CREATE_CONTACT_PAGE);
+ }
+ }.wait("Create contact link not found.");
+ browser.click(CREATE_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ fillCreateContactForm(jane);
+ browser.click(CREATE_CONTACT_CANCEL);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(SEARCH_CONTACT_PAGE);
+ }
+ }.wait("Search link not found.");
+ browser.click(SEARCH_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(SEARCH_FIRST_NAME_FIELD, jane.getFirstName());
+ browser.type(SEARCH_LAST_NAME_FIELD, jane.getLastName());
+ browser.click(SEARCH_SUBMIT);
+ browser.waitForPageToLoad(TIMEOUT);
+ assertFalse("New contact created despite cancel.", searchResultPresent(jane));
+ }
+
+ @Test
+ public void testEditContact() {
+ String firstName = "Shane";
+ String lastName = "Bryzak";
+ // find contact
+ browser.open(CONTEXT_PATH + START_PAGE);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(SEARCH_SUBMIT);
+ }
+ }.wait("Search submit link not found.");
+ search(firstName, lastName);
+ assertTrue("Contact not found. Application is in unexpected state.",
+ searchResultPresent(firstName, lastName));
+ browser.click(SEARCH_RESULT_FIRST_ROW_LINK);
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(EDIT_CONTACT_LINK);
+ browser.waitForPageToLoad(TIMEOUT);
+ // update form fields
+ fillCreateContactForm(jozef);
+ browser.click(UPDATE_CONTACT_SUBMIT);
+ browser.waitForPageToLoad(TIMEOUT);
+ // make sure new values are present
+ browser.click(SEARCH_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ search(jozef);
+ assertTrue("Contact update failed. New values missing", searchResultPresent(jozef));
+ // make sure old values are not present
+ browser.click(SEARCH_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ search(firstName, lastName);
+ assertFalse("Contact update failed. Old values still present", searchResultPresent(firstName, lastName));
+ }
+
+ @Test
+ public void testRemoveContact() {
+ String firstName = "Norman";
+ String lastName = "Richards";
+ // find contact
+ browser.open(CONTEXT_PATH + START_PAGE);
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(SEARCH_SUBMIT);
+ }
+ }.wait("Search submit link not found.");
+ search(firstName, lastName);
+ assertTrue("Contact not found. Application is in unexpected state.",
+ searchResultPresent(firstName, lastName));
+ browser.click(SEARCH_RESULT_FIRST_ROW_LINK);
+ browser.waitForPageToLoad(TIMEOUT);
+ // remove contact
+ browser.click(REMOVE_CONTACT_LINK);
+ browser.waitForPageToLoad(TIMEOUT);
+ // assert contact is removed
+ browser.click(SEARCH_CONTACT_PAGE);
+ browser.waitForPageToLoad(TIMEOUT);
+ search(firstName, lastName);
+ assertFalse("Contact present despite it should be removed.", searchResultPresent(firstName, lastName));
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactCRUDTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactlistConstants.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactlistConstants.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactlistConstants.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,57 @@
+/*
+ * 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.contactlist.test.selenium;
+
+public interface ContactlistConstants {
+
+ public static String START_PAGE = "/";
+ public static String SEARCH_CONTACT_PAGE = "id=search";
+ public static String SEARCH_FIRST_NAME_FIELD = "id=searchForm:firstName";
+ public static String SEARCH_LAST_NAME_FIELD = "id=searchForm:lastName";
+ public static String SEARCH_SUBMIT = "id=searchForm:submit";
+ public static String CREATE_CONTACT_PAGE = "id=create";
+ public static String CREATE_CONTACT_SUBMIT = "id=editForm:createContact";
+ public static String CREATE_CONTACT_CANCEL = "id=editForm:cancel";
+ public static String FIRST_NAME_FIELD = "id=editForm:firstNameDecorate:firstName";
+ public static String LAST_NAME_FIELD = "id=editForm:lastNameDecorate:lastName";
+ public static String CELL_PHONE_FIELD = "id=editForm:cellPhoneDecorate:cellPhone";
+ public static String HOME_PHONE_FIELD = "id=editForm:homePhoneDecorate:homePhone";
+ public static String ADDRESS_FIELD = "id=editForm:addressDecorate:address";
+ public static String CITY_FIELD = "id=editForm:cityDecorate:city";
+ public static String STATE_FIELD = "id=editForm:stateDecorate:state";
+ public static String ZIP_FIELD = "id=editForm:zipDecorate:zip";
+ public static String COUNTRY_FIELD = "id=editForm:countryDecorate:country";
+ public static String EDIT_CONTACT_LINK = "editContact";
+ public static String UPDATE_CONTACT_SUBMIT = "editForm:updateContact";
+ public static String EDIT_FORM_REMOVE_CONTACT_LINK = "id=editForm:deleteContact";
+ public static String REMOVE_CONTACT_LINK = "id=deleteContact";
+ public static String SEARCH_RESULT_FIRST_ROW_LINK = "id=searchResult:0:link";
+ public static String SEARCH_RESULT_FIRST_ROW_CELL_PHONE = "id=searchResult:0:cellPhone";
+ public static String SEARCH_RESULT_FIRST_ROW_HOME_PHONE = "id=searchResult:0:homePhone";
+ public static String SEARCH_RESULT_FIRST_ROW_ADDRESS = "id=searchResult:0:address";
+ public static String SEARCH_RESULT_FIRST_ROW_CITY = "id=searchResult:0:city";
+ public static String SEARCH_RESULT_FIRST_ROW_STATE = "id=searchResult:0:state";
+ public static String SEARCH_RESULT_FIRST_ROW_ZIP = "id=searchResult:0:zip";
+ public static String SEARCH_RESULT_FIRST_ROW_COUNTRY = "id=searchResult:0:country";
+ public static String COMMENT_TEXTAREA = "commentForm:text";
+ public static String COMMENT_SUBMIT = "commentForm:submit";
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/ContactlistConstants.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/Person.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/Person.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/Person.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,121 @@
+/*
+ * 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.contactlist.test.selenium;
+
+public class Person {
+ private String firstName;
+ private String lastName;
+ private String cellPhone;
+ private String homePhone;
+ private String address;
+ private String city;
+ private String state;
+ private String zip;
+ private String country;
+
+ public Person(String firstName, String lastName, String cellPhone, String homePhone,
+ String address, String city, String state, String zip, String country) {
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.cellPhone = cellPhone;
+ this.homePhone = homePhone;
+ this.address = address;
+ this.city = city;
+ this.state = state;
+ this.zip = zip;
+ this.country = country;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+
+ public String getCellPhone() {
+ return cellPhone;
+ }
+
+ public void setCellPhone(String cellPhone) {
+ this.cellPhone = cellPhone;
+ }
+
+ public String getHomePhone() {
+ return homePhone;
+ }
+
+ public void setHomePhone(String homePhone) {
+ this.homePhone = homePhone;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/Person.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/SeleniumContactlistTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/SeleniumContactlistTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/contactlist/src/org/jboss/seam/example/contactlist/test/selenium/SeleniumContactlistTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,66 @@
+/*
+ * 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.contactlist.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+
+public class SeleniumContactlistTest extends SeamSeleniumTest implements ContactlistConstants {
+
+ public boolean searchResultPresent(String firstName, String lastName) {
+ return browser.isElementPresent(SEARCH_RESULT_FIRST_ROW_LINK) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_LINK).equals(firstName + " " + lastName);
+ }
+
+ public boolean searchResultPresent(Person person) {
+ return searchResultPresent(person.getFirstName(), person.getLastName()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_CELL_PHONE).equals(person.getCellPhone()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_HOME_PHONE).equals(person.getHomePhone()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_ADDRESS).equals(person.getAddress()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_CITY).equals(person.getCity()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_STATE).equals(person.getState()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_ZIP).equals(person.getZip()) &&
+ browser.getText(SEARCH_RESULT_FIRST_ROW_COUNTRY).equals(person.getCountry());
+ }
+
+ public void fillCreateContactForm(Person person) {
+ browser.type(FIRST_NAME_FIELD, person.getFirstName());
+ browser.type(LAST_NAME_FIELD, person.getLastName());
+ browser.type(CELL_PHONE_FIELD, person.getCellPhone());
+ browser.type(HOME_PHONE_FIELD, person.getHomePhone());
+ browser.type(ADDRESS_FIELD, person.getAddress());
+ browser.type(CITY_FIELD, person.getCity());
+ browser.type(STATE_FIELD, person.getState());
+ browser.type(ZIP_FIELD, person.getZip());
+ browser.type(COUNTRY_FIELD, person.getCountry());
+ }
+
+ public void search(String firstName, String lastName) {
+ browser.type(SEARCH_FIRST_NAME_FIELD, firstName);
+ browser.type(SEARCH_LAST_NAME_FIELD, lastName);
+ browser.click(SEARCH_SUBMIT);
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ public void search(Person person) {
+ search(person.getFirstName(), person.getLastName());
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="drools.ftest.build" basedir="." default="build">
+ <property name="example.name" value="drools" />
+ <property name="jboss.example.ready.check.url" value="seam-drools/numberGuess.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,32 @@
+<!--
+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="Drools example" verbose="2" parallel="false">
+ <test name="drools_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/drools/test/selenium/drools.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-drools" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.numberguess.selenium.CommonNumberGuessTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/drools/src/org/jboss/seam/example/drools/test/selenium/drools.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,29 @@
+ #
+ # 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.
+ #
+MAIN_PAGE /numberGuess.seam
+GUESS_LOCATION numberGuess.seam
+WIN_LOCATION win.seam
+LOSE_LOCATION lose.seam
+GUESS_MAX_VALUE NumberGuessMain:Biggest
+GUESS_MIN_VALUE NumberGuessMain:Smallest
+GUESS_FIELD NumberGuessMain:inputGuess
+GUESS_SUBMIT NumberGuessMain\:GuessButton
\ No newline at end of file
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,29 @@
+<?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="dvdstore.ftest.build" basedir="." default="build">
+ <property name="example.name" value="dvdstore" />
+ <property name="jboss.example.ready.check.url" value="seam-dvdstore/search.seam" />
+
+ <import file="../build.xml" />
+
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,38 @@
+<!--
+ 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="DVD example" verbose="2" parallel="false">
+ <test name="dvdstore_jboss">
+ <parameter name="PROPERTY_FILE"
+ value="/org/jboss/seam/example/dvd/test/selenium/dvd.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-dvd" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.dvd.test.selenium.LoginTest" />
+<!-- <class name="org.jboss.seam.example.dvd.test.selenium.RegistrationTest" />-->
+ <class
+ name="org.jboss.seam.example.dvd.test.selenium.SearchTest" />
+ <class
+ name="org.jboss.seam.example.dvd.test.selenium.ShoppingCartTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/LoginTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/LoginTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/LoginTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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.dvd.test.selenium;
+
+import static org.testng.AssertJUnit.*;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ * This class tests user authentication. Majority of other tests depends on
+ * these methods.
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class LoginTest extends SeleniumDvdTest {
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ browser = startBrowser();
+ }
+
+ @Test(groups = { "login.basic" })
+ public void basicLoginTest() {
+ String username = "user1";
+ String password = "password";
+ assertTrue("Login failed.", login(username, password));
+ }
+
+ @Test(groups = { "login.basic" })
+ public void invalidLoginTest() {
+ String username = "nonExistingUser";
+ String password = "invalidPassword";
+ assertFalse("Logged in despite invalid credentials.", login(username,
+ password));
+ }
+
+ @Test(groups = { "login.admin" })
+ public void adminLoginTest() {
+ String username = "manager";
+ String password = "password";
+ assertTrue("Login failed.", login(username, password));
+ assertTrue("Navigation failed", browser.getLocation().contains(
+ getProperty("ADMIN_URL")));
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/LoginTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/Person.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/Person.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/Person.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,213 @@
+/*
+ * 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.dvd.test.selenium;
+
+/**
+ * This class is used by Registration tests
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class Person {
+
+ private String username;
+ private String password;
+ private String verify;
+ private String firstName;
+ private String lastName;
+ private String address;
+ private String address2;
+ private String city;
+ private String state;
+ private String zip;
+ private String email;
+ private String phone;
+ private String cardType;
+ private String cardNumber;
+
+ public String getCardType() {
+ return cardType;
+ }
+
+ public void setCardType(String cardType) {
+ this.cardType = cardType;
+ }
+
+ public String getCardNumber() {
+ return cardNumber;
+ }
+
+ public void setCardNumber(String cardNumber) {
+ this.cardNumber = cardNumber;
+ }
+
+ public Person() {
+ }
+
+ public Person(String address, String address2, String cardNumber,
+ String cardType, String city, String email, String firstName,
+ String lastName, String password, String phone, String state,
+ String username, String verify, String zip) {
+ this.address = address;
+ this.address2 = address2;
+ this.cardNumber = cardNumber;
+ this.cardType = cardType;
+ this.city = city;
+ this.email = email;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.password = password;
+ this.phone = phone;
+ this.state = state;
+ this.username = username;
+ this.verify = verify;
+ this.zip = zip;
+ }
+
+ public Person(String address, String cardNumber, String cardType,
+ String city, String email, String firstName, String lastName,
+ String password, String phone, String state, String username,
+ String verify, String zip) {
+ this(address, address, cardNumber, cardType, city, email, firstName,
+ lastName, password, phone, state, username, verify, zip);
+ }
+
+ public Person(String address, String address2, String city, String email,
+ String firstName, String lastName, String password, String phone,
+ String state, String username, String verify, String zip) {
+ this(address, address2, "MasterCard", "000-0000-0000", city, email,
+ firstName, lastName, password, phone, state, username, verify,
+ zip);
+ }
+
+ public Person(String address, String city, String email, String firstName,
+ String lastName, String password, String phone, String state,
+ String username, String verify, String zip) {
+ this(address, address, "MasterCard", "000-0000-0000", city, email,
+ firstName, lastName, password, phone, state, username, verify,
+ zip);
+ }
+
+ public Person(String username, String password, String verify) {
+ super();
+ this.password = password;
+ this.username = username;
+ this.verify = verify;
+ }
+
+ public String getVerify() {
+ return verify;
+ }
+
+ public void setVerify(String verify) {
+ this.verify = verify;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public String getAddress2() {
+ return address2;
+ }
+
+ public void setAddress2(String address2) {
+ this.address2 = address2;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getZip() {
+ return zip;
+ }
+
+ public void setZip(String zip) {
+ this.zip = zip;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/Person.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/RegistrationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/RegistrationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/RegistrationTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,173 @@
+/*
+ * 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.dvd.test.selenium;
+
+import static org.testng.AssertJUnit.*;
+
+import java.text.MessageFormat;
+import java.util.Date;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import com.thoughtworks.selenium.Wait;
+
+/**
+ * This class tests the registration functionality of dvdstore example
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class RegistrationTest extends SeleniumDvdTest {
+
+ // suffix is needed to allow test to be run repeatedly
+ private String suffix = Long.toString(new Date().getTime() % 10000000);
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ browser = startBrowser();
+ browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(getProperty("REGISTRATION"));
+ }
+ }.wait("Unable to load home page.");
+ browser.click(getProperty("REGISTRATION"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Unable to load registration page.", browser.getLocation()
+ .contains(getProperty("REGISTRATION_FIRST_PAGE_URL")));
+ }
+
+ /**
+ * Tries to register user
+ */
+ @Test
+ public void basicRegistrationTest() {
+ Person person = new Person("Street 123", "012-3456-7890",
+ "Visa", "City", "john at example.com", "John", "Doe",
+ "password", "0123456789", "US", "john" + suffix, "password",
+ "01234");
+
+ fillFirstPage(person);
+ assertTrue("Unable to load account page.", browser.getLocation()
+ .contains(getProperty("REGISTRATION_SECOND_PAGE_URL")));
+ fillSecondPage(person);
+ assertTrue("Unable to load card page.", browser.getLocation().contains(
+ getProperty("REGISTRATION_THIRD_PAGE_URL")));
+ fillThirdPage(person);
+ assertTrue("Unable to load confirmation page.", browser.getLocation()
+ .contains(getProperty("REGISTRATION_CONFIRMATION_PAGE_URL")));
+ assertTrue("Registration failed.", browser.isTextPresent(MessageFormat
+ .format(getProperty("REGISTRATION_CONFIRMATION_MESSAGE"),
+ person.getUsername())));
+ assertTrue("User should be logged in after succesful registration.",
+ isLoggedIn(browser));
+ }
+
+ /**
+ * Tests whether validation of input fields works fine.
+ */
+ @Test
+ public void firstPageInvalidValuesTest() {
+ Person person = new Person("t", "t", "t");
+ fillFirstPage(person);
+ assertTrue("Navigation failed.", browser.getLocation().contains(
+ getProperty("REGISTRATION_FIRST_PAGE_URL")));
+ assertEquals("Error messages expected.", 2, browser
+ .getXpathCount(getProperty("REGISTRATION_LENGTH_MESSAGE")));
+ }
+
+ /**
+ * Tests password verification.
+ */
+ @Test
+ public void verifyPasswordTest() {
+ Person person = new Person("tester", "password", "password1");
+ fillFirstPage(person);
+ assertTrue("Navigation failed.", browser.getLocation().contains(
+ getProperty("REGISTRATION_FIRST_PAGE_URL")));
+ assertTrue("Password verify message expected.", browser
+ .isElementPresent(getProperty("REGISTRATION_VERIFY_MESSAGE")));
+ }
+
+ /**
+ * Tries to register user that already exists. Test assumes that user1 is
+ * already registered.
+ */
+ @Test
+ public void duplicateUserTest() {
+ Person person = new Person("user1", "password", "password");
+ fillFirstPage(person);
+ assertTrue("Navigation failed.", browser.getLocation().contains(
+ getProperty("REGISTRATION_FIRST_PAGE_URL")));
+ assertTrue(
+ "Duplicate user error message expected.",
+ browser
+ .isElementPresent(getProperty("REGISTRATION_DUPLICATE_USER_MESSAGE")));
+ }
+
+ private void fillFirstPage(Person person) {
+ browser
+ .type(getProperty("REGISTRATION_USERNAME"), person
+ .getUsername());
+ browser
+ .type(getProperty("REGISTRATION_PASSWORD"), person
+ .getPassword());
+ browser.type(getProperty("REGISTRATION_VERIFY"), person.getVerify());
+ browser.click(getProperty("REGISTRATION_FIRST_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ private void fillSecondPage(Person person) {
+ browser.type(getProperty("REGISTRATION_FIRST_NAME"), person
+ .getUsername());
+ browser.type(getProperty("REGISTRATION_LAST_NAME"), person
+ .getLastName());
+ browser.type(getProperty("REGISTRATION_ADDRESS"), person.getAddress());
+ browser
+ .type(getProperty("REGISTRATION_ADDRESS2"), person
+ .getAddress2());
+ browser.type(getProperty("REGISTRATION_CITY"), person.getCity());
+ browser.type(getProperty("REGISTRATION_STATE"), person.getState());
+ browser.type(getProperty("REGISTRATION_ZIP"), person.getZip());
+ browser.type(getProperty("REGISTRATION_EMAIL"), person.getEmail());
+ browser.type(getProperty("REGISTRATION_PHONE"), person.getPhone());
+ browser.click(getProperty("REGISTRATION_SECOND_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ private void fillThirdPage(Person person) {
+ browser.select(getProperty("REGISTRATION_CARD_TYPE_SELECT"), person
+ .getCardType());
+ browser.type(getProperty("REGISTRATION_CARD_NUMBER"), person
+ .getCardNumber());
+ fillThirdPage();
+ }
+
+ private void fillThirdPage() {
+ browser.click(getProperty("REGISTRATION_THIRD_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/RegistrationTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,102 @@
+/*
+ * 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.dvd.test.selenium;
+
+import static org.testng.AssertJUnit.*;
+
+import org.testng.annotations.Test;
+
+/**
+ * This class tests search functionality of the example
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class SearchTest extends SeleniumDvdTest {
+
+ /**
+ * This test does simple search for dvd.
+ */
+ @Test(groups = { "search" }, dependsOnGroups = { "login.basic" })
+ public void testSearch() {
+ String searchString = "top gun";
+ browser.click(getProperty("SHOP"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Navigation failed.", browser.getLocation().contains(
+ getProperty("SHOP_URL")));
+ browser.type(getProperty("SEARCH_FIELD"), searchString);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unexpected number of results. One result expected.", 1,
+ browser.getXpathCount(getProperty("SEARCH_RESULT_ITEM")));
+ browser.click(getProperty("SEARCH_RESULT_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Navigation failure.", browser.getLocation().contains(
+ getProperty("DVD_URL")));
+ }
+
+ /**
+ * This test does simple search in two windows verifying they do not affect
+ * each other
+ */
+ @Test(dependsOnMethods = { "testSearch" }, dependsOnGroups = { "login.basic" })
+ public void testMultipleWindowSearch() {
+ String searchString1 = "Forrest Gump";
+ String searchString2 = "The Shawshank Redemption";
+
+ browser.openWindow(CONTEXT_PATH + getProperty("HOME_PAGE"), "1");
+ browser.selectWindow("1");
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("User should be logged in by now.", isLoggedIn(browser));
+ // search for dvd in first window
+ browser.openWindow(CONTEXT_PATH + getProperty("HOME_PAGE"), "2");
+ browser.selectWindow("2");
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("User should be logged in by now.", isLoggedIn(browser));
+ browser.click(getProperty("SHOP"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("SEARCH_FIELD"), searchString1);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unexpected search result in first window.",
+ searchString1, browser
+ .getText(getProperty("SEARCH_RESULT_FIRST_ROW_LINK")));
+ // search for dvd in second window
+ browser.selectWindow("1");
+ browser.click(getProperty("SHOP"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("SEARCH_FIELD"), searchString2);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unexpected search result in second window.",
+ searchString2, browser
+ .getText(getProperty("SEARCH_RESULT_FIRST_ROW_LINK")));
+ browser.selectWindow("2");
+ browser.refresh();
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unexpected search result in first window after refresh.",
+ searchString1, browser
+ .getText(getProperty("SEARCH_RESULT_FIRST_ROW_LINK")));
+
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SearchTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SeleniumDvdTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SeleniumDvdTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SeleniumDvdTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,88 @@
+/*
+ * 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.dvd.test.selenium;
+
+import static org.testng.AssertJUnit.fail;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+
+import com.thoughtworks.selenium.Selenium;
+import com.thoughtworks.selenium.Wait;
+
+/**
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public abstract class SeleniumDvdTest extends SeamSeleniumTest {
+
+ protected final String DEFAULT_USERNAME = "user1";
+ protected final String DEFAULT_PASSWORD = "password";
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ super.setUp();
+ login(DEFAULT_USERNAME, DEFAULT_PASSWORD);
+ }
+
+ public boolean login(String username, String password) {
+ browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
+ new Wait() {
+ @Override
+ public boolean until() {
+ return browser.isElementPresent(getProperty("LOGIN_SUBMIT"));
+ }
+ }.wait("Login page not loaded.");
+ if (isLoggedIn(browser)) {
+ fail("User already logged in.");
+ }
+ browser.type(getProperty("LOGIN_USERNAME"), username);
+ browser.type(getProperty("LOGIN_PASSWORD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ return isLoggedIn(browser);
+ }
+
+ @Override
+ @AfterMethod
+ public void tearDown() {
+ logout(browser);
+ super.tearDown();
+ }
+
+ public void logout(Selenium browser) {
+ if (isLoggedIn(browser)) {
+ browser.click(getProperty("LOGOUT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+ }
+
+ public boolean isLoggedIn(Selenium browser) {
+ return browser.isElementPresent(getProperty("LOGOUT"));
+ }
+
+
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/SeleniumDvdTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/ShoppingCartTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/ShoppingCartTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/ShoppingCartTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,147 @@
+/*
+ * 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.dvd.test.selenium;
+
+import static org.testng.AssertJUnit.*;
+
+import java.math.BigDecimal;
+import java.text.MessageFormat;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.Currency;
+import java.util.Locale;
+
+import org.testng.annotations.Test;
+
+/**
+ * This class tests shopping cart
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class ShoppingCartTest extends SeleniumDvdTest {
+
+ @Test(dependsOnGroups = { "search" })
+ public void simpleCartTest() {
+ String[] dvds = new String[] { "Top Gun", "Pulp Fiction",
+ "Forrest Gump" };
+ for (String dvd : dvds) {
+ addDVDToCart(dvd);
+ }
+ browser.click(getProperty("CART"));
+ browser.waitForPageToLoad(TIMEOUT);
+ for (String dvd : dvds) {
+ assertTrue("Expected item not present in cart.", browser
+ .isElementPresent(MessageFormat.format(
+ getProperty("CART_TABLE_ROW_BY_NAME"), dvd)));
+ }
+ }
+
+ @Test(dependsOnMethods = { "simpleCartTest" })
+ public void testCartCostCalculation() throws ParseException {
+ String[] dvds = new String[] { "Top Gun", "Pulp Fiction", "Top Gun" };
+ NumberFormat nf = NumberFormat.getCurrencyInstance();
+ nf.setCurrency(Currency.getInstance(Locale.US));
+ BigDecimal expectedSum = BigDecimal.ZERO;
+ for (String dvd : dvds) {
+ addDVDToCart(dvd);
+ }
+ browser.click(getProperty("CART"));
+ browser.waitForPageToLoad(TIMEOUT);
+ int items = browser.getXpathCount(getProperty("CART_TABLE_ITEM"))
+ .intValue();
+ assertNotSame("Cart should not be empty.", 0, items);
+ for (int i = 0; i < items; i++) {
+ BigDecimal quantity = BigDecimal.valueOf(Double.parseDouble(browser
+ .getValue(MessageFormat.format(
+ getProperty("CART_TABLE_QUANTITY_BY_ID"), i))));
+ BigDecimal price = BigDecimal.valueOf(nf.parse(
+ browser.getText(MessageFormat.format(
+ getProperty("CART_TABLE_PRICE_BY_ID"), i)))
+ .doubleValue());
+ BigDecimal priceForCurrentRow = price.multiply(quantity);
+ expectedSum = expectedSum.add(priceForCurrentRow);
+ }
+ BigDecimal actualSum = BigDecimal.valueOf((nf.parse(browser
+ .getText(getProperty("CART_SUBTOTAL"))).doubleValue()));
+ assertEquals("Price sum in cart is incorrect.", 0, expectedSum
+ .compareTo(actualSum));
+ }
+
+ @Test(dependsOnMethods = { "simpleCartTest" })
+ public void testRemovingCartItem() {
+ String dvd = "Top Gun";
+ addDVDToCart(dvd);
+ browser.click(getProperty("CART"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("DVD is not in the cart.", browser
+ .isElementPresent(MessageFormat.format(
+ getProperty("CART_TABLE_ROW_BY_NAME"), dvd)));
+ browser.check(MessageFormat.format(
+ getProperty("CART_TABLE_CHECKBOX_BY_NAME"), dvd));
+ browser.click(getProperty("CART_TABLE_UPDATE_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertFalse("Cart item was not removed.", browser
+ .isElementPresent(MessageFormat.format(
+ getProperty("CART_TABLE_ROW_BY_NAME"), dvd)));
+ }
+
+ /**
+ * This method tries purchasing more copies of The Bourne Identity than are
+ * available in stock
+ */
+ @Test(dependsOnMethods = { "simpleCartTest" })
+ public void testExceedingAvailableItemLimit() {
+ String dvd = "The Bourne Identity";
+ String amount = "300";
+ addDVDToCart(dvd);
+ browser.click(getProperty("CART"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("CART_TABLE_FIRST_ROW_QUANTITY"), amount);
+ browser.click(getProperty("CART_TABLE_UPDATE_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(getProperty("CART_PURCHASE_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(getProperty("CART_CONFIRM_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Message not displayed.", browser
+ .isElementPresent(MessageFormat.format(
+ getProperty("CART_NOT_ENOUGH_COPIES_LEFT"), dvd)));
+ assertTrue(
+ "Order should not be completed.",
+ browser
+ .isElementPresent(getProperty("CART_UNABLE_TO_COMPLETE_ORDER_MESSAGE")));
+ }
+
+ private void addDVDToCart(String dvdName) {
+ assertTrue("User should be logged in.", isLoggedIn(browser));
+ browser.click(getProperty("SHOP"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("SEARCH_FIELD"), dvdName);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.check(getProperty("SEARCH_RESULT_FIRST_ROW_CHECKBOX"));
+ browser.click(getProperty("SEARCH_RESULT_UPDATE_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/ShoppingCartTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/dvd.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/dvd.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/dvd.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,78 @@
+ #
+ # 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.
+ #
+HOME_PAGE /
+HOME_PAGE_TITLE JBoss DVD Store
+LOGOUT id=LogoutForm:Logout
+REGISTRATION id=LoginForm:CreateAccount
+REGISTRATION_FIRST_PAGE_URL newuser/account
+REGISTRATION_SECOND_PAGE_URL newuser/contact
+REGISTRATION_THIRD_PAGE_URL newuser/card
+REGISTRATION_CONFIRMATION_PAGE_URL newuser/complete
+REGISTRATION_USERNAME id=NewAccountForm:userName
+REGISTRATION_USERNAME_MESSAGE id=NewAccountForm:MessageForUserName
+REGISTRATION_PASSWORD id=NewAccountForm:password
+REGISTRATION_PASSWORD_MESSAGE id=NewAccountForm:MessageForPassword
+REGISTRATION_VERIFY id=NewAccountForm:passwordVerify
+REGISTRATION_FIRST_SUBMIT id=NewAccountForm:ContinueButton
+REGISTRATION_SECOND_SUBMIT id=NewAccountForm:ContinueButton
+REGISTRATION_THIRD_SUBMIT id=NewAccountForm:SubmitNewCustomerButton
+REGISTRATION_FIRST_NAME id=NewAccountForm:firstName
+REGISTRATION_LAST_NAME id=NewAccountForm:lastName
+REGISTRATION_ADDRESS id=NewAccountForm:address1
+REGISTRATION_ADDRESS2 = id=NewAccountForm:Address2
+REGISTRATION_CITY id=NewAccountForm:city
+REGISTRATION_STATE id=NewAccountForm:state
+REGISTRATION_ZIP id=NewAccountForm:zip
+REGISTRATION_EMAIL id=NewAccountForm:email
+REGISTRATION_PHONE id=NewAccountForm:phone
+REGISTRATION_CONFIRMATION_MESSAGE Registered new customer {0}
+REGISTRATION_CARD_TYPE_SELECT id=NewAccountForm:CreditCardMenu
+REGISTRATION_CARD_NUMBER id=NewAccountForm:creditCard
+REGISTRATION_LENGTH_MESSAGE //*[contains(normalize-space(text()), 'length must be between')]
+REGISTRATION_VERIFY_MESSAGE xpath=//*[normalize-space(text()) = 'passwordVerify']
+REGISTRATION_DUPLICATE_USER_MESSAGE xpath=//*[normalize-space(text()) = 'userName']
+LOGIN_USERNAME id=LoginForm:Username
+LOGIN_PASSWORD id=LoginForm:Password
+LOGIN_SUBMIT id=LoginForm:Login
+SHOP id=Shop
+SHOP_URL browse
+CART id=Cart
+SEARCH_FIELD id=SearchForm:Query
+SEARCH_SUBMIT id=SearchForm:Search
+SEARCH_RESULT_ITEM //table[@id='SearchResultsForm:SearchResultsTable']/tbody/tr
+SEARCH_RESULT_FIRST_ROW_LINK id=SearchResultsForm:SearchResultsTable:0:TitleLink
+SEARCH_RESULT_FIRST_ROW_CHECKBOX id=SearchResultsForm:SearchResultsTable:0:AddToCartCheckbox
+SEARCH_RESULT_UPDATE_BUTTON id=SearchResultsForm:SearchUpdateButton
+CART_TABLE_ROW_BY_NAME xpath\=//table[@id\="cartdetails\:CartDetailsForm\:CartItemsTable"]/tbody/tr[normalize-space(td[2]//text()) \= "{0}"]
+CART_TABLE_CHECKBOX_BY_NAME xpath\=//table[@id\="cartdetails\:CartDetailsForm\:CartItemsTable"]/tbody/tr[normalize-space(td[2]//text()) \= "{0}"]/td[1]/input
+CART_TABLE_UPDATE_BUTTON id=cartdetails:CartDetailsForm:UpdateCartButton
+CART_TABLE_ITEM //table[@id='cartdetails:CartDetailsForm:CartItemsTable']/tbody/tr
+CART_TABLE_QUANTITY_BY_ID id=cartdetails:CartDetailsForm:CartItemsTable:{0}:QuantityValueText
+CART_TABLE_PRICE_BY_ID id=cartdetails:CartDetailsForm:CartItemsTable:{0}:PriceValueText
+CART_TABLE_FIRST_ROW_QUANTITY id=cartdetails:CartDetailsForm:CartItemsTable:0:QuantityValueText
+CART_PURCHASE_BUTTON id=cartdetails:purchaseaction:PurchaseActionForm:PurchaseButton
+CART_SUBTOTAL id=cartdetails:CartSubtotalValue
+CART_CONFIRM_BUTTON id=orderdetail:ConfirmOrCancelForm:Confirm
+CART_NOT_ENOUGH_COPIES_LEFT xpath\=//*[normalize-space(text()) \= "There were not enough copies of {0} in stock to fulfill your order."]
+CART_UNABLE_TO_COMPLETE_ORDER_MESSAGE xpath=//*[normalize-space(text()) = 'Your order could not be completed.']
+DVD_URL dvd
+ADMIN_URL admin/admin
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/dvdstore/src/org/jboss/seam/example/dvd/test/selenium/dvd.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,36 @@
+<?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="groovybooking.ftest.build" basedir="." default="build">
+ <property name="example.name" value="groovybooking" />
+ <property name="jboss.deploy.target" value="jbosswar.deploy" />
+ <property name="jbosss.example.ready.check.url" value="jboss-seam-groovy/home.seam" />
+
+ <import file="../build.xml" />
+
+ <target name="undeploy.example.jboss">
+ <echo>Undeploying JBoss Example - ${example.name}</echo>
+ <ant antfile="${seam.dir}/examples/${example.name}/build.xml" target="jbosswar.undeploy" inheritall="false" dir="${seam.dir}/examples/${example.name}" />
+ <ant antfile="${seam.dir}/examples/${example.name}/build.xml" target="${jboss.undeploy.target}" inheritall="false" dir="${seam.dir}/examples/${example.name}" />
+ </target>
+
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,41 @@
+<!--
+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="Groovybooking example" verbose="2" parallel="false">
+ <test name="groovybooking_jboss">
+ <parameter name="PROPERTY_FILE"
+ value="/org/jboss/seam/example/groovybooking/test/selenium/groovybooking.properties" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-groovy" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ConversationTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/selenium/groovybooking.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/selenium/groovybooking.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/selenium/groovybooking.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,84 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE verify
+PASSWORD_VALUE_REQUIRED_MESSAGE //*[@id\='setpassword\:Message']
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=main:searchString
+SEARCH_SUBMIT id=main:findHotels
+NO_HOTELS_FOUND id=NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDateInputDate
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:Message
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDateInputDate
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:Message
+HOTEL_SMOKING_1 id=booking:smokingDecorate:smoking:0
+HOTEL_SMOKING_2 id=booking:smokingDecorate:smoking:1
+HOTEL_CREDIT_CARD id=booking:creditCardDecorate:creditCard
+HOTEL_CREDIT_CARD_NAME id=booking:creditCardNameDecorate:creditCardName
+HOTEL_PROCEED id=booking:proceed
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='main:messages']/li
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=register:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=register:usernameDecorate:message
+REGISTRATION_NAME id=register:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=register:nameDecorate:message
+REGISTRATION_PASSWORD id=register:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=register:passwordDecorate:message
+REGISTRATION_VERIFY id=register:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=register:verifyDecorate:message
+REGISTRATION_SUBMIT id=register:register
+REGISTRATION_REENTER_MESSAGE verify
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check in date must be a future date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
+SPINNER id\=main\:Spinner
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/groovybooking/src/org/jboss/seam/example/groovybooking/test/selenium/groovybooking.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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="hibernate.ftest.build" basedir="." default="build">
+ <property name="example.name" value="hibernate" />
+ <property name="jboss.deploy.target" value="jboss" />
+ <property name="jboss.undeploy.target" value="jboss.undeploy" />
+ <property name="jboss.example.ready.check.url" value="jboss-seam-hibernate/home.seam" />
+ <property name="jboss-embedded.deploy.target" value="jboss-embedded" />
+ <property name="jboss-embedded.undeploy.target" value="jboss-embedded.undeploy" />
+ <property name="jboss-embedded.example.ready.check.url" value="jboss-seam-hibernate/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,41 @@
+<!--
+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="Hibernate example" verbose="2" parallel="false">
+ <test name="hibernate_jboss">
+ <parameter name="PROPERTY_FILE"
+ value="/org/jboss/seam/example/hibernate/test/selenium/hibernate.properties" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-hibernate" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ConversationTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/selenium/hibernate.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/selenium/hibernate.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/selenium/hibernate.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,84 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE verify
+PASSWORD_VALUE_REQUIRED_MESSAGE //*[@id='setpassword:Message']
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=main:searchString
+SEARCH_SUBMIT id=main:findHotels
+NO_HOTELS_FOUND id=NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDateInputDate
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:Message
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDateInputDate
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:Message
+HOTEL_SMOKING_1 id=booking:smokingDecorate:smoking:0
+HOTEL_SMOKING_2 id=booking:smokingDecorate:smoking:1
+HOTEL_CREDIT_CARD id=booking:creditCardDecorate:creditCard
+HOTEL_CREDIT_CARD_NAME id=booking:creditCardNameDecorate:creditCardName
+HOTEL_PROCEED id=booking:proceed
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='main:messages']/li
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=register:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=register:usernameDecorate:message
+REGISTRATION_NAME id=register:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=register:nameDecorate:message
+REGISTRATION_PASSWORD id=register:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=register:passwordDecorate:message
+REGISTRATION_VERIFY id=register:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=register:verifyDecorate:message
+REGISTRATION_SUBMIT id=register:register
+REGISTRATION_REENTER_MESSAGE verify
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check in date must be a future date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
+SPINNER id\=main\:Spinner
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/hibernate/src/org/jboss/seam/example/hibernate/test/selenium/hibernate.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="icefaces.ftest.build" basedir="." default="build">
+ <property name="example.name" value="icefaces" />
+ <property name="jboss.example.ready.check.url" value="seam-icefaces/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,43 @@
+<!--
+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="Icefaces example" verbose="2" parallel="false">
+ <test name="icefaces_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/icefaces/test/selenium/icefaces.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-icefaces" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
+ <class name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest">
+ <methods>
+ <include name="backbuttoningAfterLogoutTest"></include>
+ </methods>
+ </class>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ConversationTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/selenium/icefaces.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/selenium/icefaces.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/selenium/icefaces.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,89 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE Re-enter new password
+PASSWORD_VALUE_REQUIRED_MESSAGE //*[contains(@id, 'Decorate:message')]
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=searchCriteria:searchString
+SEARCH_SUBMIT id=searchCriteria:findHotels
+NO_HOTELS_FOUND id=searchResults:NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'searchResults:hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=searchResults:hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDate_calendarInputtext
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:checkinDateDecorate:message
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDate_calendarInputtext
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:checkoutDateDecorate:message
+HOTEL_SMOKING_1 id=booking:smokingDecorate:smoking:_1
+HOTEL_SMOKING_2 id=booking:smokingDecorate:smoking:_2
+HOTEL_CREDIT_CARD id=booking:creditCardDecorate:creditCard
+HOTEL_CREDIT_CARD_NAME id=booking:creditCardNameDecorate:creditCardName
+HOTEL_PROCEED id=booking:proceed
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='messages']/li
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=registration:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=registration:usernameDecorate:message
+REGISTRATION_NAME id=registration:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=registration:nameDecorate:message
+REGISTRATION_PASSWORD id=registration:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=registration:passwordDecorate:message
+REGISTRATION_VERIFY id=registration:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=registration:verifyDecorate:message
+REGISTRATION_SUBMIT id=registration:register
+REGISTRATION_CANCEL id=registration:cancel
+REGISTRATION_REENTER_MESSAGE Re-enter your password
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/span/text()) \= "{0}"][normalize-space(td[1]/span/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/span/text()) \= "{0}"][normalize-space(td[1]/span/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check In Date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
+SPINNER id\=searchCriteria\:Spinner\:connection-working
+FOOTER id=footer
+
+USE_ICEFACES_FORMS TRUE
+
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/icefaces/src/org/jboss/seam/example/icefaces/test/selenium/icefaces.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="itext.ftest.build" basedir="." default="build">
+ <property name="example.name" value="itext" />
+ <property name="jboss.example.ready.check.url" value="seam-itext/index.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,27 @@
+
+ <!--
+ 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="Itext example" verbose="2" parallel="false">
+ <test name="itext_jboss">
+ <parameter name="CONTEXT_PATH" value="/seam-itext" />
+ <parameter name="PROPERTY_FILE" value="" />
+ <classes>
+ <class name="org.jboss.seam.example.itext.test.selenium.SeleniumItextTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/test/selenium/SeleniumItextTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/test/selenium/SeleniumItextTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/itext/src/org/jboss/seam/example/itext/test/selenium/SeleniumItextTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+package org.jboss.seam.example.itext.test.selenium;
+
+import static org.testng.AssertJUnit.assertEquals;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class SeleniumItextTest extends SeamSeleniumTest
+{
+ public static final String HOME_PAGE = "/index.seam";
+ public static final String HOME_PAGE_TITLE = "Seam PDF";
+
+ @BeforeMethod
+ @Override
+ public void setUp() {
+ super.setUp();
+ browser.open(CONTEXT_PATH + HOME_PAGE);
+ }
+
+ /**
+ * Place holder - just verifies that example deploys
+ */
+ @Test
+ public void homePageLoadTest() {
+ assertEquals("Unexpected page title.", HOME_PAGE_TITLE, browser.getTitle());
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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="jpa.ftest.build" basedir="." default="build">
+ <property name="example.name" value="jpa" />
+ <property name="jboss.deploy.target" value="jboss" />
+ <property name="jboss.undeploy.target" value="jboss.undeploy" />
+ <property name="jboss.example.ready.check.url" value="jboss-seam-jpa/home.seam" />
+ <property name="jboss-embedded.deploy.target" value="jboss-embedded" />
+ <property name="jboss-embedded.undeploy.target" value="jboss-embedded.undeploy" />
+ <property name="jboss-embedded.example.ready.check.url" value="jboss-seam-jpa/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,40 @@
+<!--
+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="JPA example" verbose="2" parallel="false">
+ <test name="jpa_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/jpa/test/selenium/jpa.properties" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-jpa" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ConversationTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/selenium/jpa.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/selenium/jpa.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/selenium/jpa.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,84 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE verify
+PASSWORD_VALUE_REQUIRED_MESSAGE //*[@id\='setpassword\:Message']
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=main:searchString
+SEARCH_SUBMIT id=main:findHotels
+NO_HOTELS_FOUND id=NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDateInputDate
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:Message
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDateInputDate
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:Message
+HOTEL_SMOKING_1 id=booking:smokingDecorate:smoking:0
+HOTEL_SMOKING_2 id=booking:smokingDecorate:smoking:1
+HOTEL_CREDIT_CARD id=booking:creditCardDecorate:creditCard
+HOTEL_CREDIT_CARD_NAME id=booking:creditCardNameDecorate:creditCardName
+HOTEL_PROCEED id=booking:proceed
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='main:messages']/li
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=register:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=register:usernameDecorate:message
+REGISTRATION_NAME id=register:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=register:nameDecorate:message
+REGISTRATION_PASSWORD id=register:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=register:passwordDecorate:message
+REGISTRATION_VERIFY id=register:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=register:verifyDecorate:message
+REGISTRATION_SUBMIT id=register:register
+REGISTRATION_REENTER_MESSAGE verify
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check in date must be a future date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
+SPINNER id\=main\:SpinnerGif
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/jpa/src/org/jboss/seam/example/jpa/test/selenium/jpa.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="mail.ftest.build" basedir="." default="build">
+ <property name="example.name" value="mail" />
+ <property name="jboss.example.ready.check.url" value="seam-mail/index.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,27 @@
+
+ <!--
+ 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="Mail example" verbose="2" parallel="false">
+ <test name="mail_jboss">
+ <parameter name="CONTEXT_PATH" value="/seam-mail" />
+ <parameter name="PROPERTY_FILE" value="" />
+ <classes>
+ <class name="org.jboss.seam.example.mail.test.selenium.SeleniumMailTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/test/selenium/SeleniumMailTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/test/selenium/SeleniumMailTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/mail/src/org/jboss/seam/example/mail/test/selenium/SeleniumMailTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,29 @@
+package org.jboss.seam.example.mail.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+
+public class SeleniumMailTest extends SeamSeleniumTest
+{
+ public static final String HOME_PAGE = "/index.seam";
+ public static final String HOME_PAGE_TITLE = "Seam Mail";
+
+ @BeforeMethod
+ @Override
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + HOME_PAGE);
+ }
+
+ /**
+ * Place holder - just verifies that example deploys
+ */
+ @Test
+ public void homePageLoadTest()
+ {
+ assertEquals("Unexpected page title.", HOME_PAGE_TITLE, browser.getTitle());
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="messages.ftest.build" basedir="." default="build">
+ <property name="example.name" value="messages" />
+ <property name="jboss.example.ready.check.url" value="seam-messages/messages.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,31 @@
+<!--
+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="Messages example" verbose="2" parallel="false">
+ <test name="messages_jboss">
+ <parameter name="PROPERTY_FILE" value="" />
+ <parameter name="CONTEXT_PATH" value="/seam-messages" />
+ <classes>
+ <class name="org.jboss.seam.example.messages.test.selenium.MessageTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/test/selenium/MessageTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/test/selenium/MessageTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/messages/src/org/jboss/seam/example/messages/test/selenium/MessageTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,83 @@
+/*
+ * 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.messages.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * Test for messages example
+ * @author Jozef Hartinger
+ *
+ */
+public class MessageTest extends SeamSeleniumTest
+{
+
+ public static final String MESSAGES_URL = "/messages.seam";
+ public static final String MESSAGES_LINK = "messages:{0}:link";
+ public static final String MESSAGES_DELETE = "messages:{0}:delete";
+ public static final String MESSAGES_CHECKBOX = "messages:{0}:read";
+ public static final String MESSAGES_COUNT = "//table[@id='messages']/tbody/tr";
+ public static final String MESSAGE_TITLE = "title";
+ public static final String MESSAGE_TEXT = "text";
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + MESSAGES_URL);
+ }
+
+ @Test(dataProvider = "messages")
+ public void readMessageTest(int i, String title, String text)
+ {
+ browser.clickAndWait(MessageFormat.format(MESSAGES_LINK, i));
+ assertEquals("Unexpected message title displayed.", title, browser.getText(MESSAGE_TITLE));
+ assertEquals("Unexpected message text displayed.", text, browser.getText(MESSAGE_TEXT));
+ assertTrue("Checkbox should be checked after message is read.", browser.isChecked(MessageFormat.format(MESSAGES_CHECKBOX, i)));
+ }
+
+ @Test(dependsOnMethods = {"readMessageTest"}, dataProvider = "messages")
+ public void deleteMessageTest(int i, String title, String name)
+ {
+ int messageCount = browser.getXpathCount(MESSAGES_COUNT).intValue();
+ // delete first message in a table
+ browser.clickAndWait(MessageFormat.format(MESSAGES_DELETE, 0));
+ assertEquals("Unexpected count of messages.", --messageCount, browser.getXpathCount(MESSAGES_COUNT));
+ assertFalse("Message title still present.", browser.isTextPresent(title));
+ }
+
+ @DataProvider(name = "messages")
+ public Object[][] getMessages()
+ {
+ Object[][] messages = { { 0, "Greetings Earthling", "This is another example of a message." }, { 1, "Hello World", "This is an example of a message." } };
+ return messages;
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="nestedbooking.ftest.build" basedir="." default="build">
+ <property name="example.name" value="nestedbooking" />
+ <property name="jboss.example.ready.check.url" value="seam-nested-booking/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,36 @@
+<!--
+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="Nested booking example" verbose="2" parallel="false">
+ <test name="nestedbooking_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-nested-booking" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class
+ name="org.jboss.seam.example.common.test.booking.selenium.ChangePasswordTest" />
+ <class name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
+ <class name="org.jboss.seam.example.nestedbooking.test.selenium.NestedSimpleBookingTest"></class>
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedSimpleBookingTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedSimpleBookingTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/NestedSimpleBookingTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,84 @@
+/*
+ * 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.nestedbooking.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest;
+
+/**
+ * This class alters behaviour of SimpleBookingTest to match nestedbooking example
+ *
+ * @author jharting
+ */
+public class NestedSimpleBookingTest extends SimpleBookingTest {
+
+ @Override
+ protected int bookHotel(String hotelName) {
+ return bookHotel(hotelName, 0, CREDIT_CARD, CREDIT_CARD_NAME);
+ }
+
+ protected int bookHotel(String hotelName, int room, String creditCard, String creditCardName) {
+ if (!isLoggedIn()) {
+ return -1;
+ }
+
+ if (!browser.isElementPresent(getProperty("SEARCH_SUBMIT"))) {
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ enterSearchQuery(hotelName);
+ browser.click(getProperty("SEARCH_RESULT_TABLE_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // hotel page
+ browser.click(getProperty("BOOKING_BOOK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // book page
+ browser.click(getProperty("BOOKING_SELECT_ROOM"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // room select page
+ browser.click(MessageFormat.format(getProperty("ROOM_LINK"), room));
+ browser.waitForPageToLoad(TIMEOUT);
+ // payment page
+ browser.type(getProperty("PAYMENT_CREDIT_CARD"), creditCard);
+ browser.type(getProperty("PAYMENT_CREDIT_CARD_NAME"), creditCardName);
+ browser.click(getProperty("PAYMENT_PROCEED"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // confirm page
+ browser.click(getProperty("CONFIRM_CONFIRM"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // main page
+ String message = browser.getText(getProperty("HOTEL_MESSAGE"));
+ if (message.matches(MessageFormat.format(
+ getProperty("BOOKING_CONFIRMATION_MESSAGE"), EXPECTED_NAME, hotelName))) {
+ String[] messageParts = message.split(" ");
+ int confirmationNumber = Integer.parseInt(messageParts[messageParts.length - 1]);
+ return confirmationNumber;
+ } else {
+ return -1;
+ }
+ }
+
+ @Override
+ protected void populateBookingFields() {}
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,87 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE Re-enter new password
+PASSWORD_VALUE_REQUIRED_MESSAGE //*[@id='setpassword:PasswordDecorate:message' or @id='setpassword:VerifyDecorate:message']
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=main:searchString
+SEARCH_SUBMIT id=main:findHotels
+NO_HOTELS_FOUND id=NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+BOOKING_SELECT_ROOM id=booking:room_preference
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDateInputDate
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:checkinDateDecorate:message
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDateInputDate
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:checkoutDateDecorate:message
+HOTEL_SMOKING id=booking:smokingDecorate:smoking:
+HOTEL_PROCEED id=booking:room_preference
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='main:messages']/li
+ROOM_LINK id=room_selections_form:rooms:{0}:selectRoomPreference
+PAYMENT_CREDIT_CARD id=payment:creditCardDecorate:creditCard
+PAYMENT_CREDIT_CARD_NAME id=payment:creditCardNameDecorate:creditCardName
+PAYMENT_PROCEED id=payment:proceed
+CONFIRM_CONFIRM id=confirm:buttonDecorate:confirm
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=register:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=register:usernameDecorate:message
+REGISTRATION_NAME id=register:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=register:nameDecorate:message
+REGISTRATION_PASSWORD id=register:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=register:passwordDecorate:message
+REGISTRATION_VERIFY id=register:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=register:verifyDecorate:message
+REGISTRATION_SUBMIT id=register:register
+REGISTRATION_REENTER_MESSAGE Re-enter your password
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check in date must be a future date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
+SPINNER id\=main\:SpinnerGif
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/nestedbooking/src/org/jboss/seam/example/nestedbooking/test/selenium/nestedbooking.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="numberguess.ftest.build" basedir="." default="build">
+ <property name="example.name" value="numberguess" />
+ <property name="jboss.example.ready.check.url" value="seam-numberguess/numberGuess.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,32 @@
+<!--
+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="Numberguess example" verbose="2" parallel="false">
+ <test name="numberguess_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-numberguess" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.numberguess.test.selenium.NumberGuessTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/NumberGuessTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,83 @@
+/*
+ * 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.numberguess.test.selenium;
+
+import java.text.MessageFormat;
+import static org.testng.AssertJUnit.fail;
+import static org.testng.AssertJUnit.assertTrue;
+
+import org.jboss.seam.example.common.test.numberguess.selenium.CommonNumberGuessTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author Jozef Hartinger
+ *
+ */
+public class NumberGuessTest extends CommonNumberGuessTest
+{
+
+ @Override
+ protected void enterGuess(int guess)
+ {
+ if (browser.isElementPresent(getProperty("GUESS_FIELD")))
+ {
+ // using input text field
+ super.enterGuess(guess);
+ }
+ else
+ {
+ if (browser.isElementPresent(getProperty("GUESS_MENU")))
+ {
+ // using menu
+ browser.select(getProperty("GUESS_MENU"), String.valueOf(guess));
+ }
+ else if (browser.isElementPresent(getProperty("GUESS_RADIO")))
+ {
+ // using radio buttons
+ int min = Integer.parseInt(browser.getText(getProperty("GUESS_MIN_VALUE")));
+ int radio = guess - min;
+ browser.check(MessageFormat.format(getProperty("GUESS_RADIO_ITEM"), radio));
+ } else {
+ fail("Unable to enter guess. No input found.");
+ }
+ browser.click(getProperty("GUESS_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+ }
+
+ @Test
+ public void cheatingTest() {
+ int number;
+
+ browser.click(getProperty("CHEAT_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(getProperty("CHEAT_YES_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ number = Integer.parseInt(browser.getText(getProperty("CHEAT_NUMBER")));
+ browser.click(getProperty("CHEAT_DONE_BUTTON"));
+ browser.waitForPageToLoad(TIMEOUT);
+ enterGuess(number);
+ assertTrue("User should win when cheating. Random number was " + number, isOnWinPage());
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/numberguess/src/org/jboss/seam/example/numberguess/test/selenium/numberguess.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,36 @@
+ #
+ # 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.
+ #
+MAIN_PAGE /numberGuess.seam
+GUESS_LOCATION numberGuess.seam
+WIN_LOCATION win.seam
+LOSE_LOCATION lose.seam
+GUESS_MAX_VALUE NumberGuessMain:Biggest
+GUESS_MIN_VALUE NumberGuessMain:Smallest
+GUESS_FIELD NumberGuessMain:inputGuess
+GUESS_MENU NumberGuessMain:selectGuessMenu
+GUESS_RADIO NumberGuessMain:selectGuessRadio
+GUESS_RADIO_ITEM NumberGuessMain:selectGuessRadio:{0}
+GUESS_SUBMIT NumberGuessMain:GuessButton
+CHEAT_BUTTON NumberGuessMain:CheatButton
+CHEAT_YES_BUTTON confirm:YesButton
+CHEAT_NUMBER cheat:RandomNumber
+CHEAT_DONE_BUTTON cheat\:DoneButton
\ No newline at end of file
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="quartz.ftest.build" basedir="." default="build">
+ <property name="example.name" value="quartz" />
+ <property name="jboss.example.ready.check.url" value="seam-quartz/search.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,31 @@
+<!--
+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="Quartz example" verbose="2" parallel="false">
+ <test name="quartz_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/quartz/test/selenium/quartz.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-quartz" />
+ <classes>
+ <class name="org.jboss.seam.example.quartz.test.selenium.QuartzPaymentTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/QuartzPaymentTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/QuartzPaymentTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/QuartzPaymentTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,93 @@
+/*
+ * 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.quartz.test.selenium;
+
+import java.math.BigDecimal;
+import java.text.MessageFormat;
+import java.text.ParseException;
+
+import static org.testng.AssertJUnit.*;
+
+import org.jboss.seam.example.common.test.seampay.selenium.PaymentTest;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author jharting
+ *
+ */
+public class QuartzPaymentTest extends PaymentTest
+{
+
+ /**
+ * Submits new payment using CRON and verifies that the balance is subtracted
+ * correctly
+ *
+ * @throws ParseException
+ * @throws InterruptedException
+ */
+ @Test
+ public void testCRON() throws ParseException, InterruptedException
+ {
+ int account = 3;
+ BigDecimal amount = new BigDecimal(10);
+ String to = "foo";
+ String accountLinkLocator = MessageFormat.format(getProperty("ACCOUNT_TABLE_LINK"), account);
+ String accountBalanceLocator = MessageFormat.format(getProperty("ACCOUNT_TABLE_BALANCE"), account);
+ // send every 20 seconds
+ String cronExpression = "0/20 * * * * ?";
+
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ // submit new cron job
+ browser.type(getProperty("PAYMENT_TO_FIELD"), to);
+ browser.type(getProperty("PAYMENT_AMOUNT_FIELD"), amount.toString());
+ browser.type(getProperty("PAYMENT_CRON_FIELD"), cronExpression);
+ browser.click(getProperty("PAYMENT_CRON_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Scheduled payment not confirmed.", browser.isTextPresent(MessageFormat.format(getProperty("PAYMENT_CONFIRMATION_MESSAGE"), to)));
+ assertEquals("Invalid count of payments.", 1, browser.getXpathCount(getProperty("PAYMENTS_COUNT")));
+ // wait
+ Thread.sleep(5000);
+ // get balance
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ BigDecimal firstBalance = BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator)));
+ // wait 20 seconds
+ Thread.sleep(20000);
+ // get balance after 20 seconds
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ BigDecimal secondBalance = BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator)));
+ // wait 20 seconds
+ Thread.sleep(20000);
+ // get balance after 40 seconds
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ BigDecimal thirdBalance = BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator)));
+
+ BigDecimal expectedSecondBalance = firstBalance.subtract(amount);
+ BigDecimal expectedThirdBalance = firstBalance.subtract(amount).subtract(amount);
+ assertEquals("Incorrect balance after 20 seconds.", expectedSecondBalance, secondBalance);
+ assertEquals("Incorrect balance after 40 seconds.", expectedThirdBalance, thirdBalance);
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/quartz.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/quartz.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/quartz.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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.
+ #
+MAIN_PAGE = /search.seam
+MAIN_PAGE_TITLE = Seam Pay
+ACCOUNT_TABLE_LINK = id=accountTable:{0}:link
+ACCOUNT_TABLE_BALANCE = id=accountTable:{0}:balance
+PAYMENT_TO_FIELD = id=accountView:paymentForm:payee
+PAYMENT_AMOUNT_FIELD = id=accountView:paymentForm:amount
+PAYMENT_CRON_FIELD = id=accountView:paymentForm:paymentCron
+PAYMENT_CRON_SUBMIT = id=accountView:paymentForm:cronSubmit
+PAYMENT_ONLY_ONCE_RADIO = id=accountView:paymentForm:radioList:0
+PAYMENT_EVERY_MINUTE_RADIO = id=accountView:paymentForm:radioList:1
+PAYMENT_SUBMIT = id=accountView:paymentForm:submit
+PAYMENT_CONFIRMATION_MESSAGE =Created a new payment to {0}
+PAYMENTS_COUNT =//table[@id\='payments']/tbody/tr
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/quartz/src/org/jboss/seam/example/quartz/test/selenium/quartz.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="registration.ftest.build" basedir="." default="build">
+ <property name="example.name" value="registration" />
+ <property name="jboss.example.ready.check.url" value="seam-registration/register.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,31 @@
+<!--
+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="Registration example" verbose="2" parallel="false">
+ <test name="registration_jboss">
+ <parameter name="PROPERTY_FILE" value="" />
+ <parameter name="CONTEXT_PATH" value="/seam-registration" />
+ <classes>
+ <class name="org.jboss.seam.example.registration.test.selenium.RegistrationTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/registration/src/org/jboss/seam/example/registration/test/selenium/RegistrationTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,96 @@
+/*
+ * 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.registration.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * This class tests registration form functionality in registration example.
+ *
+ * @author Jozef Hartinger
+ *
+ */
+public class RegistrationTest extends SeamSeleniumTest
+{
+ protected static String REGISTRATION_URL = "/register.seam";
+ protected static String REGISTRATION_USERNAME = "registration:username";
+ protected static String REGISTRATION_NAME = "registration:name";
+ protected static String REGISTRATION_PASSWORD = "registration:password";
+ protected static String REGISTRATION_SUBMIT = "registration:register";
+ protected static String REGISTRATION_MESSAGE = "registration:messages";
+ protected static String REGISTRATION_MESSAGE_COUNT = "//ul[@id='registration:messages']/li";
+ protected static String REGISTERED_URL = "/registered.seam";
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + REGISTRATION_URL);
+ }
+
+ @Test
+ public void simpleRegistrationTest()
+ {
+ String username = "johny";
+ String name = "John Doe";
+ String password = "secretPassword";
+ submitRegistrationForm(username, name, password);
+ assertTrue("After-registration page expected.", browser.getLocation().contains(REGISTERED_URL));
+ assertTrue("Welcome message should contain username.", browser.isTextPresent(username));
+ assertTrue("Welcome message should contain name.", browser.isTextPresent(name));
+ }
+
+ @Test(dependsOnMethods = { "simpleRegistrationTest" })
+ public void duplicateUsernameTest()
+ {
+ String username = "jane";
+ String name = "Jane Doe";
+ String password = "secretPassword";
+ submitRegistrationForm(username, name, password);
+ browser.goBackAndWait();
+ submitRegistrationForm(username, name, password);
+ assertTrue("Registration page expected.", browser.getLocation().contains(REGISTRATION_URL));
+ assertTrue("Error message did not appear.", browser.isElementPresent(REGISTRATION_MESSAGE));
+ }
+
+ @Test
+ public void emptyValuesTest()
+ {
+ submitRegistrationForm("", "", "");
+ assertTrue("Registration page expected.", browser.getLocation().contains(REGISTRATION_URL));
+ assertEquals("Unexpected number of error messages.", 3, browser.getXpathCount(REGISTRATION_MESSAGE_COUNT));
+ }
+
+ protected void submitRegistrationForm(String username, String name, String password)
+ {
+ browser.type(REGISTRATION_USERNAME, username);
+ browser.type(REGISTRATION_NAME, name);
+ browser.type(REGISTRATION_PASSWORD, password);
+ browser.clickAndWait(REGISTRATION_SUBMIT);
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="chatroom.ftest.build" basedir="." default="build">
+ <property name="example.name" value="remoting/chatroom" />
+ <property name="jboss.example.ready.check.url" value="seam-chatroom/chatroom.seam" />
+
+ <import file="../../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,29 @@
+
+ <!--
+ 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="Chatroom example" verbose="2" parallel="false">
+ <test name="chatroom_jboss">
+ <parameter name="CONTEXT_PATH" value="/seam-chatroom" />
+ <parameter name="PROPERTY_FILE"
+ value="" />
+ <classes>
+ <class
+ name="org.jboss.seam.example.remoting.chatroom.test.selenium.SeleniumChatroomTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/test/selenium/SeleniumChatroomTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/test/selenium/SeleniumChatroomTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/remoting/chatroom/src/org/jboss/seam/example/remoting/chatroom/test/selenium/SeleniumChatroomTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,25 @@
+package org.jboss.seam.example.remoting.chatroom.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertEquals;
+
+public class SeleniumChatroomTest extends SeamSeleniumTest
+{
+ public static final String HOME_PAGE = "/chatroom.seam";
+ public static final String HOME_PAGE_TITLE = "Chat Room Example";
+
+ @BeforeMethod
+ @Override
+ public void setUp() {
+ super.setUp();
+ browser.open(CONTEXT_PATH + HOME_PAGE);
+ }
+
+ @Test // place holder - should be replaced by better tests as soon as JBSEAM-3944 is resolved
+ public void homePageLoadTest() {
+ assertEquals("Unexpected page title.", HOME_PAGE_TITLE, browser.getTitle());
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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.example.ready.check.url" value="seam-bay/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/BidTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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"));
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/RegistrationTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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")));
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SearchTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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));
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SeleniumSeamBayTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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();
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/SellTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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")));
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seambay/src/org/jboss/seam/example/seambay/test/selenium/seambay.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -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
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="seampay.ftest.build" basedir="." default="build">
+ <property name="example.name" value="seampay" />
+ <property name="jboss.example.ready.check.url" value="seam-pay/search.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,31 @@
+<!--
+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="Seampay example" verbose="2" parallel="false">
+ <test name="seampay_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/seampay/test/selenium/seampay.properties" />
+ <parameter name="CONTEXT_PATH" value="/seam-pay" />
+ <classes>
+ <class name="org.jboss.seam.example.common.test.seampay.selenium.PaymentTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/selenium/seampay.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/selenium/seampay.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/selenium/seampay.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,32 @@
+ #
+ # 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.
+ #
+MAIN_PAGE = /search.seam
+MAIN_PAGE_TITLE = Seam Pay
+ACCOUNT_TABLE_LINK = id=accountTable:{0}:link
+ACCOUNT_TABLE_BALANCE = id=accountTable:{0}:balance
+PAYMENT_TO_FIELD = id=accountView:paymentForm:payee
+PAYMENT_AMOUNT_FIELD = id=accountView:paymentForm:amount
+PAYMENT_ONLY_ONCE_RADIO = id=accountView:paymentForm:radioList:0
+PAYMENT_EVERY_MINUTE_RADIO = id=accountView:paymentForm:radioList:1
+PAYMENT_SUBMIT = id=accountView:paymentForm:submit
+PAYMENT_CONFIRMATION_MESSAGE = Created a new payment to {0}
+PAYMENTS_COUNT =//table[@id\='payments']/tbody/tr
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seampay/src/org/jboss/seam/example/seampay/test/selenium/seampay.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="seamspace.ftest.build" basedir="." default="build">
+ <property name="example.name" value="seamspace" />
+ <property name="jboss.example.ready.check.url" value="seam-space/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,33 @@
+<!--
+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="Seamspace example" verbose="2" parallel="false">
+ <test name="seamspace_jboss">
+ <parameter name="PROPERTY_FILE" value="" />
+ <parameter name="CONTEXT_PATH" value="/seam-space" />
+ <classes>
+ <class name="org.jboss.seam.example.seamspace.test.selenium.LoginTest" />
+<!-- <class name="org.jboss.seam.example.seamspace.test.selenium.UserTest" />-->
+<!-- <class name="org.jboss.seam.example.seamspace.test.selenium.BlogTest" />-->
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/LoginTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/LoginTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/LoginTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,49 @@
+/*
+ * 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.seamspace.test.selenium;
+
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertTrue;
+
+import org.testng.annotations.Test;
+
+/**
+ * Basic test covering user authentication
+ * @author Jozef Hartinger
+ *
+ */
+public class LoginTest extends SeleniumSeamSpaceTest
+{
+
+ @Test(groups = {"loginTest"})
+ public void loginTest() {
+ assertTrue("Login failed.", isLoggedIn());
+ }
+
+ @Test(dependsOnMethods = {"loginTest"})
+ public void logoutTest() {
+ browser.clickAndWait(LOGOUT);
+ assertFalse("Logout failed.", isLoggedIn());
+ }
+
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/SeleniumSeamSpaceTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,106 @@
+/*
+ * 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.seamspace.test.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import static org.testng.AssertJUnit.fail;
+
+/**
+ *
+ * @author Jozef Hartinger
+ *
+ */
+public abstract class SeleniumSeamSpaceTest extends SeamSeleniumTest
+{
+
+ public static final String LOGIN = "id=login";
+ public static final String LOGOUT = "id=logout";
+ public static final String LOGIN_USERNAME = "id=loginForm:name";
+ public static final String LOGIN_PASSWORD = "id=loginForm:password";
+ public static final String LOGIN_LOGIN = "id=loginForm:login";
+ public static final String HOME_URL = "/home.seam";
+ public static final String SECURITY = "id=security";
+
+ public static final String MANAGE_USERS = "id=manageUsers";
+ public static final String CREATE_USER_BUTTON = "id=newUser";
+ public static final String USER_FIRSTNAME = "id=user:firstname";
+ public static final String USER_LASTNAME = "id=user:lastname";
+ public static final String USER_NAME = "id=user:username";
+ public static final String USER_PASSWORD = "id=user:password";
+ public static final String USER_CONFIRM = "id=user:confirm";
+ public static final String USER_ROLES = "id=user:roles";
+ public static final String USER_ROLE_BY_NAME_CHECKBOX = "xpath=//input[contains(@id, \"user:roles:\")][normalize-space(../label/text()) = \"{0}\"]";
+ public static final String USER_ENABLED = "id=user:enabled";
+ public static final String USER_SAVE = "id=user:save";
+ public static final String USER_CANCEL = "id=user:cancel";
+ public static final String USER_TABLE_ROW_BY_NAME = "xpath=//table[@id=\"threads\"]/tbody/tr[normalize-space(./td[1]/text()) = \"{0}\"]";
+ // these locators can only be used catenated with USER_TABLE_ROW_BY_NAME
+ public static final String USER_TABLE_ROLES = "/td[2]/text()";
+ public static final String USER_TABLE_CHECKBOX_CHECKED = "/td[3]/div[@class=\"checkmark\"]";
+ public static final String USER_TABLE_CHECKBOX_UNCHECKED = "/td[3]/div[@class=\"cross\"]";
+ public static final String USER_TABLE_DELETE = "//a[contains(@id, \"delete\")]";
+ public static final String USER_TABLE_EDIT = "//a[contains(@id, \"edit\")]";
+
+ public static final String MANAGE_ROLES = "id=manageRoles";
+ public static final String CREATE_ROLE_BUTTON = "id=newRole";
+ public static final String ROLE_NAME = "id=role:name";
+ public static final String ROLE_ROLES = "id=role:roles";
+ public static final String ROLE_MEMBER_OF_BY_NAME_CHECKBOX = "xpath=//input[contains(@id, \"role:roles:\")][normalize-space(../label/text()) = \"{0}\"]";
+ public static final String ROLE_SAVE = "id=role:save";
+ public static final String ROLE_CANCEL = "id=role:cancel";
+ public static final String ROLE_TABLE_ROW_BY_NAME = "xpath=//table[@id=\"threads\"]/tbody/tr[normalize-space(./td[1]/text()) = \"{0}\"]";
+ // these locators can only be used catenated with ROLE_TABLE_ROW_BY_NAME
+ public static final String ROLE_TABLE_ROLES = "/td[2]/text()";
+ public static final String ROLE_TABLE_DELETE = "//a[contains(@id, \"delete\")]";
+ public static final String ROLE_TABLE_EDIT = "//a[contains(@id, \"edit\")]";
+
+ public static final String DEFAULT_USERNAME = "demo";
+ public static final String DEFAULT_PASSWORD = "demo";
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ super.setUp();
+ browser.open(CONTEXT_PATH + HOME_URL);
+ login();
+ }
+
+ public void login() {
+ login(DEFAULT_USERNAME, DEFAULT_PASSWORD);
+ }
+
+ public void login(String username, String password) {
+ if (isLoggedIn()) {
+ fail("User already logged in.");
+ }
+ browser.clickAndWait(LOGIN);
+ browser.type(LOGIN_USERNAME, username);
+ browser.type(LOGIN_PASSWORD, password);
+ browser.clickAndWait(LOGIN_LOGIN);
+ }
+
+ protected boolean isLoggedIn()
+ {
+ return !browser.isElementPresent(LOGIN) && browser.isElementPresent(LOGOUT);
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/UserTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/UserTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/seamspace/src/org/jboss/seam/example/seamspace/test/selenium/UserTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,146 @@
+/*
+ * 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.seamspace.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+
+/**
+ * This class tests user management in SeamSpace application
+ * @author Jozef Hartinger
+ *
+ */
+public class UserTest extends SeleniumSeamSpaceTest
+{
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.clickAndWait(SECURITY);
+ browser.clickAndWait(MANAGE_USERS);
+ }
+
+ @Test(dependsOnGroups = {"loginTest"})
+ public void userCreatingTest()
+ {
+ String username = "jharting";
+ String password = "topSecret";
+ String[] roles = {"admin", "user"};
+ createNewUser("Jozef", "Hartinger", username, password, password, roles, true);
+ String userRow = MessageFormat.format(USER_TABLE_ROW_BY_NAME, username);
+ // check user list
+ assertTrue("User not found in userlist.", browser.isElementPresent(userRow));
+ assertTrue("User not in admin role.", browser.getText(userRow + USER_TABLE_ROLES).contains("admin"));
+ assertTrue("User not in user role.", browser.getText(userRow + USER_TABLE_ROLES).contains("user"));
+ assertTrue("User not enabled.", browser.isElementPresent(userRow + USER_TABLE_CHECKBOX_CHECKED));
+ // check new user can login
+ browser.clickAndWait(LOGOUT);
+ login(username, password);
+ assertTrue("Unable to login with new user's credentials.", isLoggedIn());
+ }
+
+ @Test(dependsOnGroups = {"loginTest"})
+ public void userEditingTest() {
+ String username = "shadowman";
+ String password = "password";
+ String[] roles = {"admin", "user"};
+ String userRow = MessageFormat.format(USER_TABLE_ROW_BY_NAME, username);
+ browser.clickAndWait(userRow + USER_TABLE_EDIT);
+ fillUpdatableUserDetails(password, password, roles, true);
+ browser.clickAndWait(USER_SAVE);
+ assertTrue("User not in admin role.", browser.getText(userRow + USER_TABLE_ROLES).contains("admin"));
+ assertTrue("User not in user role.", browser.getText(userRow + USER_TABLE_ROLES).contains("user"));
+ browser.clickAndWait(LOGOUT);
+ login(username, password);
+ assertTrue("Unable to login with changed password", isLoggedIn());
+ }
+
+ @Test(dependsOnGroups = {"loginTest"})
+ public void userDeletingTest() {
+ String username = "mona";
+ String userRow = MessageFormat.format(USER_TABLE_ROW_BY_NAME, username);
+ assertTrue("User " + username + " not in user list.", browser.isElementPresent(userRow));
+ browser.chooseOkOnNextConfirmation();
+ browser.click(userRow + USER_TABLE_DELETE);
+ browser.getConfirmation();
+ browser.waitForPageToLoad(TIMEOUT);
+ assertFalse("User " + username + " exists after deletion", browser.isElementPresent(userRow));
+ }
+
+ @Test(dependsOnGroups = {"loginTest"})
+ public void cancelledUserDeletingTest() throws InterruptedException {
+ String username = "demo";
+ String userRow = MessageFormat.format(USER_TABLE_ROW_BY_NAME, username);
+ assertTrue("User " + username + " not in user list.", browser.isElementPresent(userRow));
+ browser.chooseCancelOnNextConfirmation();
+ browser.click(userRow + USER_TABLE_DELETE);
+ browser.getConfirmation();
+ browser.refreshAndWait();
+ assertTrue("User " + username + " missing in user list after cancelled deletion.", browser.isElementPresent(userRow));
+ }
+
+ @Test(dependsOnGroups = {"loginTest"}, dependsOnMethods={"userCreatingTest"})
+ public void disablingUserAccountTest() {
+ String username = "johny";
+ String password = "password";
+ String userRow = MessageFormat.format(USER_TABLE_ROW_BY_NAME, username);
+ createNewUser("John", "Doe", username, password, password, new String[]{"user"}, false);
+ assertTrue("User not found in userlist.", browser.isElementPresent(userRow));
+ assertTrue("User account enabled.", browser.isElementPresent(userRow + USER_TABLE_CHECKBOX_UNCHECKED));
+ browser.clickAndWait(LOGOUT);
+ login(username, password);
+ assertFalse("User logged in despite his account was disabled.", isLoggedIn());
+ }
+
+ private void createNewUser(String firstName, String lastName, String username, String password, String confirm, String[] roles, boolean enabled) {
+ browser.clickAndWait(CREATE_USER_BUTTON);
+ fillNewUserDetails(firstName, lastName, username, password, confirm, roles, enabled);
+ browser.clickAndWait(USER_SAVE);
+ }
+
+ private void fillNewUserDetails(String firstName, String lastName, String username, String password, String confirm, String[] roles, boolean enabled)
+ {
+ browser.type(USER_FIRSTNAME, firstName);
+ browser.type(USER_LASTNAME, lastName);
+ browser.type(USER_NAME, username);
+ fillUpdatableUserDetails(password, confirm, roles, enabled);
+ }
+
+ private void fillUpdatableUserDetails(String password, String confirm, String[] roles, boolean enabled) {
+ browser.type(USER_PASSWORD, password);
+ browser.type(USER_CONFIRM, confirm);
+ for (String role : roles) {
+ assertTrue("Unable to add user to role: " + role, browser.isElementPresent(MessageFormat.format(USER_ROLE_BY_NAME_CHECKBOX, role)));
+ browser.check(MessageFormat.format(USER_ROLE_BY_NAME_CHECKBOX, role));
+ }
+ if (enabled)
+ {
+ browser.check(USER_ENABLED);
+ }
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,30 @@
+<?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="spring.ftest.build" basedir="." default="build">
+ <property name="example.name" value="spring" />
+ <property name="jboss.deploy.target" value="jbosswar" />
+ <property name="jboss.undeploy.target" value="jbosswar.undeploy" />
+ <property name="jboss.example.ready.check.url" value="jboss-seam-spring/home.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,35 @@
+<!--
+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="Spring example" verbose="2" parallel="false">
+ <test name="spring_jboss">
+ <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/spring/test/selenium/spring.properties" />
+ <parameter name="CONTEXT_PATH" value="/jboss-seam-spring" />
+ <classes>
+ <class name="org.jboss.seam.example.common.test.booking.selenium.RegistrationTest" />
+ <class name="org.jboss.seam.example.spring.test.selenium.SpringChangePasswordTest" />
+ <class name="org.jboss.seam.example.common.test.booking.selenium.BackButtonTest" />
+ <class name="org.jboss.seam.example.common.test.booking.selenium.SimpleBookingTest" />
+ <class name="org.jboss.seam.example.common.test.booking.selenium.ConversationTest" />
+ </classes>
+ </test>
+</suite>
\ No newline at end of file
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/SpringChangePasswordTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/SpringChangePasswordTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/SpringChangePasswordTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,108 @@
+/*
+ * 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.spring.test.selenium;
+
+import org.jboss.seam.example.common.test.booking.selenium.SeleniumBookingTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * This class tests change password funcionality.
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class SpringChangePasswordTest extends SeleniumBookingTest {
+
+ private final static String LONG_TEXT = "testertestertest";
+ private final static String SHORT_TEXT = "tt";
+ // overriding default values
+ private final String USERNAME = "gavin";
+ private final String PASSWORD = "foobar";
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ browser = startBrowser();
+ login(USERNAME, PASSWORD);
+ }
+
+ /**
+ * Verifies that changing password works well. If clean-up part of this
+ * method fails it may affect other methods.
+ */
+ @Test
+ public void changePasswordTest() {
+ String newPassword = "password";
+ changePassword(newPassword, PASSWORD);
+ assertTrue("Password change failed.", browser
+ .isTextPresent(getProperty("PASSWORD_UPDATED_MESSAGE")));
+ logout();
+ assertTrue("Login failed.", login(USERNAME, newPassword));
+ // cleanup - set default password
+ changePassword(PASSWORD, newPassword);
+ assertTrue("Password change failed.", browser
+ .isTextPresent(getProperty("PASSWORD_UPDATED_MESSAGE")));
+ logout();
+ assertTrue("Login failed.", login(USERNAME, PASSWORD));
+ }
+
+ @Test
+ public void usingIncorrectOldPasswordTest() {
+ changePassword("password", "foobar1");
+ assertTrue("Password verification failed", browser
+ .isTextPresent(getProperty("PASSWORD_REENTER_MESSAGE")));
+ }
+
+ @Test
+ public void usingEmptyPasswordsTest() {
+ changePassword("", "");
+ assertEquals("Password verification failed", 2, browser
+ .getXpathCount(getProperty("PASSWORD_VALUE_REQUIRED_MESSAGE")));
+ }
+
+ @Test
+ public void usingLongPasswordTest() {
+ changePassword(LONG_TEXT, LONG_TEXT);
+ assertTrue("Password verification failed", browser
+ .isTextPresent(getProperty("PASSWORD_LENGTH_MESSAGE")));
+ }
+
+ @Test
+ public void usingShortPasswordTest() {
+ changePassword(SHORT_TEXT, SHORT_TEXT);
+ assertTrue("Password verification failed", browser
+ .isTextPresent(getProperty("PASSWORD_LENGTH_MESSAGE")));
+ }
+
+ public void changePassword(String newPassword, String oldpassword) {
+ browser.click(getProperty("SETTINGS"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("PASSWORD_PASSWORD"), newPassword);
+ browser.type(getProperty("PASSWORD_VERIFY"), oldpassword);
+ browser.click(getProperty("PASSWORD_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/spring.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/spring.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/spring.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,86 @@
+ #
+ # 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.
+ #
+HOME_PAGE /home.seam
+MAIN_PAGE /main.seam
+PAGE_TITLE JBoss Suites: Seam Framework
+LOGIN_USERNAME_FIELD id=login:username
+LOGIN_PASSWORD_FIELD id=login:password
+LOGIN_SUBMIT id=login:login
+LOGOUT id=logout
+PASSWORD_UPDATED_MESSAGE Password updated
+PASSWORD_REENTER_MESSAGE verify
+PASSWORD_VALUE_REQUIRED_MESSAGE //*[@id\='setpassword\:Message']
+PASSWORD_LENGTH_MESSAGE length must be between
+PASSWORD_PASSWORD id=setpassword:PasswordDecorate:password
+PASSWORD_VERIFY id=setpassword:VerifyDecorate:verify
+PASSWORD_SUBMIT id=setpassword:change
+SETTINGS id=settings
+SEARCH_STRING_FIELD id=main:searchString
+SEARCH_SUBMIT id=main:findHotels
+NO_HOTELS_FOUND id=NoHotelsFoundMessage
+SEARCH_RESULT_TABLE xpath=//table[@id = 'hotels']/tbody
+SEARCH_RESULT_TABLE_FIRST_ROW_LINK id=hotels:0:viewHotel
+BOOKING_BOOK id=hotel:bookHotel
+BOOKING_CANCEL id=hotel:cancel
+HOTEL_BED_FIELD id=booking:bedsDecorate:beds
+HOTEL_BED_FIELD_SELECT_CRITERIA value=
+HOTEL_CHECKIN_DATE_FIELD id=booking:checkinDateDecorate:checkinDateInputDate
+HOTEL_CHECKIN_DATE_MESSAGE id=booking:Messages
+HOTEL_CHECKOUT_DATE_FIELD id=booking:checkoutDateDecorate:checkoutDateInputDate
+HOTEL_CHECKOUT_DATE_MESSAGE id=booking:Messages
+HOTEL_SMOKING_1 id=booking:smokingDecorate:smoking:0
+HOTEL_SMOKING_2 id=booking:smokingDecorate:smoking:1
+HOTEL_CREDIT_CARD id=booking:creditCardDecorate:creditCard
+HOTEL_CREDIT_CARD_NAME id=booking:creditCardNameDecorate:creditCardName
+HOTEL_PROCEED id=booking:proceed
+HOTEL_CANCEL id=booking:cancel
+HOTEL_CONFIRM id=confirm:confirm
+HOTEL_MESSAGE xpath=//ul[@id='main:messages']/li
+REGISTRATION id=login:register
+REGISTRATION_USERNAME id=register:usernameDecorate:username
+REGISTRATION_USERNAME_MESSAGE id=register:usernameDecorate:message
+REGISTRATION_NAME id=register:nameDecorate:name
+REGISTRATION_NAME_MESSAGE id=register:nameDecorate:message
+REGISTRATION_PASSWORD id=register:passwordDecorate:password
+REGISTRATION_PASSWORD_MESSAGE id=register:passwordDecorate:message
+REGISTRATION_VERIFY id=register:verifyDecorate:verify
+REGISTRATION_VERIFY_MESSAGE id=register:verifyDecorate:message
+REGISTRATION_SUBMIT id=register:register
+REGISTRATION_REENTER_MESSAGE verify
+REGISTRATION_LENGTH_MESSAGE length must be between
+REGISTRATION_SUCCESSFUL_MESSAGE Successfully registered as {0}
+REGISTRATION_USER_EXISTS_MESSAGE Username {0} already exists
+NOT_LOGGED_IN_MESSAGE Please log in first
+CONVERSATION_TIMEOUT_MESSAGE The conversation ended, timed out or was processing another request
+BOOKING_TABLE_ITEM xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]
+BOOKING_TABLE_ITEM_LINK xpath\=//table[@id\="bookings\:bookings"]/tbody/tr[normalize-space(td[6]/text()) \= "{0}"][normalize-space(td[1]/text()) \= "{1}"]/td[7]/a
+BOOKING_CANCELLED_MESSAGE Booking cancelled for confirmation number {0}
+BOOKING_CONFIRMATION_MESSAGE Thank you, {0}, your confimation number for {1} is \\d+
+BOOKING_INVALID_DATE_MESSAGE1 Check out date must be later than check in date
+BOOKING_INVALID_DATE_MESSAGE2 Check in date must be a future date
+WORKSPACE_BOOKING_TEXT Book hotel: {0}
+WORKSPACE_VIEW_TEXT View hotel: {0}
+WORKSPACE_TABLE_LINK_BY_ID id=ConversationListForm:ConversationListDataTable:{0}:EntryDescriptionLink
+WORKSPACE_TABLE_ROW_COUNT = //table[@id\='ConversationListForm\:ConversationListDataTable']/tbody/tr
+SPINNER id=main:Spinner
+# ajax not present in spring example - false required
+USE_AJAX_SEARCH FALSE
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/spring/src/org/jboss/seam/example/spring/test/selenium/spring.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="todo.ftest.build" basedir="." default="build">
+ <property name="example.name" value="todo" />
+ <property name="jboss.example.ready.check.url" value="seam-todo/login.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,31 @@
+<!--
+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="Todo example" verbose="2" parallel="false">
+ <test name="todo_jboss">
+ <parameter name="PROPERTY_FILE" value="" />
+ <parameter name="CONTEXT_PATH" value="/seam-todo" />
+ <classes>
+ <class name="org.jboss.seam.example.todo.test.selenium.SeleniumTodoTest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/todo/src/org/jboss/seam/example/todo/test/selenium/SeleniumTodoTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,109 @@
+/*
+ * 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.todo.test.selenium;
+
+import java.text.MessageFormat;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.assertFalse;
+import static org.testng.AssertJUnit.assertEquals;
+
+/**
+ * This is a base class for todo example selenium tests
+ * @author Jozef Hartinger
+ *
+ */
+public class SeleniumTodoTest extends SeamSeleniumTest
+{
+
+ public static final String LOGIN_URL = "/login.seam";
+ public static final String TODO_URL = "/todo.seam";
+ public static final String LOGIN_USERNAME = "id=login:username";
+ public static final String LOGIN_SUBMIT = "id=login:submit";
+ public static final String NEW_ITEM_DESCRIPTION = "id=new:description";
+ public static final String NEW_ITEM_CREATE = "id=new:create";
+
+ public static final String NO_ITEMS_FOUND = "id=list:noItems";
+ public static final String FIRST_ITEM_DESCRIPTION = "id=list:items:0:description";
+ public static final String FIRST_ITEM_PRIORITY = "id=list:items:0:priority";
+ public static final String FIRST_ITEM_DONE = "id=list:items:0:done";
+ public static final String NTH_ITEM_DESCRIPTION = "id=list:items:{0}:description";
+ public static final String NTH_ITEM_PRIORITY = "id=list:items:{0}:priority";
+ public static final String NTH_ITEM_DONE = "id=list:items:{0}:done";
+ public static final String ITEMS_COUNT = "//table[@id=\"list:items\"]/tbody/tr";
+ public static final String ITEMS_UPDATE = "list:update";
+
+
+ public static final String DEFAULT_USERNAME = "tester";
+
+ @BeforeClass
+ public void prepareTestFixture() {
+ String[] fixture = {"selenium test for todo example", "buy milk", "clean the bathroom"};
+ setUp();
+ assertTrue("Item list should be empty", browser.isElementPresent(NO_ITEMS_FOUND));
+ for (String item : fixture) {
+ browser.type(NEW_ITEM_DESCRIPTION, item);
+ browser.clickAndWait(NEW_ITEM_CREATE);
+ }
+ assertEquals("Unexpected count of items.", fixture.length, browser.getXpathCount(ITEMS_COUNT));
+ super.tearDown();
+ }
+
+ @BeforeMethod
+ @Override
+ public void setUp() {
+ super.setUp();
+ browser.open(CONTEXT_PATH + LOGIN_URL);
+ browser.type(LOGIN_USERNAME, DEFAULT_USERNAME);
+ browser.clickAndWait(LOGIN_SUBMIT);
+ assertTrue("Navigation failure. Todo page expected.", browser.getLocation().contains(TODO_URL));
+ }
+
+ @Test
+ public void getEntryDoneTest() {
+ String description = browser.getValue(FIRST_ITEM_DESCRIPTION);
+ int itemCount = browser.getXpathCount(ITEMS_COUNT).intValue();
+ browser.clickAndWait(FIRST_ITEM_DONE);
+ assertFalse("Item should disappear from item list when done.", browser.isTextPresent(description));
+ assertEquals("Unexpected count of items.", --itemCount, browser.getXpathCount(ITEMS_COUNT));
+ }
+
+ /**
+ * This test sets high priority to first item and verifies that the item is be moved to the bottom and the priority number is kept.
+ */
+ @Test
+ public void priorityTest() {
+ String description = browser.getValue(FIRST_ITEM_DESCRIPTION);
+ String priority = "10";
+ int itemCount = browser.getXpathCount(ITEMS_COUNT).intValue();
+ int lastItemRowId = itemCount - 1;
+ browser.type(FIRST_ITEM_PRIORITY, priority);
+ browser.clickAndWait(ITEMS_UPDATE);
+ assertEquals("Message should move to the end of item list after priority change.", description, browser.getValue(MessageFormat.format(NTH_ITEM_DESCRIPTION, lastItemRowId)));
+ assertEquals("Unexpected priority.", priority, browser.getValue(MessageFormat.format(NTH_ITEM_PRIORITY, lastItemRowId)));
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/build.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/build.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/build.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,28 @@
+<?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="ui.ftest.build" basedir="." default="build">
+ <property name="example.name" value="ui" />
+ <property name="jboss.example.ready.check.url" value="seam-ui/index.seam" />
+
+ <import file="../build.xml" />
+</project>
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/jboss.xml
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/jboss.xml (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/jboss.xml 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,27 @@
+
+ <!--
+ 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="UI example" verbose="2" parallel="false">
+ <test name="ui_jboss">
+ <parameter name="CONTEXT_PATH" value="/seam-ui" />
+ <parameter name="PROPERTY_FILE" value="" />
+ <classes>
+ <class name="org.jboss.seam.example.ui.test.selenium.SeleniumUITest" />
+ </classes>
+ </test>
+</suite>
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/jboss.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/test/selenium/SeleniumUITest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/test/selenium/SeleniumUITest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/examples/ui/src/org/jboss/seam/example/ui/test/selenium/SeleniumUITest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,30 @@
+package org.jboss.seam.example.ui.test.selenium;
+
+import static org.testng.AssertJUnit.assertEquals;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+public class SeleniumUITest extends SeamSeleniumTest
+{
+ public static final String HOME_PAGE = "/index.seam";
+ public static final String HOME_PAGE_TITLE = "UI Example:";
+
+ @BeforeMethod
+ @Override
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + HOME_PAGE);
+ }
+
+ /**
+ * Place holder - just verifies that example deploys
+ */
+ @Test
+ public void homePageLoadTest()
+ {
+ assertEquals("Unexpected page title.", HOME_PAGE_TITLE, browser.getTitle());
+ }
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/ftest.properties
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/ftest.properties (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/ftest.properties 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,50 @@
+ #
+ # 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.
+ #
+
+#Build properties for running and executing functional tests
+
+# Selenium testng specific
+selenium.server.port=14444
+selenium.host=localhost
+selenium.browser=*firefox
+selenium.browser.port=8080
+selenium.browser.url=http://127.0.0.1:8080
+selenium.speed=0
+selenium.timeout=30000
+
+# enter any commands wanted for the testng run
+selenium.testng.jvmargs=-Dfoo
+
+# enter any commands wanted for the selenium server
+# -log selenium.server.log will create a debug log
+selenium.server.cmd.args=
+
+# default deploy and undeploy targets
+# these values can be overriden in local build.xml file for specific example
+jboss.deploy.target=deploy
+jboss.undeploy.target=undeploy
+# default wait times
+jboss.deploy.waittime=120
+# default wait urls
+jboss.example.ready.check.url=seam-${example.name}/
+
+
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/selenium-java-client-driver.jar
===================================================================
(Binary files differ)
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/selenium-java-client-driver.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/selenium-server-standalone.jar
===================================================================
(Binary files differ)
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/selenium-server-standalone.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/testng-5.8-jdk15.jar
===================================================================
(Binary files differ)
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/lib/testng-5.8-jdk15.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/AjaxTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/AjaxTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/AjaxTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,45 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import org.testng.annotations.Test;
+/**
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class AjaxTest extends SeleniumBookingTest {
+
+ @Test
+ public void ajaxSearchFloodTest() {
+ String[] hotels = new String[] { "Marriott Courtyard", "Conrad Miami",
+ "Marriot Downtown", "Ritz Carlton", "NonExistingHotel" };
+ for (int i = 0; i < 30; i++) {
+ for (String hotel : hotels) {
+
+ browser.type(getProperty("SEARCH_STRING_FIELD"), "");
+ enterSearchQuery(hotel);
+ }
+ }
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/AjaxTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/BackButtonTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/BackButtonTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/BackButtonTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,102 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * This tests verifies that the example can cleanly handle backbuttoning in
+ * various situations
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class BackButtonTest extends SeleniumBookingTest {
+
+ String hotelName = "Mar";
+
+ /**
+ * Tries whether backbuttoning after logout is cleanly handled.
+ */
+ @Test
+ public void backbuttoningAfterLogoutTest() {
+ enterSearchQuery(hotelName);
+ logout();
+ // goBack() does not work with konqueror
+ browser.goBack();
+ browser.waitForPageToLoad(TIMEOUT);
+ if (isLoggedIn()) {
+ browser.click(getProperty("SETTINGS"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Backbuttoning failed.", getProperty("PAGE_TITLE"),
+ browser.getTitle());
+ assertFalse("Backbuttoning handled bad way.", isLoggedIn());
+ }
+ }
+
+ /**
+ * Tries whether backbuttoning after logout is cleanly handled. Using ajax
+ * functionality after logout.
+ */
+ @Test
+ public void backbuttoningAfterLogoutWithAjaxTest() {
+ enterSearchQuery(hotelName);
+ logout();
+ // goBack() does not work with konqueror
+ // browser.refresh();
+ // browser.waitForPageToLoad(TIMEOUT);
+ browser.goBack();
+ browser.waitForPageToLoad(TIMEOUT);
+ if (isLoggedIn()) {
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Backbuttoning failed.", getProperty("PAGE_TITLE"),
+ browser.getTitle());
+ assertFalse("User should not be logged in by now.", isLoggedIn());
+ }
+ }
+
+ /**
+ * Verifies that backbuttoning after ending conversation is handled cleanly.
+ */
+ @Test
+ public void backbuttoningAfterConversationEndTest() {
+ // start booking
+ enterSearchQuery(hotelName);
+ browser.click(getProperty("SEARCH_RESULT_TABLE_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(getProperty("BOOKING_BOOK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // cancel booking
+ browser.click(getProperty("HOTEL_CANCEL"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.goBack();
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.refresh();
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Conversation failure.", browser
+ .isTextPresent(getProperty("CONVERSATION_TIMEOUT_MESSAGE")));
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/BackButtonTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ChangePasswordTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ChangePasswordTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ChangePasswordTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,110 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * This class tests change password funcionality.
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class ChangePasswordTest extends SeleniumBookingTest {
+
+ private final static String LONG_TEXT = "testertestertest";
+ private final static String SHORT_TEXT = "tt";
+ // overriding default values
+ private final String USERNAME = "gavin";
+ private final String PASSWORD = "foobar";
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ browser = startBrowser();
+ assertTrue("Login failed.", login(USERNAME, PASSWORD));
+ }
+
+ /**
+ * Verifies that changing password works well. If clean-up part of this
+ * method fails it may affect other methods.
+ */
+ @Test
+ public void changePasswordTest() {
+ changePassword("password");
+ assertTrue("Password change failed.", browser
+ .isTextPresent(getProperty("PASSWORD_UPDATED_MESSAGE")));
+ logout();
+ assertTrue("Login failed.", login(USERNAME, "password"));
+ // cleanup - set default password
+ changePassword(PASSWORD);
+ assertTrue("Password change failed.", browser
+ .isTextPresent(getProperty("PASSWORD_UPDATED_MESSAGE")));
+ logout();
+ assertTrue("Login failed.", login(USERNAME, PASSWORD));
+ }
+
+ @Test
+ public void usingDifferentPasswordsTest() {
+ changePassword("password", "password1");
+ assertTrue("Password verification failed", browser
+ .isTextPresent(getProperty("PASSWORD_REENTER_MESSAGE")));
+ }
+
+ @Test
+ public void usingEmptyPasswordsTest() {
+ changePassword("", "");
+ assertEquals("Password validation failed", 2, browser
+ .getXpathCount(getProperty("PASSWORD_VALUE_REQUIRED_MESSAGE")));
+ }
+
+ @Test
+ public void usingLongPasswordTest() {
+ changePassword(LONG_TEXT, LONG_TEXT);
+ assertTrue("Password validation failed", browser
+ .isTextPresent(getProperty("PASSWORD_LENGTH_MESSAGE")));
+ }
+
+ @Test
+ public void usingShortPasswordTest() {
+ changePassword(SHORT_TEXT, SHORT_TEXT);
+ assertTrue("Password validation failed", browser
+ .isTextPresent(getProperty("PASSWORD_LENGTH_MESSAGE")));
+ }
+
+ public void changePassword(String newPassword) {
+ changePassword(newPassword, newPassword);
+ }
+
+ public void changePassword(String newPassword, String verify) {
+ browser.click(getProperty("SETTINGS"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("PASSWORD_PASSWORD"), newPassword);
+ browser.type(getProperty("PASSWORD_VERIFY"), verify);
+ browser.click(getProperty("PASSWORD_SUBMIT"));
+ waitForForm();
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ChangePasswordTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ConversationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ConversationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ConversationTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,100 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import java.text.MessageFormat;
+
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class ConversationTest extends SeleniumBookingTest {
+
+ private final String hotel1 = "Hotel Rouge";
+ private final String hotel2 = "Doubletree";
+
+ /**
+ * Opens two windows and tries switching over workspaces to make sure
+ * conversations work properly.
+ */
+ @Test
+ public void testConversations() {
+ // Start booking in window 1
+ browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "1");
+ browser.openWindow(CONTEXT_PATH + getProperty("MAIN_PAGE"), "2");
+ browser.selectWindow("1");
+ browser.refresh();
+ browser.waitForPageToLoad(TIMEOUT);
+ if (!isLoggedIn()) {
+ login();
+ }
+ enterSearchQuery(hotel1);
+ browser.click(getProperty("SEARCH_RESULT_TABLE_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.click(getProperty("BOOKING_BOOK"));
+ // Find hotel in window 2
+ browser.selectWindow("2");
+ if (!isLoggedIn()) {
+ login();
+ }
+ enterSearchQuery(hotel2);
+ browser.click(getProperty("SEARCH_RESULT_TABLE_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // Reload window 1 to check whether both workspaces are displayed
+ browser.selectWindow("1");
+ browser.refresh();
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("#1 workspace not present in workspace table",
+ MessageFormat.format(getProperty("WORKSPACE_BOOKING_TEXT"),
+ hotel1), browser.getText(MessageFormat.format(
+ getProperty("WORKSPACE_TABLE_LINK_BY_ID"), 0)));
+ assertEquals("#2 workspace not present in workspace table",
+ MessageFormat
+ .format(getProperty("WORKSPACE_VIEW_TEXT"), hotel2),
+ browser.getText(MessageFormat.format(
+ getProperty("WORKSPACE_TABLE_LINK_BY_ID"), 1)));
+ // Switch window 1 to second workspace
+ browser.click(MessageFormat.format(
+ getProperty("WORKSPACE_TABLE_LINK_BY_ID"), 1));
+ browser.waitForPageToLoad(TIMEOUT);
+ // Switch window 1 back to first workspace
+ browser.click(MessageFormat.format(
+ getProperty("WORKSPACE_TABLE_LINK_BY_ID"), 1));
+ browser.waitForPageToLoad(TIMEOUT);
+ // End conversation in window 2
+ browser.selectWindow("2");
+ browser.click(getProperty("BOOKING_CANCEL"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // Second workspace should disappear
+ browser.selectWindow("1");
+ browser.refresh();
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Workspace failure.", 1, browser
+ .getXpathCount(getProperty("WORKSPACE_TABLE_ROW_COUNT")));
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/ConversationTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/RegistrationTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/RegistrationTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/RegistrationTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,133 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import java.text.MessageFormat;
+import java.util.Date;
+
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * This class tests registration
+ *
+ * @author jbalunas
+ * @author jharting
+ */
+public class RegistrationTest extends SeleniumBookingTest {
+
+ private final String LONG_TEXT = "testertestertest";
+ private final String SHORT_TEXT = "tes";
+ // private final static int USER_COUNT = 3;
+ private String suffix;
+
+ public RegistrationTest() {
+ Date date = new Date();
+ // suffix is needed to allow tests to be run repeatedly
+ suffix = Long.toString(date.getTime() % 10000000);
+ }
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ browser = startBrowser();
+ }
+
+ @Override
+ @AfterMethod
+ public void tearDown() {
+ stopBrowser();
+ }
+
+ @Test
+ public void testVerify() {
+ register("tester", "tester", "password", "password1");
+ // assertTrue("Error message expected.",
+ // browser.isElementPresent(get("REGISTRATION_VERIFY_MESSAGE")));
+ assertTrue("Password verification failed.", browser
+ .isTextPresent(getProperty("REGISTRATION_REENTER_MESSAGE")));
+ }
+
+ @Test
+ public void testLongText() {
+ register(LONG_TEXT, "tester", "password", "password");
+ assertTrue("Username validation failed.", browser
+ .isTextPresent(getProperty("REGISTRATION_LENGTH_MESSAGE")));
+ }
+
+ @Test
+ public void testShortText() {
+ register(SHORT_TEXT, "tester", "password", "password");
+ assertTrue("Username validation failed.", browser
+ .isTextPresent(getProperty("REGISTRATION_LENGTH_MESSAGE")));
+ }
+
+ @Test
+ public void testDuplicateUser() {
+ String username = "tester" + suffix;
+ register(username, "tester", "password", "password");
+ assertTrue("Navigation after succesful registration failed.", browser
+ .getLocation().contains(getProperty("HOME_PAGE")));
+ // assertTrue("Registration failed.",
+ // browser.isTextPresent(MessageFormat.format(get("REGISTRATION_SUCCESSFUL_MESSAGE"),
+ // username)));
+ register(username, "tester", "password", "password");
+ assertTrue("Registered 2 users with the same username.", browser
+ .isTextPresent(MessageFormat.format(
+ getProperty("REGISTRATION_USER_EXISTS_MESSAGE"), username)));
+ }
+
+ @Test
+ public void standardRegistrationTest() {
+ String username = "john" + suffix;
+ String name = "John Doe";
+ String password = "password";
+ register(username, name, password, password);
+ assertTrue("Navigation after succesful registration failed.", browser
+ .getLocation().contains(getProperty("HOME_PAGE")));
+ // assertTrue("Registration failed.",
+ // browser.isTextPresent(MessageFormat.format(get("REGISTRATION_SUCCESSFUL_MESSAGE"),
+ // username)));
+ // try logging in to verify registration
+ assertTrue("Login failed.", login(username, password));
+ }
+
+ private void register(String username, String name, String password,
+ String verify) {
+ browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("Unable to load home page.", getProperty("PAGE_TITLE"), browser
+ .getTitle());
+ browser.click(getProperty("REGISTRATION"));
+ browser.waitForPageToLoad(TIMEOUT);
+ browser.type(getProperty("REGISTRATION_USERNAME"), username);
+ browser.type(getProperty("REGISTRATION_NAME"), name);
+ browser.type(getProperty("REGISTRATION_PASSWORD"), password);
+ browser.type(getProperty("REGISTRATION_VERIFY"), verify);
+ browser.click(getProperty("REGISTRATION_SUBMIT"));
+ waitForForm();
+ }
+
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/RegistrationTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SeleniumBookingTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SeleniumBookingTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SeleniumBookingTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,151 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import static org.testng.AssertJUnit.assertTrue;
+import static org.testng.AssertJUnit.fail;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
+
+import com.thoughtworks.selenium.Wait;
+
+/**
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class SeleniumBookingTest extends SeamSeleniumTest {
+
+ private final String DEFAULT_USERNAME = "demo";
+ private final String DEFAULT_PASSWORD = "demo";
+
+ @Override
+ @BeforeMethod
+ public void setUp() {
+ super.setUp();
+ assertTrue("Login failed.", login());
+ }
+
+ @Override
+ @AfterMethod
+ public void tearDown() {
+ logout();
+ super.tearDown();
+ }
+
+ public boolean login() {
+ return login(DEFAULT_USERNAME, DEFAULT_PASSWORD);
+ }
+
+ public boolean login(String username, String password) {
+ if (isLoggedIn()) {
+ fail("User already logged in.");
+ }
+ browser.open(CONTEXT_PATH + getProperty("HOME_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ if (!browser.getTitle().equals(getProperty("PAGE_TITLE"))) {
+ return false;
+ }
+ browser.type(getProperty("LOGIN_USERNAME_FIELD"), username);
+ browser.type(getProperty("LOGIN_PASSWORD_FIELD"), password);
+ browser.click(getProperty("LOGIN_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ return isLoggedIn();
+ }
+
+ public void logout() {
+ if (isLoggedIn()) {
+ browser.click(getProperty("LOGOUT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+ }
+
+ public boolean isLoggedIn() {
+ return browser.isElementPresent(getProperty("LOGOUT"));
+ }
+
+ public void enterSearchQuery(String query) {
+ if (getProperty("USE_AJAX_SEARCH").equalsIgnoreCase("FALSE")) {
+ enterSearchQueryWithoutAJAX(query);
+ } else {
+ if (getProperty("USE_SEARCH_BUTTON").equalsIgnoreCase("TRUE")) {
+ enterSearchQueryUsingAJAX(query, true);
+ } else {
+ enterSearchQueryUsingAJAX(query, false);
+ }
+ }
+ }
+
+ public void enterSearchQueryUsingAJAX(String query, boolean click) {
+ browser.type(getProperty("SEARCH_STRING_FIELD"), "");
+ browser.type(getProperty("SEARCH_STRING_FIELD"), query.substring(0, query
+ .length() - 1));
+ browser.typeKeys(getProperty("SEARCH_STRING_FIELD"), query.substring(query
+ .length() - 1));
+ if (click) {
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ }
+ // wait for javascript to show spinner
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ }
+ // wait for page to get updated
+ new Wait() {
+ @Override
+ public boolean until() {
+ return !browser.isVisible(getProperty("SPINNER"));
+ }
+ }.wait("Spinner hasn't come out.");
+ new Wait() {
+ @Override
+ public boolean until() {
+ return (browser.isElementPresent(getProperty("SEARCH_RESULT_TABLE")) || browser
+ .isElementPresent(getProperty("NO_HOTELS_FOUND")));
+ }
+ }.wait("Search results not found.");
+ }
+
+ public void enterSearchQueryWithoutAJAX(String query) {
+ browser.type(getProperty("SEARCH_STRING_FIELD"), "");
+ browser.type(getProperty("SEARCH_STRING_FIELD"), query);
+ browser.click(getProperty("SEARCH_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ public void waitForForm() {
+ if (getProperty("USE_ICEFACES_FORMS").equalsIgnoreCase("TRUE")) {
+ new Wait() {
+ @Override
+ public boolean until() {
+ return !browser.isElementPresent("xpath=//*[@style='cursor: wait;']")
+ && browser.isElementPresent(getProperty("FOOTER"));
+ }
+ }.wait("Page was not refreshed.");
+ } else {
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SeleniumBookingTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SimpleBookingTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SimpleBookingTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SimpleBookingTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,184 @@
+/*
+ * 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.common.test.booking.selenium;
+
+import java.text.MessageFormat;
+
+import org.testng.annotations.Test;
+
+import static org.testng.AssertJUnit.*;
+
+/**
+ * This class tests booking functionality of the example.
+ *
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public class SimpleBookingTest extends SeleniumBookingTest {
+
+ protected final String EXPECTED_NAME = "Demo User";
+ protected final String CREDIT_CARD = "0123456789012345";
+ protected final String CREDIT_CARD_NAME = "visa";
+
+ /**
+ * Tries searching for non existing hotel.
+ */
+ @Test(enabled = true)
+ public void invalidSearchStringTest() {
+ enterSearchQuery("NonExistingHotel");
+ assertTrue("Search failed.", browser
+ .isElementPresent(getProperty("NO_HOTELS_FOUND")));
+ }
+
+ /**
+ * Simply books hotel.
+ */
+ @Test(enabled = true)
+ public void simpleBookingTest() {
+ String hotelName = "W Hotel";
+ int confirmationNumber;
+ confirmationNumber = bookHotel(hotelName);
+ assertTrue("Booking with confirmation number " + confirmationNumber
+ + " not found.", browser.isElementPresent(MessageFormat.format(
+ getProperty("BOOKING_TABLE_ITEM"), confirmationNumber, hotelName)));
+ }
+
+ /**
+ * Tries booking hotel with incorrect dates.
+ */
+ @Test(enabled = true)
+ public void invalidDatesTest() {
+ String hotelName = "W Hotel";
+ enterSearchQuery(hotelName);
+ browser.click(getProperty("SEARCH_RESULT_TABLE_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // hotel page
+ browser.click(getProperty("BOOKING_BOOK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // booking page
+ String checkOut = browser.getValue(getProperty("HOTEL_CHECKOUT_DATE_FIELD"));
+ populateBookingFields();
+ // switch check in and check out date
+ browser.type(getProperty("HOTEL_CHECKIN_DATE_FIELD"), checkOut);
+ browser.click(getProperty("HOTEL_PROCEED"));
+ waitForForm();
+ assertTrue("Date verification #1 failed.", browser
+ .isTextPresent(getProperty("BOOKING_INVALID_DATE_MESSAGE1")));
+ assertTrue("Check-out date error message expected.", browser
+ .isElementPresent(getProperty("HOTEL_CHECKOUT_DATE_MESSAGE")));
+ // set check in to past
+ browser.type(getProperty("HOTEL_CHECKIN_DATE_FIELD"), "01/01/1970");
+ browser.click(getProperty("HOTEL_PROCEED"));
+ waitForForm();
+ assertTrue("Date verification #2 failed.", browser
+ .isTextPresent(getProperty("BOOKING_INVALID_DATE_MESSAGE2")));
+ assertTrue("Checkin-date error message expected.", browser
+ .isElementPresent(getProperty("HOTEL_CHECKIN_DATE_MESSAGE")));
+ }
+
+ /**
+ * This test verifies that user gets right confirmation number when
+ * canceling order. https://jira.jboss.org/jira/browse/JBSEAM-3288
+ */
+ @Test(enabled = true)
+ public void testJBSEAM3288() {
+ String[] hotelNames = new String[] { "Doubletree", "Hotel Rouge",
+ "Conrad Miami" };
+ int[] confirmationNumbers = new int[3];
+ // make 3 bookings
+ for (int i = 0; i < 3; i++) {
+ int confirmationNumber = bookHotel(hotelNames[i]);
+ confirmationNumbers[i] = confirmationNumber;
+ }
+ // assert that there bookings are listed in hotel booking list
+ for (int i = 0; i < 3; i++) {
+ assertTrue("Expected booking #" + i + " not present", browser
+ .isElementPresent(MessageFormat.format(
+ getProperty("BOOKING_TABLE_ITEM"), confirmationNumbers[i],
+ hotelNames[i])));
+ }
+ // cancel all the reservations
+ for (int i = 2; i >= 0; i--) {
+ browser.click(MessageFormat.format(getProperty("BOOKING_TABLE_ITEM_LINK"),
+ confirmationNumbers[i], hotelNames[i]));
+ browser.waitForPageToLoad(TIMEOUT);
+ assertTrue("Booking canceling failed", browser
+ .isTextPresent(MessageFormat.format(
+ getProperty("BOOKING_CANCELLED_MESSAGE"),
+ confirmationNumbers[i])));
+ }
+
+ }
+
+ protected int bookHotel(String hotelName, int bed, int smoking,
+ String creditCard, String creditCardName) {
+ if (!isLoggedIn())
+ fail();
+ if (!browser.isElementPresent(getProperty("SEARCH_SUBMIT"))) {
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+ enterSearchQuery(hotelName);
+ browser.click(getProperty("SEARCH_RESULT_TABLE_FIRST_ROW_LINK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // booking page
+ browser.click(getProperty("BOOKING_BOOK"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // hotel page
+ populateBookingFields(bed, smoking, creditCard, creditCardName);
+ browser.click(getProperty("HOTEL_PROCEED"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // confirm page
+ browser.click(getProperty("HOTEL_CONFIRM"));
+ browser.waitForPageToLoad(TIMEOUT);
+ // main page
+ String message = browser.getText(getProperty("HOTEL_MESSAGE"));
+ assertTrue("Booking failed. Confirmation message does not match.", message.matches(
+ MessageFormat.format(getProperty("BOOKING_CONFIRMATION_MESSAGE"), EXPECTED_NAME, hotelName)));
+ String[] messageParts = message.split(" ");
+ int confirmationNumber = Integer
+ .parseInt(messageParts[messageParts.length - 1]);
+ return confirmationNumber;
+ }
+
+ protected int bookHotel(String hotelName) {
+ return bookHotel(hotelName, 2, 0, CREDIT_CARD, CREDIT_CARD_NAME);
+ }
+
+ protected void populateBookingFields(int bed, int smoking,
+ String creditCard, String creditCardName) {
+ browser.select(getProperty("HOTEL_BED_FIELD"),
+ getProperty("HOTEL_BED_FIELD_SELECT_CRITERIA") + bed);
+ if (smoking == 1) {
+ browser.check(getProperty("HOTEL_SMOKING_1"));
+ } else {
+ browser.check(getProperty("HOTEL_SMOKING_2"));
+ }
+ browser.type(getProperty("HOTEL_CREDIT_CARD"), creditCard);
+ browser.type(getProperty("HOTEL_CREDIT_CARD_NAME"), creditCardName);
+ }
+
+ protected void populateBookingFields() {
+ populateBookingFields(2, 0, CREDIT_CARD, CREDIT_CARD_NAME);
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/booking/selenium/SimpleBookingTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/numberguess/selenium/CommonNumberGuessTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,108 @@
+/*
+ * 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.common.test.numberguess.selenium;
+
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import static org.testng.AssertJUnit.*;
+
+/**
+ *
+ * @author Jozef Hartinger
+ *
+ */
+public class CommonNumberGuessTest extends SeamSeleniumTest
+{
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ @Test
+ public void smartTest()
+ {
+
+ int min;
+ int max;
+ int guess;
+ int i = 0;
+
+ while (browser.getLocation().contains(getProperty("GUESS_LOCATION")))
+ {
+ if (i > 9)
+ {
+ fail("Game should not be longer than 10 guesses");
+ }
+ min = Integer.parseInt(browser.getText(getProperty("GUESS_MIN_VALUE")));
+ max = Integer.parseInt(browser.getText(getProperty("GUESS_MAX_VALUE")));
+ guess = min + ((max - min) / 2);
+ enterGuess(guess);
+ i++;
+ }
+ assertTrue("Win page expected after playing smart.", isOnWinPage());
+ }
+
+ @Test
+ public void linearTest()
+ {
+ int guess = 0;
+
+ while (browser.getLocation().contains(getProperty("GUESS_LOCATION")))
+ {
+ enterGuess(++guess);
+ assertTrue("Guess count exceeded.", guess <= 10);
+ }
+ if (guess < 10)
+ {
+ assertTrue("Player should not lose before 10th guess.", isOnWinPage());
+ }
+ else
+ {
+ assertTrue("After 10th guess player should lose or win.", isOnLosePage() || isOnWinPage());
+ }
+
+ }
+
+ protected void enterGuess(int guess)
+ {
+ browser.type(getProperty("GUESS_FIELD"), String.valueOf(guess));
+ browser.click(getProperty("GUESS_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected boolean isOnWinPage()
+ {
+ return browser.getLocation().contains(getProperty("WIN_LOCATION"));
+ }
+
+ protected boolean isOnLosePage()
+ {
+ return browser.getLocation().contains(getProperty("LOSE_LOCATION"));
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,130 @@
+/*
+ * 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.common.test.seampay.selenium;
+
+import static org.testng.AssertJUnit.*;
+
+import java.math.BigDecimal;
+import java.text.MessageFormat;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import org.jboss.seam.example.common.test.selenium.SeamSeleniumTest;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+
+/**
+ *
+ * @author jharting
+ *
+ */
+public class PaymentTest extends SeamSeleniumTest
+{
+
+ protected NumberFormat nf = NumberFormat.getNumberInstance();
+
+ @Override
+ @BeforeMethod
+ public void setUp()
+ {
+ super.setUp();
+ browser.open(CONTEXT_PATH + getProperty("MAIN_PAGE"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ /**
+ * Submits new payment and asserts that remaining account balance is correct.
+ *
+ * @throws ParseException
+ */
+ @Test
+ public void payOnceTest() throws ParseException
+ {
+ int account = 0;
+ BigDecimal amount = new BigDecimal(10);
+ String to = "foo";
+ String accountLinkLocator = MessageFormat.format(getProperty("ACCOUNT_TABLE_LINK"), account);
+ String accountBalanceLocator = MessageFormat.format(getProperty("ACCOUNT_TABLE_BALANCE"), account);
+
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ BigDecimal expectedBalance = BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator)));
+ submitPayment(to, amount.toString(), getProperty("PAYMENT_ONLY_ONCE_RADIO"));
+ assertTrue("Scheduled payment not confirmed.", browser.isTextPresent(MessageFormat.format(getProperty("PAYMENT_CONFIRMATION_MESSAGE"), to)));
+ assertEquals("Invalid count of payments.", 1, browser.getXpathCount(getProperty("PAYMENTS_COUNT")));
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ assertEquals("No money were subtracted from account", expectedBalance.subtract(amount), BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator))));
+ }
+
+ /**
+ * Submits new payment with one minute interval and verifies the balance
+ * after 60 seconds
+ *
+ * @throws ParseException
+ * @throws InterruptedException
+ */
+ @Test
+ public void payEveryMinuteTest() throws ParseException, InterruptedException
+ {
+ int account = 1;
+ BigDecimal amount = new BigDecimal(10);
+ String to = "foo";
+ String accountLinkLocator = MessageFormat.format(getProperty("ACCOUNT_TABLE_LINK"), account);
+ String accountBalanceLocator = MessageFormat.format(getProperty("ACCOUNT_TABLE_BALANCE"), account);
+
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ // create new payment
+ submitPayment(to, amount.toString(), getProperty("PAYMENT_EVERY_MINUTE_RADIO"));
+ assertTrue("Scheduled payment not confirmed.", browser.isTextPresent(MessageFormat.format(getProperty("PAYMENT_CONFIRMATION_MESSAGE"), to)));
+ assertEquals("Invalid count of payments.", 1, browser.getXpathCount(getProperty("PAYMENTS_COUNT")));
+ // wait
+ Thread.sleep(5000);
+ // get first balance
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ BigDecimal firstBalance = BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator)));
+ // wait 60 seconds
+ Thread.sleep(60000);
+ // get second balance
+ browser.click(accountLinkLocator);
+ browser.waitForPageToLoad(TIMEOUT);
+ BigDecimal secondBalance = BigDecimal.valueOf(parseBalance(browser.getText(accountBalanceLocator)));
+ BigDecimal expectedSecondBalance = firstBalance.subtract(amount);
+ assertEquals("No money were subtracted from account after a minute", expectedSecondBalance, secondBalance);
+ }
+
+ protected void submitPayment(String to, String amount, String radio)
+ {
+ browser.type(getProperty("PAYMENT_TO_FIELD"), to);
+ browser.type(getProperty("PAYMENT_AMOUNT_FIELD"), amount.toString());
+ browser.check(radio);
+ browser.click(getProperty("PAYMENT_SUBMIT"));
+ browser.waitForPageToLoad(TIMEOUT);
+ }
+
+ protected Double parseBalance(String text) throws ParseException
+ {
+ String number = text.replaceAll("\\$", "").trim();
+ return (Double) nf.parse(number);
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/seampay/selenium/PaymentTest.java
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSelenium.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSelenium.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSelenium.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,72 @@
+/*
+ * 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.common.test.selenium;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+
+/**
+ * This class slightly enhaces a Selenium API for controlling a browser.
+ * @author Jozef Hartinger
+ *
+ */
+public class SeamSelenium extends DefaultSelenium
+{
+
+ protected String timeout = "30000";
+
+ public SeamSelenium(String serverHost, int serverPort, String browserStartCommand, String browserURL)
+ {
+ super(serverHost, serverPort, browserStartCommand, browserURL);
+ }
+
+ @Override
+ public void setTimeout(String timeout) {
+ super.setTimeout(timeout);
+ this.timeout = timeout;
+ }
+
+ /**
+ * Same as click method but waits for page to load after clicking. Default timeout can be changed by setTimeout() method.
+ * @param locator
+ */
+ public void clickAndWait(String locator) {
+ super.click(locator);
+ super.waitForPageToLoad(timeout);
+ }
+
+ /**
+ * Simulates a user pressing "back" button and waits for page to load. Default timeout can be changed by setTimeout() method.
+ */
+ public void goBackAndWait() {
+ super.goBack();
+ super.waitForPageToLoad(timeout);
+ }
+
+ /**
+ * Simulates a user pressing "refresh" button and waits for page to load. Default timeout can be changed by setTimeout() method.
+ */
+ public void refreshAndWait() {
+ super.refresh();
+ super.waitForPageToLoad(timeout);
+ }
+
+}
Added: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSeleniumTest.java
===================================================================
--- branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSeleniumTest.java (rev 0)
+++ branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSeleniumTest.java 2009-02-18 16:07:30 UTC (rev 10055)
@@ -0,0 +1,107 @@
+/*
+ * 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.common.test.selenium;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static org.testng.AssertJUnit.*;
+
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+
+/**
+ * Base class for all Seam based selenium tests.
+ * @author jbalunas
+ * @author jharting
+ *
+ */
+public abstract class SeamSeleniumTest {
+
+ private static String HOST;
+ private static int PORT;
+ private static String BROWSER;
+ private static String BROWSER_URL;
+ private static String SPEED;
+ public static String TIMEOUT;
+ private static String PROPERTY_FILE;
+ protected String CONTEXT_PATH = "";
+ private static Properties properties = new Properties();
+ private static boolean propertiesLoaded = false;
+
+ protected SeamSelenium browser;
+
+ @BeforeClass
+ @Parameters( { "selenium.host", "selenium.server.port", "selenium.browser",
+ "selenium.browser.url", "selenium.speed", "selenium.timeout",
+ "PROPERTY_FILE", "CONTEXT_PATH" })
+ public void setParameters(String host, String port, String browser,
+ String browserUrl, String speed, String timeout, String propertyFile, @Optional("") String contextPath) {
+ HOST = host;
+ PORT = Integer.parseInt(port);
+ BROWSER = browser;
+ BROWSER_URL = browserUrl;
+ SPEED = speed;
+ TIMEOUT = timeout;
+ PROPERTY_FILE = propertyFile;
+ CONTEXT_PATH = contextPath;
+ }
+
+ @BeforeMethod
+ public void setUp() {
+ browser = startBrowser();
+ }
+
+ @AfterMethod
+ public void tearDown() {
+ stopBrowser();
+ }
+
+ public SeamSelenium startBrowser() {
+ SeamSelenium newBrowser = new SeamSelenium(HOST, PORT, BROWSER, BROWSER_URL);
+ newBrowser.start();
+ newBrowser.allowNativeXpath("false");
+ newBrowser.setSpeed(SPEED);
+ newBrowser.setTimeout(TIMEOUT);
+ return newBrowser;
+ }
+
+ public void stopBrowser() {
+ browser.stop();
+ }
+
+ public String getProperty(String key) {
+ if (!propertiesLoaded) {
+ try {
+ properties.load(SeamSeleniumTest.class.getResourceAsStream(PROPERTY_FILE));
+ propertiesLoaded = true;
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail("Property file not found.");
+ }
+ }
+ return properties.getProperty(key, "Property not found: " + key);
+ }
+}
Property changes on: branches/enterprise/JBPAPP_4_3_FP01/src/test/ftest/src/main/org/jboss/seam/example/common/test/selenium/SeamSeleniumTest.java
___________________________________________________________________
Name: svn:executable
+ *
More information about the seam-commits
mailing list