Show More
@@ -105,7 +105,7 casper.notebook_test(function () { | |||
|
105 | 105 | this.validate_state('alt+enter (start in command mode)', 'edit', base_index + 1); |
|
106 | 106 | |
|
107 | 107 | // Notebook will now have 8 cells, the index of the last cell will be 7. |
|
108 | this.test.assertEquals(this.get_cells.length, 8, '*-enter commands added cells where needed.'); | |
|
108 | this.test.assertEquals(this.get_cells().length, 8, '*-enter commands added cells where needed.'); | |
|
109 | 109 | this.click_cell(7); |
|
110 | 110 | this.trigger_keydown('esc'); |
|
111 | 111 | this.validate_state('click cell ' + 7 + ' and esc', 'command', 7); |
@@ -129,8 +129,23 casper.notebook_test(function () { | |||
|
129 | 129 | this.test.assertEquals(this.get_cell(7).cell_type, 'markdown', 'm; cell is markdown'); |
|
130 | 130 | this.trigger_keydown('y'); |
|
131 | 131 | this.test.assertEquals(this.get_cell(7).cell_type, 'code', 'y; cell is code'); |
|
132 | ||
|
133 | this.trigger_keydown('d'); | |
|
134 | this.trigger_keydown('d'); | |
|
135 | this.test.assertEquals(this.get_cells().length, 7, 'dd actually deletes a cell'); | |
|
136 | this.validate_state('dd', 'command', 6); | |
|
137 | ||
|
138 | // Make sure that if the time between d presses is too long | |
|
139 | this.trigger_keydown('d'); | |
|
132 | 140 | }); |
|
141 | this.wait(1000); | |
|
142 | this.then(function () { | |
|
143 | this.trigger_keydown('d'); | |
|
133 | 144 | |
|
145 | this.test.assertEquals(this.get_cells().length, 6, "d, 1 second wait, d doesn't delete a cell"); | |
|
146 | this.validate_state('d, 1 second wait, d', 'command', 6); | |
|
147 | ||
|
148 | }); | |
|
134 | 149 | |
|
135 | 150 | // Utility functions. |
|
136 | 151 | this.validate_state = function(message, mode, cell_index) { |
General Comments 0
You need to be logged in to leave comments.
Login now