Last modified: 2013-07-02 13:07:24 UTC
Page elements[1] should be sorted alphabetically. This is how an element looks like: element_type(:element_name, attribute_type: attribute_value) Example (from aftv5_page.rb[2]): div(:aft_box, id: 'mw-articlefeedbackv5') a(:view_article, text: 'View article') Elements should be sorted by :element_name, so the elements in the example above are sorted correctly, since :aft_box should be before :view_article. 1: https://github.com/wikimedia/qa-browsertests/tree/master/features/support/pages 2: https://github.com/wikimedia/qa-browsertests/blob/master/features/support/pages/aftv5_page.rb
Related URL: https://gerrit.wikimedia.org/r/70555 (Gerrit Change I259db184cc603508bddd88c4cdaabb9693778f7a)
Page elements can be sorted in VIM with this: :9,19 sort ri /(:.\{-}, / 9 being the first line, and 19 the last line of page elements in the file. It can't be used if you have page elements with "do" blocks because it's multiline - it would require a more complex script.
Fixed in https://gerrit.wikimedia.org/r/#/c/70555