Show More
@@ -149,7 +149,7 b' casper.notebook_test(function () {' | |||
|
149 | 149 | 'import time\n' + |
|
150 | 150 | 'textbox = widgets.Text()\n' + |
|
151 | 151 | 'display(textbox)\n' + |
|
152 |
'textbox. |
|
|
152 | 'textbox._dom_classes = ["my-throttle-textbox"]\n' + | |
|
153 | 153 | 'def handle_change(name, old, new):\n' + |
|
154 | 154 | ' display(len(new))\n' + |
|
155 | 155 | ' time.sleep(0.5)\n' + |
@@ -166,7 +166,7 b' casper.notebook_test(function () {' | |||
|
166 | 166 | '.my-throttle-textbox'), 'Textbox exists.'); |
|
167 | 167 | |
|
168 | 168 | // Send 20 characters |
|
169 | this.sendKeys('.my-throttle-textbox', '....................'); | |
|
169 | this.sendKeys('.my-throttle-textbox input', '....................'); | |
|
170 | 170 | }); |
|
171 | 171 | |
|
172 | 172 | this.wait_for_widget(textbox); |
@@ -11,7 +11,7 b' casper.notebook_test(function () {' | |||
|
11 | 11 | 'button = widgets.Button()\n'+ |
|
12 | 12 | 'container.children = [button]\n'+ |
|
13 | 13 | 'display(container)\n'+ |
|
14 |
'container. |
|
|
14 | 'container._dom_classes = ["my-test-class"]\n'+ | |
|
15 | 15 | 'print("Success")\n'); |
|
16 | 16 | this.execute_cell_then(container_index, function(index){ |
|
17 | 17 | |
@@ -28,7 +28,7 b' casper.notebook_test(function () {' | |||
|
28 | 28 | |
|
29 | 29 | this.test.assert(this.cell_element_exists(index, |
|
30 | 30 | '.widget-area .widget-subarea .my-test-class'), |
|
31 |
' |
|
|
31 | '_dom_classes works.'); | |
|
32 | 32 | |
|
33 | 33 | this.test.assert(this.cell_element_exists(index, |
|
34 | 34 | '.widget-area .widget-subarea .my-test-class button'), |
@@ -49,7 +49,7 b' casper.notebook_test(function () {' | |||
|
49 | 49 | }); |
|
50 | 50 | |
|
51 | 51 | index = this.append_cell( |
|
52 |
'container. |
|
|
52 | 'container._dom_classes = []\n'+ | |
|
53 | 53 | 'print("Success")\n'); |
|
54 | 54 | this.execute_cell_then(index, function(index){ |
|
55 | 55 | |
@@ -58,7 +58,7 b' casper.notebook_test(function () {' | |||
|
58 | 58 | |
|
59 | 59 | this.test.assert(! this.cell_element_exists(container_index, |
|
60 | 60 | '.widget-area .widget-subarea .my-test-class'), |
|
61 | 'remove_class works.'); | |
|
61 | '_dom_classes can be used to remove a class.'); | |
|
62 | 62 | }); |
|
63 | 63 | |
|
64 | 64 | index = this.append_cell( |
@@ -7,11 +7,11 b' 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 .widget-hbox-single .my-second-float-text'; | |
|
10 | float_text.query = '.widget-area .widget-subarea .widget-hbox-single .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' + |
|
14 |
'float_widget. |
|
|
14 | 'float_widget._dom_classes = ["my-second-float-text"]\n' + | |
|
15 | 15 | 'print(float_widget.model_id)\n'); |
|
16 | 16 | this.execute_cell_then(float_text.index, function(index){ |
|
17 | 17 | float_text.model_id = this.get_output_cell(index).text.trim(); |
@@ -27,7 +27,6 b' casper.notebook_test(function () {' | |||
|
27 | 27 | // window. If we don't do this, the captured image will be black. |
|
28 | 28 | 'image.set_css({"background": "blue", "z-index": "9999", "position": "fixed", "top": "0px", "left": "0px"})\n' + |
|
29 | 29 | 'display(image)\n' + |
|
30 | 'image.add_class("my-test-image")\n' + | |
|
31 | 30 | 'print("Success")\n'); |
|
32 | 31 | this.execute_cell_then(image_index, function(index){ |
|
33 | 32 |
@@ -7,11 +7,11 b' 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 .widget-hbox-single .my-second-int-text'; | |
|
10 | int_text.query = '.widget-area .widget-subarea .widget-hbox-single .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' + |
|
14 |
'int_widget. |
|
|
14 | 'int_widget._dom_classes = ["my-second-int-text"]\n' + | |
|
15 | 15 | 'print(int_widget.model_id)\n'); |
|
16 | 16 | this.execute_cell_then(int_text.index, function(index){ |
|
17 | 17 | int_text.model_id = this.get_output_cell(index).text.trim(); |
@@ -64,12 +64,12 b' casper.notebook_test(function () {' | |||
|
64 | 64 | |
|
65 | 65 | var slider_query = '.widget-area .widget-subarea .widget-hbox-single .slider'; |
|
66 | 66 | var int_text2 = {}; |
|
67 | int_text2.query = '.widget-area .widget-subarea .widget-hbox-single .my-second-num-test-text'; | |
|
67 | int_text2.query = '.widget-area .widget-subarea .widget-hbox-single .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' + |
|
71 | 71 | '[display(intrange[i]) for i in range(2)]\n' + |
|
72 |
'intrange[0]. |
|
|
72 | 'intrange[0]._dom_classes = ["my-second-num-test-text"]\n' + | |
|
73 | 73 | 'print(intrange[0].model_id)\n'); |
|
74 | 74 | this.execute_cell_then(int_text2.index, function(index){ |
|
75 | 75 | int_text2.model_id = this.get_output_cell(index).text.trim(); |
General Comments 0
You need to be logged in to leave comments.
Login now