Package org.jboss.jsfunit.jsfsession

Examples of org.jboss.jsfunit.jsfsession.JSFSession


*/
public class AjaxKeepaliveTest extends ServletTestCase
{
   public void testWithoutKeepalive() throws IOException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/keepAlive.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      JSFServerSession server = jsfSession.getJSFServerSession();

      client.type("form1:firstAddend", '2');
      assertEquals(2, server.getManagedBeanValue("#{rsBean.addent1}"));
     
      client.type("form1:secondAddend", '3');
View Full Code Here


      assertNull(server.getManagedBeanValue("#{rsBean.sum}"));
   }
  
   public void testWithKeepalive() throws IOException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/keepAlive.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      JSFServerSession server = jsfSession.getJSFServerSession();

      client.type("form2:firstAddend", '2');
      assertEquals(2, server.getManagedBeanValue("#{rsBean2.addent1}"));
     
      client.type("form2:secondAddend", '3');
View Full Code Here

      return new TestSuite( AjaxSupportTest.class );
   }

   public void testAjaxSupportWithOnkeyup() throws IOException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/support.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      JSFServerSession server = jsfSession.getJSFServerSession();

      client.type("name", 'H');   
      client.type("name", 'e');
      client.type("name", 'l');
      client.type("name", 'l');
View Full Code Here

      assertEquals("Hello World", valueOfSpan)
   }
  
   public void testAjaxSupportWithOnchange() throws IOException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/support.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      JSFServerSession server = jsfSession.getJSFServerSession();

      client.setValue("name", "Hello World");
      Object userBeanValue = server.getManagedBeanValue("#{userBean.name}");
      assertEquals("Hello World", userBeanValue);
     
View Full Code Here

      return new TestSuite( AjaxCommandButtonTest.class );
   }

   public void testCommandButton() throws IOException, SAXException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/commandButton.jsf");
      JSFServerSession server = jsfSession.getJSFServerSession();
      JSFClientSession client = jsfSession.getJSFClientSession();
     
      client.setValue("inputName", "World");    
      client.click("SayHelloButton");
      Object userBeanValue = server.getManagedBeanValue("#{userBean.name}");
      assertEquals("World", userBeanValue);
View Full Code Here

*/
public class RichDataFilterSliderTest extends ServletTestCase
{
   public void testDataFilterSlider() throws IOException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/dataFilterSlider.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      RichFacesClient richClient = new RichFacesClient(client);
     
      richClient.setDataFilterSlider("slider_1", "60000")

      // The data table is built with random data, so there's nothing to
View Full Code Here

   }
  
   public static JSFSession makeSession(WebClientSpec wcSpec) throws IOException
   {
      wcSpec.getWebClient().setCssErrorHandler(silentHandler);
      return new JSFSession(wcSpec);
   }
View Full Code Here

*/
public class RichDropDownMenuTest extends ServletTestCase
{
   public void testDropDownMenuWithIE6() throws IOException, SAXException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/dropDownMenu.jsf", BrowserVersion.INTERNET_EXPLORER_6_0);
      JSFClientSession client = jsfSession.getJSFClientSession();
      JSFServerSession server = jsfSession.getJSFServerSession();
     
      client.click("New");
      String selection = (String)server.getManagedBeanValue("#{ddmenu.current}");
      assertEquals("New", selection);
     
View Full Code Here

      assertEquals("Exit", selection);
   }
  
   public void testDropDownMenu() throws IOException, SAXException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/dropDownMenu.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      JSFServerSession server = jsfSession.getJSFServerSession();
     
      client.click("New");
      String selection = (String)server.getManagedBeanValue("#{ddmenu.current}");
      assertEquals("New", selection);
     
View Full Code Here

      assertEquals("Exit", selection);
   }
  
   public void testClickHomePageLink() throws IOException, SAXException
   {
      JSFSession jsfSession = JSFSessionFactory.makeSession("/richfaces/dropDownMenu.jsf");
      JSFClientSession client = jsfSession.getJSFClientSession();
      jsfSession.getWebClient().setThrowExceptionOnFailingStatusCode(false);
      client.click("jsfunitHomePageLink");
      String newUrl = client.getContentPage().getWebResponse().getUrl().toString();
      assertEquals("http://www.jboss.org/jsfunit/", newUrl);
   }
View Full Code Here

TOP

Related Classes of org.jboss.jsfunit.jsfsession.JSFSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.