Skip to content

Commit 5ce5651

Browse files
committed
add demo
1 parent a6747a0 commit 5ce5651

File tree

5 files changed

+43
-2
lines changed

5 files changed

+43
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules/
22
npm-debug.log
33
.idea
44
*.sublime-project
5-
*.sublime-workspace
5+
*.sublime-workspace
6+
.DS_Store

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
.svn
88
.wafpickle-*
99
CVS
10-
npm-debug.log
10+
npm-debug.log
11+
demo

demo/gulpfile.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var gulp = require('gulp');
2+
var casperJs = require('gulp-casperjs');
3+
var gutil = require('gulp-util');
4+
5+
gulp.task('test', function () {
6+
gulp.src('./test.js')
7+
.pipe(casperJs().on('error', gutil.log));
8+
});

demo/package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "gulp_polygon",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"devDependencies": {
12+
"casperjs": "^1.1.1",
13+
"gulp-casperjs": "0.0.6",
14+
"gulp-util": "^3.0.7"
15+
},
16+
"dependencies": {
17+
"casperjs": "^1.1.1",
18+
"gulp": "^3.9.1"
19+
}
20+
}

demo/test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
casper.test.begin('a twitter bootstrap dropdown can be opened', 2, function(test) {
2+
casper.start('http://getbootstrap.com/2.3.2/javascript.html#dropdowns', function() {
3+
test.assertExists('#navbar-example');
4+
this.click('#dropdowns .nav-pills .dropdown:last-of-type a.dropdown-toggle');
5+
this.waitUntilVisible('#dropdowns .nav-pills .open', function() {
6+
test.pass('Dropdown is open');
7+
});
8+
}).run(function() {
9+
test.done();
10+
});
11+
});

0 commit comments

Comments
 (0)