Show More
@@ -413,7 +413,7 define(["widgets/js/manager", | |||
|
413 | 413 | this.model.on('change:_css', this.update_css, this); |
|
414 | 414 | |
|
415 | 415 | this.model.on('change:_dom_classes', function(model, new_classes) { |
|
416 |
var old_classes = model.previous(' |
|
|
416 | var old_classes = model.previous('_dom_classes'); | |
|
417 | 417 | this.update_classes(old_classes, new_classes); |
|
418 | 418 | }, this); |
|
419 | 419 |
@@ -36,16 +36,16 casper.notebook_test(function () { | |||
|
36 | 36 | }); |
|
37 | 37 | |
|
38 | 38 | index = this.append_cell( |
|
39 |
'container. |
|
|
39 | 'container.box_style = "success"\n'+ | |
|
40 | 40 | 'print("Success")\n'); |
|
41 | 41 | this.execute_cell_then(index, function(index){ |
|
42 | 42 | |
|
43 | 43 | this.test.assertEquals(this.get_output_cell(index).text, 'Success\n', |
|
44 |
'Set |
|
|
45 | ||
|
46 |
this.test.assert(this.cell_element_ |
|
|
47 | '.widget-area .widget-subarea .my-test-class', 'css', ['float'])=='right', | |
|
48 |
' |
|
|
44 | 'Set box_style cell executed with correct output.'); | |
|
45 | ||
|
46 | this.test.assert(this.cell_element_exists(container_index, | |
|
47 | '.widget-box.alert-success'), | |
|
48 | 'Set box_style works.'); | |
|
49 | 49 | }); |
|
50 | 50 | |
|
51 | 51 | index = this.append_cell( |
@@ -7,7 +7,7 casper.notebook_test(function () { | |||
|
7 | 7 | this.execute_cell_then(index); |
|
8 | 8 | |
|
9 | 9 | var float_text = {}; |
|
10 |
float_text.query = '.widget-area .widget-subarea . |
|
|
10 | float_text.query = '.widget-area .widget-subarea .my-second-float-text input'; | |
|
11 | 11 | float_text.index = this.append_cell( |
|
12 | 12 | 'float_widget = widgets.FloatText()\n' + |
|
13 | 13 | 'display(float_widget)\n' + |
@@ -55,9 +55,9 casper.notebook_test(function () { | |||
|
55 | 55 | 'Invald float textbox value caught and filtered.'); |
|
56 | 56 | }); |
|
57 | 57 | |
|
58 |
var float_text_query = '.widget-area .widget-subarea .widget- |
|
|
58 | var float_text_query = '.widget-area .widget-subarea .widget-numeric-text'; | |
|
59 | 59 | var slider = {}; |
|
60 |
slider.query = '.widget-area .widget-subarea . |
|
|
60 | slider.query = '.widget-area .widget-subarea .slider'; | |
|
61 | 61 | slider.index = this.append_cell( |
|
62 | 62 | 'floatrange = [widgets.BoundedFloatText(), \n' + |
|
63 | 63 | ' widgets.FloatSlider()]\n' + |
@@ -23,9 +23,6 casper.notebook_test(function () { | |||
|
23 | 23 | 'image.value = data\n' + |
|
24 | 24 | 'image.width = "50px"\n' + |
|
25 | 25 | 'image.height = "50px"\n' + |
|
26 | // Set css that will make the image render within the PhantomJS visible | |
|
27 | // window. If we don't do this, the captured image will be black. | |
|
28 | 'image.set_css({"background": "blue", "z-index": "9999", "position": "fixed", "top": "0px", "left": "0px"})\n' + | |
|
29 | 26 | 'display(image)\n' + |
|
30 | 27 | 'print("Success")\n'); |
|
31 | 28 | this.execute_cell_then(image_index, function(index){ |
@@ -7,7 +7,7 casper.notebook_test(function () { | |||
|
7 | 7 | this.execute_cell_then(index); |
|
8 | 8 | |
|
9 | 9 | var int_text = {}; |
|
10 |
int_text.query = '.widget-area .widget-subarea . |
|
|
10 | int_text.query = '.widget-area .widget-subarea .my-second-int-text input'; | |
|
11 | 11 | int_text.index = this.append_cell( |
|
12 | 12 | 'int_widget = widgets.IntText()\n' + |
|
13 | 13 | 'display(int_widget)\n' + |
@@ -62,9 +62,9 casper.notebook_test(function () { | |||
|
62 | 62 | this.execute_cell_then(index); |
|
63 | 63 | |
|
64 | 64 | |
|
65 |
var slider_query = '.widget-area .widget-subarea . |
|
|
65 | var slider_query = '.widget-area .widget-subarea .slider'; | |
|
66 | 66 | var int_text2 = {}; |
|
67 |
int_text2.query = '.widget-area .widget-subarea . |
|
|
67 | int_text2.query = '.widget-area .widget-subarea .my-second-num-test-text input'; | |
|
68 | 68 | int_text2.index = this.append_cell( |
|
69 | 69 | 'intrange = [widgets.BoundedIntTextWidget(),\n' + |
|
70 | 70 | ' widgets.IntSliderWidget()]\n' + |
@@ -165,7 +165,8 class _BoundedFloatRange(_FloatRange): | |||
|
165 | 165 | |
|
166 | 166 | class FloatRangeSlider(_BoundedFloatRange): |
|
167 | 167 | _view_name = Unicode('FloatSliderView', sync=True) |
|
168 |
orientation = Enum([ |
|
|
168 | orientation = CaselessStrEnum(values=['horizontal', 'vertical'], | |
|
169 | default_value='horizontal', allow_none=False, | |
|
169 | 170 | help="Vertical or horizontal.", sync=True) |
|
170 | 171 | _range = Bool(True, help="Display a range selector", sync=True) |
|
171 | 172 | readout = Bool(True, help="Display the current value of the slider next to it.", sync=True) |
@@ -169,7 +169,8 class _BoundedIntRange(_IntRange): | |||
|
169 | 169 | |
|
170 | 170 | class IntRangeSlider(_BoundedIntRange): |
|
171 | 171 | _view_name = Unicode('IntSliderView', sync=True) |
|
172 |
orientation = Enum([ |
|
|
172 | orientation = CaselessStrEnum(values=['horizontal', 'vertical'], | |
|
173 | default_value='horizontal', allow_none=False, | |
|
173 | 174 | help="Vertical or horizontal.", sync=True) |
|
174 | 175 | _range = Bool(True, help="Display a range selector", sync=True) |
|
175 | 176 | readout = Bool(True, help="Display the current value of the slider next to it.", sync=True) |
General Comments 0
You need to be logged in to leave comments.
Login now