mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
fix a casper test
This commit is contained in:
parent
9aa77aec8c
commit
ab064a2502
2 changed files with 4 additions and 3 deletions
|
@ -12,13 +12,13 @@ CasperUtils.start(
|
|||
.wait(200)
|
||||
.then(CasperUtils.screenshot.entirePage)
|
||||
.then(CasperUtils.asserts.selectorContainsText(
|
||||
'#command_c32 div.commandLineResult p',
|
||||
'#command_0 div.commandLineResult p',
|
||||
'The command "asd" isn\'t supported, sorry!'
|
||||
))
|
||||
.then(CasperUtils.enterCommand('git commit'))
|
||||
.wait(100)
|
||||
.then(CasperUtils.asserts.selectorContainsText(
|
||||
'#command_c34 p.commandLine span:nth-child(2)',
|
||||
'#command_1 p.commandLine span:nth-child(2)',
|
||||
'git commit'
|
||||
))
|
||||
.wait(700)
|
||||
|
|
|
@ -208,6 +208,7 @@ var CommandPromptView = Backbone.View.extend({
|
|||
var CommandLineHistoryView = Backbone.View.extend({
|
||||
initialize: function(options) {
|
||||
this.collection = options.collection;
|
||||
this.commandNum = 0;
|
||||
|
||||
this.collection.on('add', this.addOne, this);
|
||||
this.collection.on('reset', this.addAll, this);
|
||||
|
@ -265,7 +266,7 @@ var CommandLineHistoryView = Backbone.View.extend({
|
|||
|
||||
addOne: function(command) {
|
||||
var div = document.createElement('div');
|
||||
div.id = 'command_' + command.cid;
|
||||
div.id = 'command_' + this.commandNum++;
|
||||
React.render(
|
||||
React.createElement(CommandView, {command: command}),
|
||||
div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue