mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
up movement test
This commit is contained in:
parent
14e24f5a3c
commit
2f08608649
1 changed files with 157 additions and 59 deletions
|
@ -33,7 +33,6 @@ describe(`Really long text line goes to character within text line if text line
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world\n ' +
|
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
@ -61,7 +60,88 @@ describe(`Really long text line goes to character within text line if text line
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'hello world hello world hello world hello world hello world hello world hello world ' +
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
'\n\n\n\n\n\n\n\n\n ');
|
' \n ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'\n\n\n\n\n\n\n\n\n ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ' +
|
||||||
|
'hello world hello world hello world hello world hello world hello world hello world ');
|
||||||
cb();
|
cb();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -84,12 +164,30 @@ describe(`Really long text line goes to character within text line if text line
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
let previousLineNumber;
|
||||||
|
|
||||||
|
helper.pageDown();
|
||||||
|
await helper.waitForPromise(() => helper.caretLineNumber() >= previousLineNumber);
|
||||||
|
previousLineNumber = helper.caretLineNumber();
|
||||||
|
helper.pageDown();
|
||||||
|
await helper.waitForPromise(() => helper.caretLineNumber() >= previousLineNumber);
|
||||||
|
previousLineNumber = helper.caretLineNumber();
|
||||||
|
helper.pageDown();
|
||||||
|
await helper.waitForPromise(() => helper.caretLineNumber() >= previousLineNumber);
|
||||||
|
previousLineNumber = helper.caretLineNumber();
|
||||||
|
helper.pageDown();
|
||||||
|
await helper.waitForPromise(() => helper.caretLineNumber() >= previousLineNumber);
|
||||||
|
previousLineNumber = helper.caretLineNumber();
|
||||||
|
helper.pageDown();
|
||||||
|
await helper.waitForPromise(() => helper.caretLineNumber() >= previousLineNumber);
|
||||||
|
previousLineNumber = helper.caretLineNumber();
|
||||||
|
helper.pageDown();
|
||||||
|
await helper.waitForPromise(() => helper.caretLineNumber() >= previousLineNumber);
|
||||||
|
previousLineNumber = helper.caretLineNumber();
|
||||||
|
|
||||||
|
// we're at the bottom..
|
||||||
helper.pageUp();
|
helper.pageUp();
|
||||||
await helper.waitForPromise(() => {
|
// goes up within line but not pad
|
||||||
if ((helper.padInner$.document.getSelection().anchorOffset > 0) &&
|
await helper.waitForPromise(() => helper.caretLineNumber() === previousLineNumber);
|
||||||
(helper.caretLineNumber() === 1)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue