Show More
@@ -22,21 +22,23 b' casper.notebook_test(function () {' | |||
|
22 | 22 | }; |
|
23 | 23 | |
|
24 | 24 | // Test widget dependencies //////////////////////////////////////////////// |
|
25 | run_python_code('from IPython.html import widgets\n' + | |
|
26 | 'from IPython.display import display, clear_output\n' + | |
|
27 | 'widgets.init_widget_js()'); | |
|
28 | this.wait(500); // Wait for require.js async callbacks to load dependencies. | |
|
29 | ||
|
30 | 25 | this.then(function () { |
|
31 | 26 | |
|
32 | 27 | // Check if the WidgetManager class is defined. |
|
33 | 28 | this.test.assert(this.evaluate(function() { |
|
34 | 29 | return IPython.WidgetManager != undefined; |
|
35 | 30 | }), 'WidgetManager class is defined'); |
|
31 | }); | |
|
36 | 32 | |
|
33 | run_python_code('from IPython.html import widgets\n' + | |
|
34 | 'from IPython.display import display, clear_output\n' + | |
|
35 | 'print("Success")'); | |
|
36 | this.wait(500); // Wait for require.js async callbacks to load dependencies. | |
|
37 | ||
|
38 | this.then(function () { | |
|
37 | 39 | // Check if the widget manager has been instanciated. |
|
38 | 40 | this.test.assert(this.evaluate(function() { |
|
39 |
return IPython |
|
|
41 | return IPython.widget_manager != undefined; | |
|
40 | 42 | }), 'Notebook widget manager instanciated'); |
|
41 | 43 | }); |
|
42 | 44 | |
@@ -53,7 +55,7 b' casper.notebook_test(function () {' | |||
|
53 | 55 | // suffixed). |
|
54 | 56 | var javascript_names = this.evaluate(function () { |
|
55 | 57 | names = []; |
|
56 |
for (var name in IPython. |
|
|
58 | for (var name in IPython.widget_manager.widget_model_types) { | |
|
57 | 59 | names.push(name.replace('Model','')); |
|
58 | 60 | } |
|
59 | 61 | return names; |
General Comments 0
You need to be logged in to leave comments.
Login now