Sure but Željko says "then I write a test, the first check that I usually write is that the browser is at the correct page" - this sounds like he is suggesting this is not cruft.... I am wondering what is the value in having this check? We have a step saying 'I am on "Foo bar" page' which we assume takes you to the correct page. Is there value in then checking the URL?
On Thu, Mar 27, 2014 at 9:40 AM, Chris McMahon cmcmahon@wikimedia.org wrote:
On Thu, Mar 27, 2014 at 9:36 AM, Jon Robson jdlrobson@gmail.com wrote:
Out of interest, what is the value for you in writing this test?
Many of the tests for MobileFrontend were created without much review by Michelle, me, Jeff, and others. We're cleaning up a lot of cruft.
-Chris
On Thu, Mar 27, 2014 at 8:39 AM, Željko Filipin zfilipin@wikimedia.org wrote:
On Wed, Mar 26, 2014 at 5:36 PM, Jon Robson jrobson@wikimedia.org wrote:
The URL correctness is not a good test.
When I write a test, the first check that I usually write is that the browser is at the correct page. Usually, the easiest way to check that is by checking the URL. If that causes more trouble than it is worth, then we should remove the check. If that is a valuable check, we can write a cucumber transform[1] that would make sure all page names are correctly URL encoded before comparing them with browser URL.
Željko
1: https://github.com/cucumber/cucumber/wiki/Step-Argument-Transforms
-- Jon Robson