[QA] big improvements to the MobileFrontend browser test repo

Chris McMahon cmcmahon at wikimedia.org
Thu Dec 4 22:43:29 UTC 2014


Hi mobile folk,

After 48 patches merged, I have updated all the browser tests in the
MobileFrontend repo to conform to RSpec3 syntax. Along the way I did a few
other things:

* removed every sleep() statement except one necessary to get around a bug
in Chrome
* consolidated the lines within each step in each test to be as succinct as
possible
* handled and removed a number of FIXME comments
* removed a significant amount of dead/unused/irrelevant code
* made the Feature description of each test step consistent with what each
step actually accomplishes
* removed all the instances where "Then" steps were re-used as Given or
When (they are conceptually different)

On the style front:

* all the steps are now in alphabetical order according to Given/When/Then,
and all the GWT specifications in the .feature files conform to their
corresponding implementations in steps files.
* in the Features, every Then step contains the word "should", in the steps
files, every Then step contains an RSpec assertion
* no Given or When steps contain either the word "should" or an RSpec
assertion

This all should make working in the browser test repo significantly easier
and more straightforward, as well as making far better use of the most
modern implementation of RSpec.

For my next trick I am going to make the browser test repo conform as
closely as possible to rubocop style rules, but the heavy lifting with
regard to technical debt in the browser test repos is mostly handled.

Let me know if you have any questions or if you would like a tour...

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.wikimedia.org/pipermail/qa/attachments/20141204/70adedbc/attachment.html>


More information about the QA mailing list