mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
tests: fix enter test
This commit is contained in:
parent
f8a19c4527
commit
1f0cb01110
1 changed files with 4 additions and 2 deletions
|
@ -51,8 +51,10 @@ describe('enter keystroke', function () {
|
||||||
const lastLine = helper.padInner$('div').last();
|
const lastLine = helper.padInner$('div').last();
|
||||||
const bottomOfLastLine = lastLine.offset().top + lastLine.height();
|
const bottomOfLastLine = lastLine.offset().top + lastLine.height();
|
||||||
const scrolledWindow = helper.padChrome$('iframe')[0];
|
const scrolledWindow = helper.padChrome$('iframe')[0];
|
||||||
|
await helper.waitFor(() => {
|
||||||
const scrolledAmount = scrolledWindow.contentWindow.pageYOffset +
|
const scrolledAmount = scrolledWindow.contentWindow.pageYOffset +
|
||||||
scrolledWindow.contentWindow.innerHeight;
|
scrolledWindow.contentWindow.innerHeight;
|
||||||
await helper.waitFor(() => scrolledAmount >= bottomOfLastLine);
|
return scrolledAmount >= bottomOfLastLine;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue