Let's say the app is protected with OpenId login (and only OpenId). Once the user has successfully authenticated via OpenId, I set an attribute in the session like this :
Redirect(routes.Application.index).withSession('email -> userinfo.email)
Now, since a lot of the apps functionality relies on Javascript, the tests must be run on Selenium/Fluentlenium. How can I fake a connected user in my tests?
EDIT : As answered below, creating a user in the OpenId provider is not really an answer for two reasons:
- The OpenID provider is Google and Google only.
- I do not want to test if Google's OpenId is working as they probably test it way better than I ever could, I want to test the functionality of my app.
I would rather like to fake a connected user by manually setting the email attribute in session in fluentlenium but I have found no API to do this.