adjust some events in nb_roundtrip

hopefully should address some intermittent failures due to race conditions
This commit is contained in:
MinRK 2014-02-07 13:49:30 -08:00
parent 3f47f6287b
commit e14172d851

View File

@ -64,9 +64,12 @@ function clear_and_execute(that, code) {
IPython.notebook.get_cell(0).clear_output();
IPython.notebook.get_cell(1).clear_output();
});
that.set_cell_text(0, code);
that.execute_cell(0);
}
that.then(function () {
that.set_cell_text(0, code);
that.execute_cell(0);
that.wait_for_idle();
});
};
casper.notebook_test(function () {
this.evaluate(function () {
@ -77,13 +80,9 @@ casper.notebook_test(function () {
"IPython.notebook.insert_cell_below('code')"
].join('\n')
);
cell.execute();
});
this.wait_for_output(0);
this.then(function ( ) {
this.execute_cell_then(0, function () {
var result = this.get_output_cell(0);
var num_cells = this.get_cells_length();
this.test.assertEquals(num_cells, 2, '%%javascript magic works');