From 57b9550b8d19ff4ca92255e2b358b7273a61aba1 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Tue, 8 Dec 2015 17:44:25 +0100 Subject: [PATCH] Fix test and move in their own file --- .../tests/notebook/clipboard_multiselect.js | 37 +++++++++++++++++++ notebook/tests/notebook/dualmode_clipboard.js | 37 ------------------- 2 files changed, 37 insertions(+), 37 deletions(-) create mode 100644 notebook/tests/notebook/clipboard_multiselect.js diff --git a/notebook/tests/notebook/clipboard_multiselect.js b/notebook/tests/notebook/clipboard_multiselect.js new file mode 100644 index 000000000..83b5f1d1f --- /dev/null +++ b/notebook/tests/notebook/clipboard_multiselect.js @@ -0,0 +1,37 @@ + + +// Test +casper.notebook_test(function () { + this.append_cell('1'); + this.append_cell('2'); + this.append_cell('3'); + this.append_cell('a'); + this.append_cell('b'); + this.append_cell('c'); + + + this.then(function () { + // Copy/paste/cut + var num_cells = this.get_cells_length(); + this.test.assertEquals(this.get_cell_text(1), '1', 'YOUUUUUU Verify that cell 1 is a'); + this.select_cell(1); + this.select_cell(3, false); + + this.trigger_keydown('c'); // Copy + + this.select_cell(5) + + this.evaluate(function () { + $("#paste_cell_replace").click(); + }); + + var expected_state = ['','1','2','3', 'a', '1', '2', '3', 'c']; + + for (var i=1; i