File tree 3 files changed +38
-3
lines changed
3 files changed +38
-3
lines changed Original file line number Diff line number Diff line change 22
22
"grunt" : " *" ,
23
23
"grunt-cli" : " *" ,
24
24
"grunt-browserify" : " *" ,
25
- "grunt-shell" : " *"
25
+ "grunt-shell" : " *" ,
26
+ "webdriverjs" : " *" ,
27
+ "chai" : " *" ,
28
+ "phantomjs" : " *"
26
29
},
27
30
"scripts" : {
28
- "test" : " istanbul test ./node_modules/.bin/_mocha -- --reporter list test/*.js"
31
+ "test" : " istanbul test ./node_modules/.bin/_mocha -- --reporter list test/coinpunk/*" ,
32
+ "browsertest" : " ./node_modules/.bin/_mocha --reporter list test/browser/functional.js"
29
33
}
30
34
}
Original file line number Diff line number Diff line change
1
+ var webdriverjs = require ( 'webdriverjs' ) ,
2
+ assert = require ( 'assert' ) ;
3
+
4
+ describe ( 'coinpunk app' , function ( ) {
5
+ this . timeout ( 99999999 ) ;
6
+ var url = 'http://127.0.0.1:8080/'
7
+ var client = { } ;
8
+
9
+ before ( function ( ) {
10
+ client = webdriverjs . remote ( { desiredCapabilities : { browserName : 'phantomjs' } , logLevel : 'silent' } ) ;
11
+ client . init ( ) ;
12
+ } ) ;
13
+
14
+ it ( 'creates account successfully' , function ( done ) {
15
+ client
16
+ . url ( url )
17
+ . getTitle ( function ( err , title ) {
18
+ assert ( err === null ) ;
19
+ assert ( title === 'Coinpunk' ) ;
20
+ } )
21
+ . click ( 'form a' , function ( err , result ) {
22
+ assert ( err === null ) ;
23
+ console . log ( client . getAttribute ( 'body' ) ) ;
24
+ } )
25
+ . call ( done ) ;
26
+ } ) ;
27
+
28
+ after ( function ( done ) {
29
+ client . end ( done ) ;
30
+ } ) ;
31
+ } ) ;
Original file line number Diff line number Diff line change 1
1
var assert = require ( 'assert' ) ;
2
- var server = require ( '../lib/coinpunk/server' ) ;
2
+ var server = require ( '../../ lib/coinpunk/server' ) ;
3
3
var request = require ( 'supertest' ) ;
4
4
5
5
describe ( 'GET /' , function ( ) {
You can’t perform that action at this time.
0 commit comments