|
|
Line 117: |
Line 117: |
| Discussion [http://mozqa.ietherpad.com/refactor-discussion here] | | Discussion [http://mozqa.ietherpad.com/refactor-discussion here] |
|
| |
|
| ; Arrays
| | * We should always use the triple operator to not experience strange behavior (===/!== instead of ==/!=) |
| * Block style | | * Variables for imported modules have to start with a capital letter (i.e. var Tabs = require(".../tabs") |
| ** What style?
| | * Class names have to start with a capital letter |
| ** Single Index
| | * setupModule(module) and teardownModule(module) have to specify the module parameter. |
| ** Multiple Index
| |
| ** Multiple Index, Multiple Object
| |
| | |
| ; Sleep()
| |
| * When is sleep() ok? Is it ever ok? | |
| | |
| ; Local Test Pages
| |
| <pre>
| |
| const LOCAL_TEST_PAGES = [
| |
| { url: 'some url', id: 'some id' },
| |
| { url: 'some url', id: 'some id' }
| |
| ];
| |
| </pre>
| |
| * Should always be declared as a constant Array
| |
| * Use array block formatting
| |
| * Name "LOCAL_TEST_PAGES"
| |
| | |
| ; Test Files API Module
| |
| * We should have a module specific to loading of test files | |
| | |
| ; Parameter in setupModule() & teardownModule()
| |
| * Is module needed, wanted?
| |
| | |
| ; Error Messages
| |
| <pre>
| |
| "Expected <element> to be <state>"
| |
| | |
| "Expected password-save notification bar to be visible"
| |
| </pre>
| |
| * Messages should be positive in nature
| |
| * <element> should be what the element represents
| |
| * <state> should be what state we expect that element to be in
| |
| | |
| ; Parameter Naming
| |
| * param or aParam?
| |
| * Example: label or aLabel
| |
| * the latter is common in Mozilla coding styles
| |
| | |
| ; Scope of Constants
| |
| * Global or within the tightest scope?
| |
| | |
| ; Review Guidelines
| |
| What are our "golden-rule" guidelines for different review states?
| |
| * r?
| |
| * r+
| |
| * r-
| |
| * feedback?
| |
| * feedback+
| |
| * feedback-
| |