QA/Mozmill Test Automation/Test Modules Refactor: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 35: Line 35:


== Refactoring  ==
== Refactoring  ==
; Timeouts & Delays
* gDelay: replace with a discrete int value
* gTimeout: replace with TIMEOUT


=== Constants  ===
== Style Guidelines ==
All ''unchanging'' variables should be declared as constants. All constants should be named in ALL_CAPS with whitespace indicated by an underscore (_). All constants should be declared directly the ''required modules'' block and setupModule() function.
; Timeouts & Delays
* Proposed Guidelines:
** Delay: Use discrete value
** Timeout: Use global TIMEOUT
* Henrik: Timeouts should be encapsulated within a global shared module
* Geo: Use default params where appropriate, wrapper functions where not


<pre>* ***** END LICENSE BLOCK ***** */
; Constants
 
* Proposed Guidelines:
// Include required modules
** Exist between ''requires'' and ''setupModule()''
var utils = require("../../shared-modules/utils");
** const SOME_CONSTANT = value;
 
* Geo: All ''unchanging'' variables as constants
const TIMEOUT = 5000;
 
var setupModule = function() { </pre>
 
; gDelay
All instances of gDelay should be removed and replaced with a discrete integer.
 
; gTimeout
All instances of gTimeout should be renamed to TIMEOUT
Confirmed users
14,525

edits

Navigation menu