Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
87efaa5
commit 9d26b3f
Showing
9 changed files
with
42 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
node_modules | ||
examples/static-server/node_modules | ||
examples/express-app/node_modules | ||
test/node_modules | ||
test/screenshots | ||
/*.jpg | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
examples | ||
node_modules | ||
test | ||
/*.jpg | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# unit tests | ||
test: | ||
node_modules/.bin/mocha -R nyan ./test/spec | ||
|
||
# phantomjs screenshots | ||
screenshots: | ||
casperjs ./test/runTest.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,23 @@ | ||
var casper = require('casper').create(); | ||
var colorizer = require('colorizer').create('Colorizer'); | ||
|
||
var url = casper.cli.get(0) || 'localhost:8082'; | ||
var url = casper.cli.get(0) || 'http://localhost:8082'; | ||
|
||
var date = (new Date()).toString().replace(/\s/g, '-'); | ||
var filename = 'dookie-css-test-' + date + '.jpg'; | ||
|
||
casper.start(url, function () { | ||
this.echo('test started on url -' + url, 'INFO'); | ||
}); | ||
|
||
casper.then(function () { | ||
casper.waitForSelector('.tests', function () { | ||
this.captureSelector(filename, '.tests'); | ||
this.echo('screenshot captured under name - ' + filename, 'COMMENT'); | ||
}); | ||
}); | ||
|
||
casper.run(function () { | ||
this.echo('test ended', 'INFO'); | ||
this.exit(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters