Tweak canvas renderer test

This commit is contained in:
Daniel Imms
2023-09-08 12:22:38 -07:00
parent 71eb897708
commit 408240dd97
2 changed files with 4 additions and 5 deletions
@@ -6,19 +6,18 @@
import test from '@playwright/test';
import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests';
import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils';
import { platform } from 'os';
let ctx: ITestContext;
const ctxWrapper: ISharedRendererTestContext = {
value: undefined,
skipSelectionTests: true
skipCanvasExceptions: true
} as any;
test.beforeAll(async ({ browser }) => {
ctx = await createTestContext(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);
`);
});
@@ -16,7 +16,7 @@ test.beforeAll(async ({ browser }) => {
await openTerminal(ctx);
ctxWrapper.value = ctx;
await ctx.page.evaluate(`
window.addon = new WebglAddon(true);
window.addon = new window.WebglAddon(true);
window.term.loadAddon(window.addon);
`);
});
@@ -35,7 +35,7 @@ test.describe('WebGL Renderer Integration Tests', async () => {
strictEqual(await ctx.page.evaluate(`document.querySelectorAll('.xterm canvas').length`), 0);
// Re-create webgl addon to avoid side effects impacting other tests
await ctx.page.evaluate(`
window.addon = new WebglAddon(true);
window.addon = new window.WebglAddon(true);
window.term.loadAddon(window.addon);
`);
});