level solved test

This commit is contained in:
Peter Cottle 2015-03-29 21:30:34 -07:00
parent 22fbcdc0a3
commit 3e657e03b0
6 changed files with 19 additions and 13 deletions

View file

@ -15,7 +15,7 @@ casper.start(
.then(function() { .then(function() {
this.mouse.click('a.intl'); this.mouse.click('a.intl');
}) })
.then(CasperUtils.waits.selectorVisible( .waitFor(CasperUtils.waits.selectorVisible(
'a.english' 'a.english'
)) ))
.wait(1000) .wait(1000)

View file

@ -46,7 +46,6 @@ casper.start(
.then(function() { .then(function() {
this.mouse.click('div[data-id="remote"]'); this.mouse.click('div[data-id="remote"]');
}) })
.then(CasperUtils.waits.idVisible('levelIcon-remote1'))
.wait(1000) .wait(1000)
.then(CasperUtils.asserts.visibleIDs( .then(CasperUtils.asserts.visibleIDs(
levelIconIDsForPages(5, numLevelSequences) levelIconIDsForPages(5, numLevelSequences)

View file

@ -15,9 +15,6 @@ casper.start(
.then(function() { .then(function() {
this.mouse.click('#show-objective'); this.mouse.click('#show-objective');
}) })
.then(CasperUtils.waits.selectorVisible(
'p.commandLine.processing'
))
.wait(1000) .wait(1000)
.then(CasperUtils.screenshot.entirePage) .then(CasperUtils.screenshot.entirePage)
.then(CasperUtils.asserts.visibleSelectors([ .then(CasperUtils.asserts.visibleSelectors([

View file

@ -15,9 +15,6 @@ casper.start(
.then(function() { .then(function() {
this.mouse.click('#show-goal'); this.mouse.click('#show-goal');
}) })
.then(CasperUtils.waits.selectorVisible(
'p.helperText'
))
.wait(1000) .wait(1000)
.then(CasperUtils.screenshot.entirePage) .then(CasperUtils.screenshot.entirePage)
.then(CasperUtils.asserts.visibleSelector('p.helperText')) .then(CasperUtils.asserts.visibleSelector('p.helperText'))

View file

@ -0,0 +1,17 @@
var CasperUtils = require('./casperUtils').CasperUtils;
casper.start(
CasperUtils.getUrlForCommands([
'level intro1 --noIntroDialog --noStartCommand',
'git commit',
'git commit'
]),
function() {
this.test.assertTitle('Learn Git Branching');
casper.waitFor(CasperUtils.waits.jsMount)
.wait(1000)
.waitFor(CasperUtils.waits.allCommandsFinished)
.then(CasperUtils.screenshot.entirePage)
.then(CasperUtils.testDone);
}).run();

View file

@ -8,11 +8,7 @@ casper.start(
this.test.assertTitle('Learn Git Branching'); this.test.assertTitle('Learn Git Branching');
casper.waitFor(CasperUtils.waits.jsMount) casper.waitFor(CasperUtils.waits.jsMount)
.then(CasperUtils.waits.allCommandsFinished) .waitFor(CasperUtils.waits.allCommandsFinished)
.then(CasperUtils.asserts.intlKeyReturns(
'learn-git-branching',
"Apprenez Git Branching"
))
.then(CasperUtils.asserts.selectorContainsText( .then(CasperUtils.asserts.selectorContainsText(
'span[data-intl="learn-git-branching"]', 'span[data-intl="learn-git-branching"]',
"APPRENEZ GIT BRANCHING" "APPRENEZ GIT BRANCHING"