From 579643e8578105f864208e29c02d21a56e377611 2015-01-23 23:07:25
From: Min RK <benjaminrk@gmail.com>
Date: 2015-01-23 23:07:25
Subject: [PATCH] wait for new-notebook button to arrive

before clicking it.

Race condition was causing intermittent test failures.
---

diff --git a/IPython/html/tests/util.js b/IPython/html/tests/util.js
index 3753fbd..0f89b00 100644
--- a/IPython/html/tests/util.js
+++ b/IPython/html/tests/util.js
@@ -13,6 +13,7 @@ casper.open_new_notebook = function () {
     var baseUrl = this.get_notebook_server();
     this.start(baseUrl);
     this.waitFor(this.page_loaded);
+    this.waitForSelector('#kernel-python2 a, #kernel-python3 a');
     this.thenClick('#kernel-python2 a, #kernel-python3 a');
     
     this.waitForPopup('');