Show More
@@ -57,15 +57,18 b' casper.delete_current_notebook = function () {' | |||||
57 | }); |
|
57 | }); | |
58 | }; |
|
58 | }; | |
59 |
|
59 | |||
60 | // wait for output in a given cell |
|
60 | // wait for the nth output in a given cell | |
61 | casper.wait_for_output = function (cell_num) { |
|
61 | casper.wait_for_output = function (cell_num, out_num) { | |
62 | this.waitFor(function (c) { |
|
62 | out_num = out_num || 0; | |
63 | return this.evaluate(function get_output(c) { |
|
63 | this.then(function() { | |
64 | var cell = IPython.notebook.get_cell(c); |
|
64 | this.waitFor(function (c, o) { | |
65 | return cell.output_area.outputs.length != 0; |
|
65 | return this.evaluate(function get_output(c, o) { | |
66 | }, |
|
66 | var cell = IPython.notebook.get_cell(c); | |
67 | // pass parameter from the test suite js to the browser code js |
|
67 | return cell.output_area.outputs.length > o; | |
68 | {c : cell_num}); |
|
68 | }, | |
|
69 | // pass parameter from the test suite js to the browser code js | |||
|
70 | {c : cell_num, o : out_num}); | |||
|
71 | }); | |||
69 | }, |
|
72 | }, | |
70 | function then() { }, |
|
73 | function then() { }, | |
71 | function timeout() { |
|
74 | function timeout() { |
General Comments 0
You need to be logged in to leave comments.
Login now