wait for new-notebook button to arrive

before clicking it.

Race condition was causing intermittent test failures.
This commit is contained in:
Min RK 2015-01-23 15:07:25 -08:00
parent 5dfece0a2a
commit 99faeddf36

View File

@ -13,6 +13,7 @@ casper.open_new_notebook = function () {
var baseUrl = this.get_notebook_server(); var baseUrl = this.get_notebook_server();
this.start(baseUrl); this.start(baseUrl);
this.waitFor(this.page_loaded); this.waitFor(this.page_loaded);
this.waitForSelector('#kernel-python2 a, #kernel-python3 a');
this.thenClick('#kernel-python2 a, #kernel-python3 a'); this.thenClick('#kernel-python2 a, #kernel-python3 a');
this.waitForPopup(''); this.waitForPopup('');