Show More
@@ -91,6 +91,27 b' casper.notebook_test(function () {' | |||||
91 | this.test.assert(found, python_name + ' exists in javascript'); |
|
91 | this.test.assert(found, python_name + ' exists in javascript'); | |
92 | } |
|
92 | } | |
93 | } |
|
93 | } | |
|
94 | ||||
|
95 | // Try to create a button widget | |||
|
96 | cell_index = run_python_code('button = widgets.ButtonWidget()\n' + | |||
|
97 | 'display(button)\n'+ | |||
|
98 | 'print("Success")'); | |||
|
99 | ||||
|
100 | this.then(function () { | |||
|
101 | ||||
|
102 | // Check if the WidgetManager class is defined. | |||
|
103 | var $widget_subarea = this.evaluate(function() { | |||
|
104 | var $cell = IPython.notebook.get_cell_element(cell_index); | |||
|
105 | return $cell.find('.widget-area.widget-subarea'); | |||
|
106 | }); | |||
|
107 | ||||
|
108 | // Make sure the widget subarea was found. | |||
|
109 | this.test.assert($widget_subarea.length > 0, 'Create button widget, widget subarea exist?'); | |||
|
110 | ||||
|
111 | var $widget_button = $widget_subarea.find('button'); | |||
|
112 | this.test.assert($$widget_button.length > 0, 'Create button widget, widget button exist?'); | |||
|
113 | } | |||
|
114 | ||||
94 | }); |
|
115 | }); | |
95 |
|
116 | |||
96 |
|
117 |
General Comments 0
You need to be logged in to leave comments.
Login now