This content has been marked as final. Show 2 replies
Why is it that I navigate to /web/index.jsf that I have to assert that my view is /web/index.xhtml.
JSFClientSession is handling the client side of things. To a client (browser), the URL is /web/index.jsf.
JSFServerSession looks at things from a JSF standpoint. To JSF, your view ID is indeed /web/index.xhtml. Note that this is how it looks to your navigation rules in faces-context.xml.
JSFServerSession.getCurrentViewID() is really a shorthand for FacesContext.getViewRoot().getViewId(). As you use JSFUnit to go from page to page, getCurrentViewID() is used to test if your navigation rules are working as expected.
See this wiki page for more tips on using the JSFUnit API:
Thanks heaps for your help Stan :)