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

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jan 7 04:50:45 EST 2009


Author: jharting
Date: 2009-01-07 04:50:45 -0500 (Wed, 07 Jan 2009)
New Revision: 9879

Added:
   trunk/src/test/ftest/examples/blog/
   trunk/src/test/ftest/examples/blog/build.xml
   trunk/src/test/ftest/examples/blog/jboss-embedded.xml
   trunk/src/test/ftest/examples/blog/jboss.xml
   trunk/src/test/ftest/examples/blog/src/
   trunk/src/test/ftest/examples/blog/src/org/
   trunk/src/test/ftest/examples/blog/src/org/jboss/
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
   trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
Modified:
   trunk/examples/blog/view/404.xhtml
   trunk/examples/blog/view/entry.xhtml
   trunk/examples/blog/view/index.xhtml
   trunk/examples/blog/view/login.xhtml
   trunk/examples/blog/view/menu.xhtml
   trunk/examples/blog/view/nav.xhtml
   trunk/examples/blog/view/search.xhtml
   trunk/src/test/ftest/build.xml
Log:
JBSEAM-3690 Added tests for blog example

Modified: trunk/examples/blog/view/404.xhtml
===================================================================
--- trunk/examples/blog/view/404.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/404.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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: trunk/examples/blog/view/entry.xhtml
===================================================================
--- trunk/examples/blog/view/entry.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/entry.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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: trunk/examples/blog/view/index.xhtml
===================================================================
--- trunk/examples/blog/view/index.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/index.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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>
-                  <s:link view="/entry.xhtml" rendered="#{blogEntry.excerpt!=null}" propagation="none"
+                  <s:link id="link" view="/entry.xhtml" rendered="#{blogEntry.excerpt!=null}" propagation="none"
                       value="Read more...">
                      <f:param name="blogEntryId" value="#{blogEntry.id}"/>
                   </s:link>

Modified: trunk/examples/blog/view/login.xhtml
===================================================================
--- trunk/examples/blog/view/login.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/login.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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: trunk/examples/blog/view/menu.xhtml
===================================================================
--- trunk/examples/blog/view/menu.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/menu.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -1,12 +1,12 @@
-<h:form xmlns="http://www.w3.org/1999/xhtml"
+<h:form id="searchForm" xmlns="http://www.w3.org/1999/xhtml"
         xmlns:s="http://jboss.com/products/seam/taglib" 
         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"/>
         <s:conversationPropagation type="none"/> 
     </span>
     

Modified: trunk/examples/blog/view/nav.xhtml
===================================================================
--- trunk/examples/blog/view/nav.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/nav.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -4,11 +4,11 @@
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core">
 
-     <s:link view="/search.xhtml" value="[All posts]" propagation="none">
+     <s:link id="allPosts" view="/search.xhtml" value="[All posts]" propagation="none">
          <f:param name="searchPattern" value=""/>
      </s:link>     
-     <s:link view="/index.xhtml" value="[Recent posts]"   propagation="none" />
-     <s:link view="/post.xhtml"  value="[Write new post]" propagation="none" />
-     <s:link view="/index.xml"   value="[Atom feed]"      propagation="none" />
+     <s:link id="recentPosts" view="/index.xhtml" value="[Recent posts]"   propagation="none" />
+     <s:link id="newPost" view="/post.xhtml"  value="[Write new post]" propagation="none" />
+     <s:link id="atomFeed" view="/index.xml"   value="[Atom feed]"      propagation="none" />
      
 </span>

Modified: trunk/examples/blog/view/search.xhtml
===================================================================
--- trunk/examples/blog/view/search.xhtml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/examples/blog/view/search.xhtml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -8,10 +8,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>
-            <s:link view="/entry.xhtml" propagation="none" value="#{blogEntry.title}">
+            <s:link id="link" view="/entry.xhtml" propagation="none" value="#{blogEntry.title}">
                <f:param name="blogEntryId" value="#{blogEntry.id}"/>
             </s:link>
             posted on 

Modified: trunk/src/test/ftest/build.xml
===================================================================
--- trunk/src/test/ftest/build.xml	2009-01-06 23:57:08 UTC (rev 9878)
+++ trunk/src/test/ftest/build.xml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -50,6 +50,7 @@
    	  <property name="container" value="jboss" />
       <antcall target="start.selenium.server"/>
       <!-- Execute tests for all examples jboss-->
+   	  <testexample name="blog" />
       <testexample name="booking" />
       <testexample name="dvdstore" />
       <testexample name="contactlist" />
@@ -69,6 +70,7 @@
     <property name="container" value="jboss-embedded" />
     <antcall target="start.selenium.server"/>
    	<!-- Execute tests for all examples on jboss-embedded -->
+   	<testexample name="blog" />
     <testexample name="dvdstore" />
     <testexample name="seampay" />
     <testexample name="booking" />
@@ -117,6 +119,7 @@
    </target>
 
    <target name="cleanall">
+   	  <cleanexample name="blog" />
       <cleanexample name="booking" />
       <cleanexample name="dvdstore" />
       <cleanexample name="contactlist" />
@@ -132,6 +135,7 @@
    </target>
 
    <target name="undeployall">
+   	  <undeployexample name="blog" />
       <undeployexample name="booking" />
       <undeployexample name="dvdstore" />
       <undeployexample name="contactlist" />

Added: trunk/src/test/ftest/examples/blog/build.xml
===================================================================
--- trunk/src/test/ftest/examples/blog/build.xml	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/build.xml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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="blog.ftest.build" basedir="." default="build">
+   <property name="example.name" value="blog"/>
+   <property name="jboss.deploy.target" value="deploy"/>
+   <property name="jboss.undeploy.target" value="undeploy"/>
+   <property name="jboss.example.ready.check.url" value="seam-blog/"/>
+   <property name="jboss-embedded.deploy.target" value="tomcat.deploy"/>
+   <property name="jboss-embedded.undeploy.target" value="tomcat.undeploy"/>
+   <property name="jboss-embedded.example.ready.check.url" value="jboss-seam-blog/"/>
+   
+   <import file="../build.xml" />
+</project>


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

Added: trunk/src/test/ftest/examples/blog/jboss-embedded.xml
===================================================================
--- trunk/src/test/ftest/examples/blog/jboss-embedded.xml	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/jboss-embedded.xml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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-embedded">
+      <parameter name="PROPERTY_FILE" value="/org/jboss/seam/example/blog/test/selenium/blog.properties" />
+      <parameter name="CONTEXT_PATH" value="/jboss-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: trunk/src/test/ftest/examples/blog/jboss-embedded.xml
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/blog/jboss.xml
===================================================================
--- trunk/src/test/ftest/examples/blog/jboss.xml	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/jboss.xml	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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: trunk/src/test/ftest/examples/blog/jboss.xml
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + text/plain

Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/NewEntryTest.java	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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 + "/entry/" + 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")));      
+   }
+}


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

Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SearchTest.java	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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")));
+      
+   }
+
+}


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

Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/SeleniumBlogTest.java	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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);
+      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);
+   }
+
+}


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

Added: trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties
===================================================================
--- trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties	                        (rev 0)
+++ trunk/src/test/ftest/examples/blog/src/org/jboss/seam/example/blog/test/selenium/blog.properties	2009-01-07 09:50:45 UTC (rev 9879)
@@ -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


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




More information about the seam-commits mailing list