##// END OF EJS Templates
use dashboard to simulate clicking new notebook
Paul Ivanov -
Show More
@@ -12,7 +12,19 b' casper.get_notebook_server = function () {'
12 // Create and open a new notebook.
12 // Create and open a new notebook.
13 casper.open_new_notebook = function () {
13 casper.open_new_notebook = function () {
14 var baseUrl = this.get_notebook_server();
14 var baseUrl = this.get_notebook_server();
15 this.start(baseUrl + '/new');
15 this.start(baseUrl);
16 this.thenClick('button#new_notebook');
17 this.waitForPopup('');
18
19 this.then(function () {
20 // XXX: Kind of odd, the next line works for one test, but not when
21 // running multiple tests back-to-back, so we will just point the main
22 // casper browser to the same URL as the popup we just grabbed.
23
24 //this.page = this.popups[0];
25 this.open(this.popups[0].url);
26 });
27
16 // initially, the cells aren't created, so wait for them to appear
28 // initially, the cells aren't created, so wait for them to appear
17 this.waitForSelector('.CodeMirror-code');
29 this.waitForSelector('.CodeMirror-code');
18 };
30 };
General Comments 0
You need to be logged in to leave comments. Login now