level solved test

This commit is contained in:
Peter Cottle 2015-03-29 22:06:06 -07:00
parent 095c52cec3
commit 28078779ba
2 changed files with 11 additions and 12 deletions

View file

@ -3,25 +3,25 @@ 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(1000)
.wait(2000)
.then(CasperUtils.screenshot.entirePage)
.waitFor(CasperUtils.waits.allCommandsFinished)
.wait(500)
.then(CasperUtils.screenshot.entirePage)
.then(function() {
this.test.assertEvalEquals(function() {
return debug_LevelStore_isLevelSolved('intro1');
},
true,
'Checking that level is solved'
);
})
// 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();

View file

@ -152,7 +152,6 @@ var Level = Sandbox.extend({
},
startOffCommand: function() {
console.log(this.options);
var method = this.options.command.get('method');
if (!this.testOption('noStartCommand') && method !== 'importLevelNow') {
Main.getEventBaton().trigger(