Show More
@@ -12,14 +12,14 casper.notebook_test(function () { | |||||
12 |
|
12 | |||
13 | this.thenEvaluate(function (nbname) { |
|
13 | this.thenEvaluate(function (nbname) { | |
14 | require(['base/js/events'], function (events) { |
|
14 | require(['base/js/events'], function (events) { | |
15 |
IPython.notebook.notebook_name |
|
15 | IPython.notebook.set_notebook_name(nbname); | |
16 | IPython._save_success = IPython._save_failed = false; |
|
16 | IPython._save_success = IPython._save_failed = false; | |
17 | events.on('notebook_saved.Notebook', function () { |
|
17 | events.on('notebook_saved.Notebook', function () { | |
18 | IPython._save_success = true; |
|
18 | IPython._save_success = true; | |
19 | }); |
|
19 | }); | |
20 | events.on('notebook_save_failed.Notebook', |
|
20 | events.on('notebook_save_failed.Notebook', | |
21 |
function (event, |
|
21 | function (event, error) { | |
22 |
IPython._save_failed = "save failed with " + |
|
22 | IPython._save_failed = "save failed with " + error; | |
23 | }); |
|
23 | }); | |
24 | IPython.notebook.save_notebook(); |
|
24 | IPython.notebook.save_notebook(); | |
25 | }); |
|
25 | }); | |
@@ -42,6 +42,10 casper.notebook_test(function () { | |||||
42 | return IPython.notebook.notebook_name; |
|
42 | return IPython.notebook.notebook_name; | |
43 | }); |
|
43 | }); | |
44 | this.test.assertEquals(current_name, nbname, "Save with complicated name"); |
|
44 | this.test.assertEquals(current_name, nbname, "Save with complicated name"); | |
|
45 | var current_path = this.evaluate(function(){ | |||
|
46 | return IPython.notebook.notebook_path; | |||
|
47 | }); | |||
|
48 | this.test.assertEquals(current_path, nbname, "path OK"); | |||
45 | }); |
|
49 | }); | |
46 |
|
50 | |||
47 | this.thenEvaluate(function(){ |
|
51 | this.thenEvaluate(function(){ | |
@@ -68,11 +72,8 casper.notebook_test(function () { | |||||
68 | }); |
|
72 | }); | |
69 |
|
73 | |||
70 | this.then(function(){ |
|
74 | this.then(function(){ | |
71 | var baseUrl = this.get_notebook_server(); |
|
75 | this.open_dashboard(); | |
72 | this.open(baseUrl); |
|
|||
73 | }); |
|
76 | }); | |
74 |
|
||||
75 | this.waitForSelector('.list_item'); |
|
|||
76 |
|
77 | |||
77 | this.then(function(){ |
|
78 | this.then(function(){ | |
78 | var notebook_url = this.evaluate(function(nbname){ |
|
79 | var notebook_url = this.evaluate(function(nbname){ | |
@@ -92,11 +93,11 casper.notebook_test(function () { | |||||
92 | }); |
|
93 | }); | |
93 |
|
94 | |||
94 | // wait for the notebook |
|
95 | // wait for the notebook | |
95 | this.waitForSelector("#notebook"); |
|
96 | this.waitFor(this.kernel_running); | |
96 |
|
97 | |||
97 | this.waitFor(function(){ |
|
98 | this.waitFor(function() { | |
98 | return this.evaluate(function(){ |
|
99 | return this.evaluate(function () { | |
99 |
return IPython.notebook |
|
100 | return IPython && IPython.notebook && true; | |
100 | }); |
|
101 | }); | |
101 | }); |
|
102 | }); | |
102 |
|
103 |
General Comments 0
You need to be logged in to leave comments.
Login now