geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r1030366 - in /geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src: main/webapp/index.xhtml main/webapp/sections/header.xhtml test/java/org/apache/geronimo/testsuite/myfaces2/TestMyfaces2.java
Date Wed, 03 Nov 2010 09:07:47 GMT
Author: xuhaihong
Date: Wed Nov  3 09:07:46 2010
New Revision: 1030366

URL: http://svn.apache.org/viewvc?rev=1030366&view=rev
Log:
1. Use fixed id for using selenium easily
2. Wrap the commandButtion with form element

Modified:
    geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/index.xhtml
    geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/sections/header.xhtml
    geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/test/java/org/apache/geronimo/testsuite/myfaces2/TestMyfaces2.java

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/index.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/index.xhtml?rev=1030366&r1=1030365&r2=1030366&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/index.xhtml
(original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/index.xhtml
Wed Nov  3 09:07:46 2010
@@ -37,7 +37,7 @@
 	
 	<ui:define name="content">
 	<h3> Please input a number, or else you can't get a reply!</h3>
-		<h:form>
+		<h:form id="form2">
 			<h:outputText value="RMB:"/>
 			<h:inputText id="in" value="#{ConverterBean.value}">
 				

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/sections/header.xhtml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/sections/header.xhtml?rev=1030366&r1=1030365&r2=1030366&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/sections/header.xhtml
(original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/main/webapp/sections/header.xhtml
Wed Nov  3 09:07:46 2010
@@ -33,9 +33,11 @@
 		 <div id="top" class="top"><ui:insert name="top"></ui:insert>
 	</div>
 	<div id="left"><ui:insert name="left">
+	<h:form id="form1">
 		<h:commandButton id="button1" value="Show Exchange Rate"
-			onclick="jsf.ajax.request(this, event, {execute: 'button1', render: 'pg1'}); return false;"
+			onclick="jsf.ajax.request(this, event, {execute: '@this', render: 'pg1'}); return false;"
 			actionListener="#{ConverterBean.toggle}" />
+	</h:form>		
 		<h:panelGroup id="pg1">
 			<h:dataTable id="out1" value="#{ConverterBean.currencyList}" var="item"
 				rendered="#{ConverterBean.render}">
@@ -52,7 +54,7 @@
 					<h:outputText value="#{item.rate}" />
 				</h:column>
 			</h:dataTable>
-		</h:panelGroup>
+		</h:panelGroup>		
 	</ui:insert>
 	</div>
       </ui:composition>

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/test/java/org/apache/geronimo/testsuite/myfaces2/TestMyfaces2.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/test/java/org/apache/geronimo/testsuite/myfaces2/TestMyfaces2.java?rev=1030366&r1=1030365&r2=1030366&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/test/java/org/apache/geronimo/testsuite/myfaces2/TestMyfaces2.java
(original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/jsf2.0-test/src/test/java/org/apache/geronimo/testsuite/myfaces2/TestMyfaces2.java
Wed Nov  3 09:07:46 2010
@@ -30,8 +30,8 @@ public class TestMyfaces2 extends Seleni
         
         assertTrue(selenium.isTextPresent("Converter-A Facelets and AJAX Example In JSF2.0"));
         assertTrue(selenium.isTextPresent("Please input a number, or else you can't get a
reply!"));
-        selenium.type("j_id1983071270_7ac218fa:in", "1000");
-        selenium.keyUp("j_id1983071270_7ac218fa:in", "0");
+        selenium.type("form2:in", "1000");
+        selenium.keyUp("form2:in", "0");
         Thread.sleep(5000);
         
         assertTrue(selenium.isTextPresent("<USD>"));
@@ -45,7 +45,7 @@ public class TestMyfaces2 extends Seleni
         assertTrue(selenium.isTextPresent("103.37"));
         assertTrue(selenium.isTextPresent("90.08"));
 
-        selenium.click("button1");
+        selenium.click("form1:button1");
         Thread.sleep(5000);
 
         assertTrue(selenium.isTextPresent("USD"));



Mime
View raw message