mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 16:38:50 +02:00
level solved test
This commit is contained in:
parent
095c52cec3
commit
28078779ba
2 changed files with 11 additions and 12 deletions
|
@ -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();
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue