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

Line 112: Line 112:


; Assertions
; Assertions
* Proposed Guildeline:
* Use waitFor() for all timeout assertions
** All ''wait-for-assertion'' cases should use the waitFor() function
** Use the following formatting:
<pre>
<pre>
controller.waitFor(function() {
controller.waitFor(function() {
Line 120: Line 118:
}, TIMEOUT, 100, “My failure message”);
}, TIMEOUT, 100, “My failure message”);
</pre>
</pre>
* Use assertDOMProperty() for all DOM property assertions
<pre>controller.assertDOMProperty(someObject.someProperty, expectedValue);</pre>
* Use assertJSProperty() for all JS property assertions
<pre>controller.assertJSProperty(someObject.someProperty, expectedValue);</pre>
Confirmed users
14,525

edits