Add window prefer to global symbols
This commit is contained in:
@@ -17,7 +17,7 @@ test.beforeAll(async ({ browser }) => {
|
|||||||
await openTerminal(ctx);
|
await openTerminal(ctx);
|
||||||
ctxWrapper.value = ctx;
|
ctxWrapper.value = ctx;
|
||||||
await ctx.page.evaluate(`
|
await ctx.page.evaluate(`
|
||||||
window.addon = new CanvasAddon(true);
|
window.addon = new window.CanvasAddon(true);
|
||||||
window.term.loadAddon(window.addon);
|
window.term.loadAddon(window.addon);
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ export async function openTerminal(ctx: ITestContext, options: ITerminalOptions
|
|||||||
// assertion catches this case early.
|
// 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');
|
strictEqual(await ctx.page.evaluate(`document.querySelector('#terminal-container').children.length`), 0, 'there must be no terminals on the page');
|
||||||
await ctx.page.evaluate(`
|
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'));
|
window.term.open(document.querySelector('#terminal-container'));
|
||||||
`);
|
`);
|
||||||
await ctx.page.waitForSelector('.xterm-rows');
|
await ctx.page.waitForSelector('.xterm-rows');
|
||||||
|
|||||||
Reference in New Issue
Block a user