Commit 05ca74174b9fc37fb7547c8028cb1bc8c4c450e3
1 parent
f74a3662f1
Exists in
master
and in
1 other branch
Temp login test
Showing 2 changed files with 9 additions and 14 deletions Inline Diff
login_test.js
View file @
05ca741
phantom.page.injectJs( 'shim.js'); | 1 | 1 | phantom.page.injectJs( 'shim.js'); | |
2 | 2 | |||
casper.test.begin('login test', 1, function(test) { | 3 | 3 | casper.test.begin('login test', 2, function suite(test) { | |
casper.start('https://flashy.cards/app/login', function() { | 4 | 4 | casper.start('https://flashy.cards/app/login', function() { | |
test.assertExist('.login-form'); | 5 | 5 | this.wait( 1000); | |
6 | test.assertHttpStatus(200); | |||
7 | test.assertExists('#login-form', 'this test sucks'); | |||
8 | //require('utils').dump((casper.test.getFailures()); | |||
9 | }).run( function() { | |||
10 | test.done(); | |||
}); | 6 | 11 | }); | |
}); | 7 | 12 | }); | |
13 | ||||
14 | //casper.run(); | |||
8 | 15 |
ss_test.js
View file @
05ca741
//http://docs.casperjs.org/en/latest/modules/casper.html#captureselector | 1 | File was deleted | ||
//Run with: casperjs --ssl-protocol=tlsv1 ss_test.js | 2 | |||
3 | ||||
var casper = require('casper').create({ | 4 | |||
viewportSize: {width: 800, height: 600} | 5 | |||
}); | 6 | |||
7 | ||||
casper.start().zoom(.9).thenOpen('https://flashy.cards/app/login', function() { | 8 | |||
this.captureSelector('test2.png','.ng-scope' ); | 9 |