From dccf95465f758cdf2068f593f234005cf14dc5fe 2013-10-23 18:05:58 From: Paul Ivanov Date: 2013-10-23 18:05:58 Subject: [PATCH] make sure kernel started running --- diff --git a/IPython/html/tests/casperjs/util.js b/IPython/html/tests/casperjs/util.js index 30f3440..fc7709d 100644 --- a/IPython/html/tests/casperjs/util.js +++ b/IPython/html/tests/casperjs/util.js @@ -16,6 +16,7 @@ casper.open_new_notebook = function () { this.thenClick('button#new_notebook'); this.waitForPopup(''); + this.withPopup('', function () {this.waitForSelector('.CodeMirror-code');}); this.then(function () { // XXX: Kind of odd, the next line works for one test, but not when // running multiple tests back-to-back, so we will just point the main @@ -27,6 +28,12 @@ casper.open_new_notebook = function () { // initially, the cells aren't created, so wait for them to appear this.waitForSelector('.CodeMirror-code'); + // and make sure the kernel has started + this.waitFor(function kernel_ready() { + return this.evaluate(function kernel_ready() { + return IPython.notebook.kernel.running; + }); + }); }; // Shut down the current notebook's kernel.