##// END OF EJS Templates
Backport PR #6005: Changed right arrow key movement function to mirror left arrow key...
Backport PR #6005: Changed right arrow key movement function to mirror left arrow key Seems to solve Issue #5926 on this machine, and passing the test file locally. Changed from `cursor.movePosition` to `self._control.moveCursor`, the latter is what the left-arrow key uses. Also removed line 1373 which seems unnecessary and which prevents the cursor from moving at all. I'm not certain how to further test this to make sure nothing was broken.

File last commit:

r17050:01ba807a
r17151:477b3912
Show More
markdown.js
36 lines | 1.3 KiB | application/javascript | JavascriptLexer
//
// Test that a Markdown cell is rendered to HTML.
//
casper.notebook_test(function () {
// Test JavaScript models.
var output = this.evaluate(function () {
IPython.notebook.to_markdown();
var cell = IPython.notebook.get_selected_cell();
cell.set_text('# Foo');
cell.render();
return cell.get_rendered();
});
this.test.assertEquals(output.trim(), '<h1 id=\"foo\">Foo</h1>', 'Markdown JS API works.');
// Test menubar entries.
output = this.evaluate(function () {
$('#to_code').mouseenter().click();
$('#to_markdown').mouseenter().click();
var cell = IPython.notebook.get_selected_cell();
cell.set_text('# Foo');
$('#run_cell').mouseenter().click();
return cell.get_rendered();
});
this.test.assertEquals(output.trim(), '<h1 id=\"foo\">Foo</h1>', 'Markdown menubar items work.');
// Test toolbar buttons.
output = this.evaluate(function () {
$('#cell_type').val('code').change();
$('#cell_type').val('markdown').change();
var cell = IPython.notebook.get_selected_cell();
cell.set_text('# Foo');
$('#run_b').click();
return cell.get_rendered();
});
this.test.assertEquals(output.trim(), '<h1 id=\"foo\">Foo</h1>', 'Markdown toolbar items work.');
});