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