0 Replies Latest reply on Jan 14, 2009 10:07 PM by Riccardo Serafin

    Questions about SeamTest: redirect, FacesMessages and login-required

    Riccardo Serafin Newbie

      Hello everybody, a bunch of more or less releated questions about SeamTest:

      1) What is the correct strategy to test a navigation rule that issues a redirect? This is the scenario: I have a FaceRequest in which i do an invokeAction which outcome results in a redirect, given the navigation rules. It looks like the navigation rules are processed just fine as the renderResponse method is skipped. However, I'd also like to check the redirection page, but the getViewId (invoked just after the invokeAction in the invokeApplication phase) returns the same view id that was used to start the request.

      2) In the same scenario as before, the action invoked by invokeAction also add messages to FacesMessages. How can I check them? I've tried creating a NonFacesRequest right after the FacesRequest (propagating the conversation id) and in the renderResponse phase I access the getFacesContext().getMessages() but the list is empty. Any idea where I should put assertion about FacesMessages in this case?

      3) If I create a NonFacesRequest for a view with a .page.xml that specifies login-required=true the renderResponse method is not invoked (i suppose cos due to the login required the navigation gets redirected). How can I SeamTest a view with login-required=true?

      Thanks a lot,