code documentation effort
Showing
2 changed files
with
15 additions
and
8 deletions
... | @@ -352,7 +352,7 @@ | ... | @@ -352,7 +352,7 @@ |
352 | }; | 352 | }; |
353 | 353 | ||
354 | /** | 354 | /** |
355 | * Retrieves a single DOM element mathcing a given XPath expression. | 355 | * Retrieves a single DOM element matching a given XPath expression. |
356 | * | 356 | * |
357 | * @param String expression The XPath expression | 357 | * @param String expression The XPath expression |
358 | * @return HTMLElement or null | 358 | * @return HTMLElement or null |
... | @@ -380,7 +380,7 @@ | ... | @@ -380,7 +380,7 @@ |
380 | }; | 380 | }; |
381 | 381 | ||
382 | /** | 382 | /** |
383 | * Removed all DOM elements matching a given XPath expression. | 383 | * Removes all DOM elements matching a given XPath expression. |
384 | * | 384 | * |
385 | * @param String expression The XPath expression | 385 | * @param String expression The XPath expression |
386 | * @return Array | 386 | * @return Array | ... | ... |
... | @@ -40,6 +40,8 @@ exports.create = function create(casper, options) { | ... | @@ -40,6 +40,8 @@ exports.create = function create(casper, options) { |
40 | /** | 40 | /** |
41 | * Casper tester: makes assertions, stores test results and display then. | 41 | * Casper tester: makes assertions, stores test results and display then. |
42 | * | 42 | * |
43 | * @param Casper casper A valid Casper instance | ||
44 | * @param Object|null options Options object | ||
43 | */ | 45 | */ |
44 | var Tester = function Tester(casper, options) { | 46 | var Tester = function Tester(casper, options) { |
45 | if (!utils.isCasperObject(casper)) { | 47 | if (!utils.isCasperObject(casper)) { |
... | @@ -149,7 +151,6 @@ var Tester = function Tester(casper, options) { | ... | @@ -149,7 +151,6 @@ var Tester = function Tester(casper, options) { |
149 | * @param Mixed expected The unwanted value | 151 | * @param Mixed expected The unwanted value |
150 | * @param String message Test description | 152 | * @param String message Test description |
151 | */ | 153 | */ |
152 | |||
153 | this.assertNotEquals = function assertNotEquals(subject, shouldnt, message) { | 154 | this.assertNotEquals = function assertNotEquals(subject, shouldnt, message) { |
154 | var eventName; | 155 | var eventName; |
155 | message = message || ""; | 156 | message = message || ""; |
... | @@ -176,7 +177,6 @@ var Tester = function Tester(casper, options) { | ... | @@ -176,7 +177,6 @@ var Tester = function Tester(casper, options) { |
176 | }); | 177 | }); |
177 | }; | 178 | }; |
178 | 179 | ||
179 | |||
180 | /** | 180 | /** |
181 | * Asserts that a code evaluation in remote DOM resolves to true. | 181 | * Asserts that a code evaluation in remote DOM resolves to true. |
182 | * | 182 | * |
... | @@ -202,16 +202,23 @@ var Tester = function Tester(casper, options) { | ... | @@ -202,16 +202,23 @@ var Tester = function Tester(casper, options) { |
202 | }; | 202 | }; |
203 | 203 | ||
204 | /** | 204 | /** |
205 | * Asserts that an element matching the provided CSS3 selector exists in | 205 | * Asserts that an element matching the provided selector expression exists in |
206 | * remote DOM. | 206 | * remote DOM. |
207 | * | 207 | * |
208 | * @param String selector CSS3 selector | 208 | * @param String selector Selector expression |
209 | * @param String message Test description | 209 | * @param String message Test description |
210 | */ | 210 | */ |
211 | this.assertExists = this.assertExist = function assertExists(selector, message) { | 211 | this.assertExists = this.assertExist = function assertExists(selector, message) { |
212 | return this.assert(casper.exists(selector), message); | 212 | return this.assert(casper.exists(selector), message); |
213 | }; | 213 | }; |
214 | 214 | ||
215 | /** | ||
216 | * Asserts that an element matching the provided selector expression does not | ||
217 | * exists in remote DOM. | ||
218 | * | ||
219 | * @param String selector Selector expression | ||
220 | * @param String message Test description | ||
221 | */ | ||
215 | this.assertDoesntExist = this.assertNotExists = function assertDoesntExist(selector, message) { | 222 | this.assertDoesntExist = this.assertNotExists = function assertDoesntExist(selector, message) { |
216 | return this.assertNot(casper.exists(selector), message); | 223 | return this.assertNot(casper.exists(selector), message); |
217 | }; | 224 | }; |
... | @@ -296,10 +303,10 @@ var Tester = function Tester(casper, options) { | ... | @@ -296,10 +303,10 @@ var Tester = function Tester(casper, options) { |
296 | }; | 303 | }; |
297 | 304 | ||
298 | /** | 305 | /** |
299 | * Asserts that at least an element matching the provided CSS3 selector | 306 | * Asserts that at least an element matching the provided selector expression |
300 | * exists in remote DOM. | 307 | * exists in remote DOM. |
301 | * | 308 | * |
302 | * @param String selector A CSS3 selector string | 309 | * @param String selector A selector expression string |
303 | * @param String message Test description | 310 | * @param String message Test description |
304 | */ | 311 | */ |
305 | this.assertSelectorExists = this.assertSelectorExist = function assertSelectorExists(selector, message) { | 312 | this.assertSelectorExists = this.assertSelectorExist = function assertSelectorExists(selector, message) { | ... | ... |
-
Please register or sign in to post a comment