Manual:Coding conventions/Selenium-Ruby

This page describes coding conventions used by Cucumber test files in MediaWiki codebase.

Alphabetically Sorted
Cucumber step definitions should be sorted alphabetically. This is how a definition looks like:

Example (from login_steps.rb):

Grouped By Type
Ruby code should be ignored. Steps should be grouped by type. "Given" steps should be grouped together, the same for "When" and "Then" steps. Inside the group, steps should be sorted alphabetically by step name.

For a good example on how steps should be grouped and sorted see aftv5_steps.rb file.