[xwiki-devs] [Proposal] Make all click methods be named click*() in UI functional tests
Hi, The proposal is to make all click methods be named click*() in UI functional tests. For example in ViewPage, instead of: public LoginPage login() { this.loginLink.click(); return new LoginPage(); } We would have: public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); } Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it. WDYT? Thanks -Vincent
On Fri, Jun 24, 2011 at 09:51, Vincent Massol <[email protected]> wrote:
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
+1 makes it a lot easier to understand what it does
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
+1 as well. We need UI-tests to be consistent as much as possible. Regards, Sorin B.
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-0, the fact that you have to click on a button/link in order to login is an implementation detail IMO. The page object (ViewPage) should hide this. It may be fine for "click", but I wouldn't like to change the name of a page object method (an API) whenever the underlying user interface/interaction changes. Thanks, Marius On 06/24/2011 10:51 AM, Vincent Massol wrote:
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Jun 24, 2011, at 3:45 PM, Marius Dumitru Florea wrote:
-0, the fact that you have to click on a button/link in order to login is an implementation detail IMO. The page object (ViewPage) should hide this. It may be fine for "click", but I wouldn't like to change the name of a page object method (an API) whenever the underlying user interface/interaction changes.
* The PageObject strategy is to **mimick** the UI. So if the UI is changed from a button click to something else it's normal to change the PageObject too * I gave an example just to show that login() is not correct. It's not logging the user in. It's simply clicking on the login button to display the login page. Another possible name would be: getLoginPage() or gotoLoginPage() but click is more clear about what it does since there are several ways to go to the login page (can be by using the URL directly for example). Thanks -Vincent
Thanks, Marius
On 06/24/2011 10:51 AM, Vincent Massol wrote:
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Fri, Jun 24, 2011 at 15:45, Marius Dumitru Florea <[email protected]> wrote:
-0, the fact that you have to click on a button/link in order to login is an implementation detail IMO. The page object (ViewPage) should hide this. It may be fine for "click", but I wouldn't like to change the name of a page object method (an API) whenever the underlying user interface/interaction changes.
I don't agree with you, it's an implementation details when the purpose of the test is not to validate login UI but the proposal here is not about TestUtils.
Thanks, Marius
On 06/24/2011 10:51 AM, Vincent Massol wrote:
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
Thanks -Vincent
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 06/24/2011 09:51 AM, Vincent Massol wrote:
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
+1 only for when the method does nothing more than click on an element and wait for some conditions to be met. If the method does something else as well, then it should have a name that describes the whole process or the end result. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hello, On Fri, Jun 24, 2011 at 9:12 PM, Sergiu Dumitriu <[email protected]> wrote:
On 06/24/2011 09:51 AM, Vincent Massol wrote:
Hi,
The proposal is to make all click methods be named click*() in UI functional tests.
For example in ViewPage, instead of:
public LoginPage login() { this.loginLink.click(); return new LoginPage(); }
We would have:
public LoginPage clickLogin() { this.loginLink.click(); return new LoginPage(); }
Right now we have some methods starting with click and other not following this pattern, the idea is to homogeneize it.
WDYT?
+1 only for when the method does nothing more than click on an element and wait for some conditions to be met. If the method does something else as well, then it should have a name that describes the whole process or the end result.
I agree with Sergiu. So +1 for when the method does nothing more than click. Raluca.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (6)
-
Marius Dumitru Florea -
Raluca Stavro -
Sergiu Dumitriu -
Sorin Burjan1 -
Thomas Mortagne -
Vincent Massol