@@ -112,7 +112,7 @@ You can add BackstopJS from the root directory of any project.
112
112
$ npm install --save-dev backstopjs
113
113
```
114
114
115
- ###Installing a develpment version
115
+ ###Installing a development version
116
116
117
117
``` sh
118
118
$ npm install garris/backstopjs#master
@@ -352,7 +352,7 @@ Inside `filename.js`, structure it like this:
352
352
module .exports = function (casper , scenario , vp ) {
353
353
// scenario is the current scenario object being run from your backstop config
354
354
// vp is the current viewport object being run from your backstop config
355
-
355
+
356
356
// Example: setting cookies
357
357
casper .echo (" Setting cookies" );
358
358
casper .then (function (){
@@ -361,17 +361,17 @@ module.exports = function(casper, scenario, vp) {
361
361
// `casper.thenOpen()` demonstrates a redirect to the original page with your new cookie value.
362
362
// this step is not required if used with _onBeforeScript_
363
363
casper .thenOpen (scenario .url );
364
-
364
+
365
365
// Example: Adding script delays to allow for things like CSS transitions to complete.
366
366
casper .echo ( ' Clicking button' );
367
367
casper .click ( ' .toggle' );
368
368
casper .wait ( 250 );
369
-
369
+
370
370
// Example: changing behaivior based on config values
371
371
if (vp .name === ' phone' ) {
372
372
casper .echo ( ' doing stuff for just phone viewport here' );
373
373
}
374
-
374
+
375
375
// ...do other cool stuff here, see Casperjs.org for a full API and many ideas.
376
376
}
377
377
```
0 commit comments