tests: fix enter test

This commit is contained in:
John McLear 2021-02-07 06:59:32 +00:00
parent f8a19c4527
commit 1f0cb01110

View file

@ -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];
const scrolledAmount = scrolledWindow.contentWindow.pageYOffset + await helper.waitFor(() => {
const scrolledAmount = scrolledWindow.contentWindow.pageYOffset +
scrolledWindow.contentWindow.innerHeight; scrolledWindow.contentWindow.innerHeight;
await helper.waitFor(() => scrolledAmount >= bottomOfLastLine); return scrolledAmount >= bottomOfLastLine;
});
}); });
}); });