diff --git a/src/__tests__/casperjs/command_view_test.js b/src/__tests__/casperjs/command_view_test.js index 4fec2ccf..7121f6f6 100644 --- a/src/__tests__/casperjs/command_view_test.js +++ b/src/__tests__/casperjs/command_view_test.js @@ -1,21 +1,19 @@ var CasperUtils = require('./casperUtils').CasperUtils; casper.start( - CasperUtils.getUrlForCommands([ - 'asd' - ]), + CasperUtils.getUrl(), function() { this.test.assertTitle('Learn Git Branching'); - casper.waitFor(CasperUtils.waits.jsMount) - .wait(300) + casper.wait(700) .then(CasperUtils.screenshot.entirePage) + .then(CasperUtils.asserts.selectorContainsText( + '#command_c32 div.commandLineResult p', + 'The command "asd" isn\'t supported, sorry!' + )) + /* .then(CasperUtils.enterCommand('git checkout C1')) .wait(800) - .then(CasperUtils.asserts.selectorContainsText( - 'div.modalView.inFront div.toolbar', - 'Select a level' - )) .then(CasperUtils.asserts.selectorContainsText( 'div.modalView.inFront div.displayName h3', 'Introduction Sequence' @@ -43,6 +41,7 @@ casper.start( 'div.levelNameWrapper', "Level Introduction to Git Commits" )) + */ .then(CasperUtils.testDone); }).run(); diff --git a/src/js/views/commandViews.js b/src/js/views/commandViews.js index 8e867df7..a9b14f46 100644 --- a/src/js/views/commandViews.js +++ b/src/js/views/commandViews.js @@ -265,7 +265,7 @@ var CommandLineHistoryView = Backbone.View.extend({ addOne: function(command) { var div = document.createElement('div'); - div.id = command.cid; + div.id = 'command_' + command.cid; React.render( React.createElement(CommandView, {command: command}), div