##// END OF EJS Templates
Backport PR #7106: Changed the display order of rich output in nbconvert html...
Backport PR #7106: Changed the display order of rich output in nbconvert html The notebook rich output display order now matches that of nbconvert. This makes more sense than the other way around due to the need for the that are notebooks already shared on the web to remain consistent. Conversely local notebooks can simply be edited to match the new order.

File last commit:

r15936:c5e9bff0
r20383:70ced73a
Show More
dualmode_cellmode.js
27 lines | 1.4 KiB | application/javascript | JavascriptLexer
// Test keyboard shortcuts that change the cell's mode.
// Test
casper.notebook_test(function () {
this.then(function () {
// Cell mode change
this.select_cell(0);
this.trigger_keydown('esc','r');
this.test.assertEquals(this.get_cell(0).cell_type, 'raw', 'r; cell is raw');
this.trigger_keydown('1');
this.test.assertEquals(this.get_cell(0).cell_type, 'heading', '1; cell is heading');
this.test.assertEquals(this.get_cell(0).level, 1, '1; cell is level 1 heading');
this.trigger_keydown('2');
this.test.assertEquals(this.get_cell(0).level, 2, '2; cell is level 2 heading');
this.trigger_keydown('3');
this.test.assertEquals(this.get_cell(0).level, 3, '3; cell is level 3 heading');
this.trigger_keydown('4');
this.test.assertEquals(this.get_cell(0).level, 4, '4; cell is level 4 heading');
this.trigger_keydown('5');
this.test.assertEquals(this.get_cell(0).level, 5, '5; cell is level 5 heading');
this.trigger_keydown('6');
this.test.assertEquals(this.get_cell(0).level, 6, '6; cell is level 6 heading');
this.trigger_keydown('m');
this.test.assertEquals(this.get_cell(0).cell_type, 'markdown', 'm; cell is markdown');
this.trigger_keydown('y');
this.test.assertEquals(this.get_cell(0).cell_type, 'code', 'y; cell is code');
});
});