<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 6:46 AM, Željko Filipin <span dir="ltr"><<a href="mailto:zfilipin@wikimedia.org" target="_blank">zfilipin@wikimedia.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div class="im">On Tue, Jan 14, 2014 at 10:40 PM, Juliusz Gonera <span dir="ltr"><<a href="mailto:jgonera@wikimedia.org" target="_blank">jgonera@wikimedia.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">In my opinion we should only have PageObjects for pages that actually exist</blockquote>



<div><br></div></div><div>I am fine with that, as long as the files do not become extremely big.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




There are a bunch of PageObjects that don't actually represent pages, but kind of mirror features:<br></blockquote><div><br></div></div><div>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.</div>

</div></div></div></blockquote><div><br></div><div>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: </div>

<div><br></div><div>* <a href="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/create_account_failure_messages.feature</a></div>

<div>* <a href="https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/create_account_failure_messages_steps.rb">https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/tests/browser/features/step_definitions/create_account_failure_messages_steps.rb</a></div>

<div><br></div><div>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. </div><div><br></div><div>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.  </div>

<div><br></div><div>But it is only a preference, and I don't hold it strongly enough to object to a different organizational scheme.  </div><div><br></div><div>-C</div></div></div></div>