On Wed, Jan 15, 2014 at 6:46 AM, Željko Filipin <[email protected]>wrote:
> On Tue, Jan 14, 2014 at 10:40 PM, Juliusz Gonera <[email protected]>wrote: > >> In my opinion we should only have PageObjects for pages that actually >> exist > > > I am fine with that, as long as the files do not become extremely big. > > >> There are a bunch of PageObjects that don't actually represent pages, but >> kind of mirror features: >> > > I actually prefer to have a lot of small classes instead of just a few big > ones. If you prefer a few bigger classes, go ahead. > I like to see pages that reflect the navigation in the test. For example, in the test that Arthur and I wrote last week, we navigate from the "User login" page to the "Create account" page, and the names of the PageObjects that the test uses reflects that navigation: * https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/create_account_failure_messages.feature * https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/create_account_failure_messages_steps.rb Note that since CreateAccountPage is never invoked directly, i.e. is never the subject of a visit() in a test, only an on(), CreateAccountPage has no URL. So I would say that instead of large or small PageObjects, I would prefer to see PageObjects that correspond to the how the tests navigate through the application. If the test navigates from a Login page to a Create Account page, I like to see those pages as PageObjects. If a page navigates from an Article page to a Talk page, or a wiki page to a page outside the wiki, I like to see that reflected in the PageObjects. But it is only a preference, and I don't hold it strongly enough to object to a different organizational scheme. -C
_______________________________________________ QA mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/qa
