pcottle.learnGitBranching/src/__tests__/casperjs/level_solved_test.js
2015-04-06 10:50:52 -07:00

27 lines
740 B
JavaScript
Executable file

var CasperUtils = require('./casperUtils').CasperUtils;
casper.start(
CasperUtils.getUrlForCommands([
'level intro1 --noIntroDialog --noStartCommand',
'show goal',
'git commit',
'git commit'
]),
function() {
this.test.assertTitle('Learn Git Branching');
casper.waitFor(CasperUtils.waits.jsMount)
.wait(2000)
.then(CasperUtils.screenshot.entirePage)
.waitFor(CasperUtils.waits.allCommandsFinished)
// Have to wait for balls to stop bouncing
.wait(5000)
.wait(5000)
.wait(5000)
.then(CasperUtils.screenshot.entirePage)
.then(CasperUtils.asserts.selectorContainsText(
'div.modalView div.inside h2',
"Great Job!!"
))
.then(CasperUtils.testDone);
}).run();