Code review comment for lp:~elopio/u1-test-utils/page-objects

Revision history for this message
Leo Arias (elopio) wrote :

> I think I would prefer:
>
> anonymous_home_page = AnonymousHomePage()
> ubuntu_single_sign_on = anonymous_home_page.go_to_sign_in()
> user_home_page = ubuntu_single_sign_on.sign_in(user, UserHomePage())
> user_home_page.do_the_test()

Actually, there's a problem here because we shouldn't instantiate pages that are not visible. So, instead of this I think I would go back to my first approach:

anonymous_home_page = AnonymousHomePage()
ubuntu_single_sign_on = anonymous_home_page.go_to_sign_in()
# UserHomePage is the name of the class, and it will be instantiated by sign_in just before returning it.
user_home_page = ubuntu_single_sign_on.sign_in(user, UserHomePage)
user_home_page.do_the_test()

Or, the other option that's not sending any return page to SSO, and leave it all to the caller.

« Back to merge proposal