2013-10-30 07:42:45 +08:00
|
|
|
|
|
|
|
//
|
|
|
|
// Miscellaneous javascript tests
|
|
|
|
//
|
|
|
|
casper.notebook_test(function () {
|
|
|
|
var jsver = this.evaluate(function () {
|
|
|
|
var cell = IPython.notebook.get_cell(0);
|
2013-11-08 08:26:04 +08:00
|
|
|
cell.set_text('import IPython; print(IPython.__version__)');
|
2013-10-30 07:42:45 +08:00
|
|
|
cell.execute();
|
2013-11-08 08:26:04 +08:00
|
|
|
return IPython.version;
|
2013-10-30 07:42:45 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
this.wait_for_output(0);
|
|
|
|
|
|
|
|
// refactor this into just a get_output(0)
|
|
|
|
this.then(function () {
|
|
|
|
var result = this.get_output_cell(0);
|
|
|
|
this.test.assertEquals(result.text.trim(), jsver, 'IPython.version in JS matches IPython.');
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|