diff --git a/addons/xterm-addon-canvas/test/CanvasRenderer.test.ts b/addons/xterm-addon-canvas/test/CanvasRenderer.test.ts index b46c813a..76f57394 100644 --- a/addons/xterm-addon-canvas/test/CanvasRenderer.test.ts +++ b/addons/xterm-addon-canvas/test/CanvasRenderer.test.ts @@ -17,7 +17,7 @@ test.beforeAll(async ({ browser }) => { await openTerminal(ctx); ctxWrapper.value = ctx; await ctx.page.evaluate(` - window.addon = new CanvasAddon(true); + window.addon = new window.CanvasAddon(true); window.term.loadAddon(window.addon); `); }); diff --git a/test/playwright/TestUtils.ts b/test/playwright/TestUtils.ts index 68ef2d69..6bf3eb8f 100644 --- a/test/playwright/TestUtils.ts +++ b/test/playwright/TestUtils.ts @@ -363,7 +363,7 @@ export async function openTerminal(ctx: ITestContext, options: ITerminalOptions // assertion catches this case early. strictEqual(await ctx.page.evaluate(`document.querySelector('#terminal-container').children.length`), 0, 'there must be no terminals on the page'); await ctx.page.evaluate(` - window.term = new Terminal(${JSON.stringify({ allowProposedApi: true, ...options })}); + window.term = new window.Terminal(${JSON.stringify({ allowProposedApi: true, ...options })}); window.term.open(document.querySelector('#terminal-container')); `); await ctx.page.waitForSelector('.xterm-rows');