-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
using isCursorInitialized for domrenderer #4798
using isCursorInitialized for domrenderer #4798
Conversation
Testing failed in Linux... 😒 |
It would be initialized because for each test
This does not reset the cursor initialization state: xterm.js/src/browser/Terminal.ts Lines 1231 to 1251 in 32c6165
Since creating a new terminal can complicate the test side effects, we could solve this by making a new inject function: export function injectSharedRendererTestsStandalone(ctx: ISharedRendererTestContext): void {
...
} These can then re-create the terminal before each test which is probably just a matter of calling dispose terminal and then test('render when visible after hidden', async () => {
await openTerminal(ctx);
await ctx.page.evaluate(`
if ('term' in window) {
try {
window.term.dispose();
} catch {}
}
`);
await ctx.page.evaluate(`document.querySelector('#terminal-container').style.display='none'`);
await ctx.page.evaluate(`window.term = new Terminal()`);
await ctx.page.evaluate(`window.term.open(document.querySelector('#terminal-container'))`);
await ctx.page.evaluate(`document.querySelector('#terminal-container').style.display=''`);
await pollFor(ctx.page, `window.term._core._renderService.dimensions.css.cell.width > 0`, true);
}); |
I see, adjust it. |
I still need to modify. This way of opening the page is inefficient. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM provided it changes after my changes to also run these in canvas/webgl 👍
fix #4790