get term to scroll so it refreshes
This commit is contained in:
@@ -745,11 +745,14 @@ describe('API Integration Tests', function(): void {
|
|||||||
});
|
});
|
||||||
it('should register a decoration and render it', async () => {
|
it('should register a decoration and render it', async () => {
|
||||||
await openTerminal(page);
|
await openTerminal(page);
|
||||||
await writeSync(page, '\\n\\n\\n\\n');
|
await openTerminal(page, { rows: 5 });
|
||||||
await writeSync(page, '\\n\\n\\n\\n');
|
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.marker = window.term.addMarker(1)`);
|
||||||
await page.evaluate(`window.decoration = window.term.registerDecoration({ marker: window.marker })`);
|
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);
|
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 () => {
|
it('on resize should dispose of the old decoration and create a new one', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user