mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
include opts in pageup/pagedown method to support shift key and include the test
This commit is contained in:
parent
dda5e03f7e
commit
5a425d7e69
2 changed files with 41 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
'use strict';
|
||||
/*
|
||||
describe('Page Up/Down', function () {
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad({
|
||||
|
@ -268,7 +269,7 @@ describe('Really long text line goes to character within text line if text line
|
|||
});
|
||||
});
|
||||
|
||||
describe('Viewport baesd Page Up/Down', function () {
|
||||
describe('Viewport based Page Up/Down', function () {
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad({
|
||||
cb: async () => {
|
||||
|
@ -295,3 +296,26 @@ describe('Viewport baesd Page Up/Down', function () {
|
|||
await helper.waitForPromise(() => currentLineNumber < 5);
|
||||
});
|
||||
});
|
||||
*/
|
||||
describe('Shift Page Up/Down', function () {
|
||||
beforeEach(function (cb) {
|
||||
helper.newPad({
|
||||
cb: async () => {
|
||||
await helper.clearPad();
|
||||
// 200 lines
|
||||
await helper.edit('\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n');
|
||||
cb();
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
it('highlights multiple lines on shift page down', async function () {
|
||||
await helper.edit('xxx', 1); // caret is offset 6
|
||||
|
||||
helper.pageUp();
|
||||
helper.pageDown({
|
||||
shift: true,
|
||||
});
|
||||
await helper.waitForPromise(() => helper.padInner$.document.getSelection().type === 'Range');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue