##// END OF EJS Templates
Merge pull request #6393 from jonasc/master...
Merge pull request #6393 from jonasc/master Fix description in "quick reference card" which did not match the code

File last commit:

r16840:e5b0732e
r17752:b32e6ff4 merge
Show More
dualmode_markdown.js
36 lines | 2.0 KiB | application/javascript | JavascriptLexer
Jonathan Frederic
Cleaned up test names and locations.
r15936
// Test
casper.notebook_test(function () {
var a = 'print("a")';
var index = this.append_cell(a);
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.execute_cell_then(index, function(index) {
Jonathan Frederic
Cleaned up test names and locations.
r15936 // Markdown rendering / unredering
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.select_cell(index);
this.validate_notebook_state('select ' + index, 'command', index);
Jonathan Frederic
Cleaned up test names and locations.
r15936 this.trigger_keydown('m');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.test.assertEquals(this.get_cell(index).cell_type, 'markdown', 'm; cell is markdown');
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(!this.is_cell_rendered(index), 'm; cell is unrendered');
Jonathan Frederic
Cleaned up test names and locations.
r15936 this.trigger_keydown('enter');
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(!this.is_cell_rendered(index), 'enter; cell is unrendered');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.validate_notebook_state('enter', 'edit', index);
Jonathan Frederic
Plus to minus shortcuts rebase fixes
r15946 this.trigger_keydown('ctrl-enter');
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(this.is_cell_rendered(index), 'ctrl-enter; cell is rendered');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.validate_notebook_state('enter', 'command', index);
Jonathan Frederic
Cleaned up test names and locations.
r15936 this.trigger_keydown('enter');
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(!this.is_cell_rendered(index), 'enter; cell is unrendered');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.select_cell(index-1);
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(!this.is_cell_rendered(index), 'select ' + (index-1) + '; cell ' + index + ' is still unrendered');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.validate_notebook_state('select ' + (index-1), 'command', index-1);
this.select_cell(index);
this.validate_notebook_state('select ' + index, 'command', index);
Jonathan Frederic
Plus to minus shortcuts rebase fixes
r15946 this.trigger_keydown('ctrl-enter');
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(this.is_cell_rendered(index), 'ctrl-enter; cell is rendered');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.select_cell(index-1);
this.validate_notebook_state('select ' + (index-1), 'command', index-1);
Jonathan Frederic
Plus to minus shortcuts rebase fixes
r15946 this.trigger_keydown('shift-enter');
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.validate_notebook_state('shift-enter', 'command', index);
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(this.is_cell_rendered(index), 'shift-enter; cell is rendered');
Jonathan Frederic
Plus to minus shortcuts rebase fixes
r15946 this.trigger_keydown('shift-enter'); // Creates one cell
Jonathan Frederic
Make notebook tests play nicely with SlimerJS...
r16831 this.validate_notebook_state('shift-enter', 'edit', index+1);
Jonathan Frederic
Moved is_cell_rendered into base
r16840 this.test.assert(this.is_cell_rendered(index), 'shift-enter; cell is rendered');
Jonathan Frederic
Cleaned up test names and locations.
r15936 });
});