##// END OF EJS Templates
remove python2.5 compat info
remove python2.5 compat info

File last commit:

r17929:22e0a586
r18041:eac159d1
Show More
widget_string.js
53 lines | 2.3 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Organized tests.
r14464 // Test widget string class
casper.notebook_test(function () {
index = this.append_cell(
'from IPython.html import widgets\n' +
'from IPython.display import display, clear_output\n' +
'print("Success")');
this.execute_cell_then(index);
var string_index = this.append_cell(
Jonathan Frederic
Renamed *Widget to *,...
r17598 'string_widget = [widgets.Text(value = "xyz", placeholder = "abc"),\n' +
' widgets.Textarea(value = "xyz", placeholder = "def"),\n' +
' widgets.HTML(value = "xyz"),\n' +
' widgets.Latex(value = "$\\\\LaTeX{}$")]\n' +
Jonathan Frederic
Many checks off the todo list, test fixes
r14583 '[display(widget) for widget in string_widget]\n'+
Jonathan Frederic
Organized tests.
r14464 'print("Success")');
this.execute_cell_then(string_index, function(index){
MinRK
first review pass on widget tests
r14797 this.test.assertEquals(this.get_output_cell(index).text, 'Success\n',
Jonathan Frederic
Organized tests.
r14464 'Create string widget cell executed with correct output.');
this.test.assert(this.cell_element_exists(index,
'.widget-area .widget-subarea'),
'Widget subarea exists.');
this.test.assert(this.cell_element_exists(index,
Jonathan Frederic
Cleaned up hbox and vbox widget div styles,...
r17929 '.widget-area .widget-subarea .widget-hbox input[type=text]'),
Jonathan Frederic
Organized tests.
r14464 'Textbox exists.');
this.test.assert(this.cell_element_exists(index,
'.widget-area .widget-subarea .widget-hbox textarea'),
'Textarea exists.');
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox textarea', 'val')=='xyz',
'Python set textarea value.');
this.test.assert(this.cell_element_function(index,
Jonathan Frederic
Cleaned up hbox and vbox widget div styles,...
r17929 '.widget-area .widget-subarea .widget-hbox input[type=text]', 'val')=='xyz',
Jonathan Frederic
Organized tests.
r14464 'Python set textbox value.');
this.test.assert(this.cell_element_exists(string_index,
'.widget-area .widget-subarea div span.MathJax_Preview'),
'MathJax parsed the LaTeX successfully.');
Jessica B. Hamrick
Add javascript tests for placeholder feature
r16344
this.test.assert(this.cell_element_function(index,
'.widget-area .widget-subarea .widget-hbox textarea', 'attr', ['placeholder'])=='def',
'Python set textarea placeholder.');
this.test.assert(this.cell_element_function(index,
Jonathan Frederic
Cleaned up hbox and vbox widget div styles,...
r17929 '.widget-area .widget-subarea .widget-hbox input[type=text]', 'attr', ['placeholder'])=='abc',
Jessica B. Hamrick
Add javascript tests for placeholder feature
r16344 'Python set textbox placehoder.');
Jonathan Frederic
Organized tests.
r14464 });
Jessica B. Hamrick
Add javascript tests for placeholder feature
r16344 });