mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-14 08:34:26 +02:00
level solved test
This commit is contained in:
parent
22fbcdc0a3
commit
3e657e03b0
6 changed files with 19 additions and 13 deletions
|
@ -15,7 +15,7 @@ casper.start(
|
|||
.then(function() {
|
||||
this.mouse.click('a.intl');
|
||||
})
|
||||
.then(CasperUtils.waits.selectorVisible(
|
||||
.waitFor(CasperUtils.waits.selectorVisible(
|
||||
'a.english'
|
||||
))
|
||||
.wait(1000)
|
||||
|
|
|
@ -46,7 +46,6 @@ casper.start(
|
|||
.then(function() {
|
||||
this.mouse.click('div[data-id="remote"]');
|
||||
})
|
||||
.then(CasperUtils.waits.idVisible('levelIcon-remote1'))
|
||||
.wait(1000)
|
||||
.then(CasperUtils.asserts.visibleIDs(
|
||||
levelIconIDsForPages(5, numLevelSequences)
|
||||
|
|
|
@ -15,9 +15,6 @@ casper.start(
|
|||
.then(function() {
|
||||
this.mouse.click('#show-objective');
|
||||
})
|
||||
.then(CasperUtils.waits.selectorVisible(
|
||||
'p.commandLine.processing'
|
||||
))
|
||||
.wait(1000)
|
||||
.then(CasperUtils.screenshot.entirePage)
|
||||
.then(CasperUtils.asserts.visibleSelectors([
|
||||
|
|
|
@ -15,9 +15,6 @@ casper.start(
|
|||
.then(function() {
|
||||
this.mouse.click('#show-goal');
|
||||
})
|
||||
.then(CasperUtils.waits.selectorVisible(
|
||||
'p.helperText'
|
||||
))
|
||||
.wait(1000)
|
||||
.then(CasperUtils.screenshot.entirePage)
|
||||
.then(CasperUtils.asserts.visibleSelector('p.helperText'))
|
||||
|
|
17
src/__tests__/casperjs/level_solved_test.js
Normal file
17
src/__tests__/casperjs/level_solved_test.js
Normal 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();
|
|
@ -8,11 +8,7 @@ casper.start(
|
|||
this.test.assertTitle('Learn Git Branching');
|
||||
|
||||
casper.waitFor(CasperUtils.waits.jsMount)
|
||||
.then(CasperUtils.waits.allCommandsFinished)
|
||||
.then(CasperUtils.asserts.intlKeyReturns(
|
||||
'learn-git-branching',
|
||||
"Apprenez Git Branching"
|
||||
))
|
||||
.waitFor(CasperUtils.waits.allCommandsFinished)
|
||||
.then(CasperUtils.asserts.selectorContainsText(
|
||||
'span[data-intl="learn-git-branching"]',
|
||||
"APPRENEZ GIT BRANCHING"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue