get term to scroll so it refreshes

This commit is contained in:
meganrogge
2022-02-09 15:29:28 -06:00
parent bf5fed083b
commit 74246497a4
+6 -3
View File
@@ -745,11 +745,14 @@ describe('API Integration Tests', function(): void {
});
it('should register a decoration and render it', async () => {
await openTerminal(page);
await writeSync(page, '\\n\\n\\n\\n');
await writeSync(page, '\\n\\n\\n\\n');
await openTerminal(page, { rows: 5 });
await page.evaluate(`
for (let i = 0; i < 4; i++) {
window.term.writeln('foo');
}
`);
await page.evaluate(`window.marker = window.term.addMarker(1)`);
await page.evaluate(`window.decoration = window.term.registerDecoration({ marker: window.marker })`);
await writeSync(page, '\\n\\n\\n\\n');
assert.equal(await page.evaluate(`document.querySelectorAll('.xterm-screen .xterm-decoration').length`), 1);
});
it('on resize should dispose of the old decoration and create a new one', async () => {