CasperJS end to end test integration for meteor using velocity
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.npm/package
sample-tests
.gitignore
CHANGELOG.md
LICENSE
README.md
nblazer:casperjs-tests.js
nblazer:casperjs.coffee
package.js
versions.json

README.md

meteor-casperjs

CasperJS end to end test integration for meteor using velocity.

Installation

meteor add nblazer:casperjs

Caution

This package doesn't ship with CasperJS. You need to have a running CasperJS installation on your system!

Usage

Create tests in your tests directory tests/casperjs/[*.js|*.coffee] Sample file:

casper.test.begin "Sample Test", 2, (test) ->
   casper.start casper.cli.get('rootUrl'), ->
      @waitForSelector "body", ->
         test.assert true, "True is true"

   casper.then ->
      test.assertNot false, "False is false"

   casper.run -> test.done()

Integrates with velocity:html-reporter.

Run your tests with meteor run --test.

In your tests, parse the --rootUrl=<URL> option with casper.cli.get('rootUrl') to hit the soft-mirror.