mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-14 06:58:56 +02:00
test refactor
This commit is contained in:
parent
fba7e4bb3d
commit
8709f87b4f
2 changed files with 13 additions and 8 deletions
|
@ -1,48 +0,0 @@
|
|||
var CasperHelp = require('./casperHelp').CasperHelp;
|
||||
|
||||
var visibleIDs = [
|
||||
'commandLineHistory',
|
||||
'terminal',
|
||||
'interfaceWrapper',
|
||||
'mainVisSpace',
|
||||
'commandLineBar'
|
||||
];
|
||||
|
||||
var selectors = [
|
||||
'div.visBackgroundColor',
|
||||
'p.commandLine'
|
||||
];
|
||||
|
||||
var doneSelectors = [
|
||||
'p.finished'
|
||||
];
|
||||
|
||||
casper.start(
|
||||
CasperHelp.getUrlForCommands([
|
||||
'git commit',
|
||||
]),
|
||||
function() {
|
||||
this.test.assertTitle('Learn Git Branching');
|
||||
|
||||
casper.waitFor(CasperHelp.waits.jsMount, function then() {
|
||||
visibleIDs.forEach(function(id) {
|
||||
this.test.assertVisible('#' + id);
|
||||
}.bind(this));
|
||||
|
||||
selectors.forEach(function(selector) {
|
||||
this.test.assertExists(selector);
|
||||
}.bind(this));
|
||||
|
||||
})
|
||||
.waitFor(CasperHelp.waits.allCommandsFinished, function then() {
|
||||
doneSelectors.forEach(function(selector) {
|
||||
this.test.assertExists(selector);
|
||||
}.bind(this));
|
||||
})
|
||||
.then(function() {
|
||||
this.test.done();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
casper.run();
|
Loading…
Add table
Add a link
Reference in a new issue