0.3.0 • Published 8 years ago

gulp-phantomcss v0.3.0

Weekly downloads
90
License
MIT
Repository
github
Last release
8 years ago

gulp-phantomcss

Run your phantomCSS tests with Gulp.

Installation

Uninstall global node installations of casperjs and phantomjs

npm install gulp-phantomcss -D

Usage

var gulp = require('gulp');
var phantomcss = require('gulp-phantomcss');

gulp.task('phantomcss', function (){
  gulp.src('./testsuite.js')
    .pipe(phantomcss());
});

Example ./testsuite.js :

casper.
  start( 'http://www.google.co.uk' ).
  then(function(){
    phantomcss.screenshot('#hplogo', 'google');
  });

casper.run();

Options

Options passed in to the plugin will be forwarded on to phantomcss, these include:

options.screenshots

Type: String

Default: 'screenshots'

Directory where screenshot test fixtures are stored.

options.comparisonResultRoot

Type: String

Default: 'results'

Directory where source, diff and failure screenshots are stored.

options.breakOnError

Type: boolean

Default: false

If true, gulp task will exit with error code if there are any failing tests.

The following options passed in to the plugin will be forwarded on to casperjs, these include:

options.viewportSize

Type: Array

Default: [1280, 800]

Viewport size to run the test in. Useful for running tests for multiple window sizes.

options.logLevel

Type: String

Default: 'error'

Log level for CasperJS, see CasperJS: Logging for more information.

Testing

Run tests with npm test

0.3.0

8 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago