This content has been marked as final.
Show 2 replies
-
1. Re: How to start a new page in test...
tvibes Feb 17, 2012 11:31 AM (in response to hantsy)Hi,
you could try this,
{code}
@Test
@InitialPage("/login.faces")
public void testLoginPage() throws Exception{
//start new page "/another.faces"
JSFSession session = new JSFSession("/another.faces");
JSFClientSession client = session.getJSFClientSession();
JSFServerSession server = session.getJSFServerSession();
//Assertion here
}
{code}
(JSFUnit 1.3 style but still works in JSFUnit 2 :-) )
-
2. Re: How to start a new page in test...
kragoth Feb 21, 2012 7:12 PM (in response to tvibes)Pretend you are the user of the system. How would the user get to that page. I doubt you make them type the url into the browser.
The above solution may work but, your tests could just as easily be written to click the appropriate menu item/link/etc in your app to navigate to that page.