##// END OF EJS Templates
Backport PR #5488: Added missing require and jquery from cdn....
Backport PR #5488: Added missing require and jquery from cdn. For some reason (I suppose some changes at the css level) the font size inside the input cells was fixed at 14 px... making the fonts really small in the reveal slideshows. This is really annoying... As a plus, I have also added the missing calls for require and jquery (as the full html template does). I think these fixes belong to 2.0, but I also know we are on the edge... so I hope to get it inside :wink: Cheers.

File last commit:

r15946:60417138
r16230:ba262623
Show More
dualmode_markdown.js
38 lines | 2.0 KiB | application/javascript | JavascriptLexer
// Test
casper.notebook_test(function () {
var a = 'print("a")';
var index = this.append_cell(a);
this.execute_cell_then(index);
this.then(function () {
// Markdown rendering / unredering
this.select_cell(1);
this.validate_notebook_state('select 1', 'command', 1);
this.trigger_keydown('m');
this.test.assertEquals(this.get_cell(1).cell_type, 'markdown', 'm; cell is markdown');
this.test.assertEquals(this.get_cell(1).rendered, false, 'm; cell is rendered');
this.trigger_keydown('enter');
this.test.assertEquals(this.get_cell(1).rendered, false, 'enter; cell is unrendered');
this.validate_notebook_state('enter', 'edit', 1);
this.trigger_keydown('ctrl-enter');
this.test.assertEquals(this.get_cell(1).rendered, true, 'ctrl-enter; cell is rendered');
this.validate_notebook_state('enter', 'command', 1);
this.trigger_keydown('enter');
this.test.assertEquals(this.get_cell(1).rendered, false, 'enter; cell is unrendered');
this.select_cell(0);
this.test.assertEquals(this.get_cell(1).rendered, false, 'select 0; cell 1 is still unrendered');
this.validate_notebook_state('select 0', 'command', 0);
this.select_cell(1);
this.validate_notebook_state('select 1', 'command', 1);
this.trigger_keydown('ctrl-enter');
this.test.assertEquals(this.get_cell(1).rendered, true, 'ctrl-enter; cell is rendered');
this.select_cell(0);
this.validate_notebook_state('select 0', 'command', 0);
this.trigger_keydown('shift-enter');
this.validate_notebook_state('shift-enter', 'command', 1);
this.test.assertEquals(this.get_cell(1).rendered, true, 'shift-enter; cell is rendered');
this.trigger_keydown('shift-enter'); // Creates one cell
this.validate_notebook_state('shift-enter', 'edit', 2);
this.test.assertEquals(this.get_cell(1).rendered, true, 'shift-enter; cell is rendered');
});
});