Tweak canvas renderer test
This commit is contained in:
@@ -6,19 +6,18 @@
|
|||||||
import test from '@playwright/test';
|
import test from '@playwright/test';
|
||||||
import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests';
|
import { ISharedRendererTestContext, injectSharedRendererTests } from '../../../out-test/playwright/SharedRendererTests';
|
||||||
import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils';
|
import { ITestContext, createTestContext, openTerminal } from '../../../out-test/playwright/TestUtils';
|
||||||
import { platform } from 'os';
|
|
||||||
|
|
||||||
let ctx: ITestContext;
|
let ctx: ITestContext;
|
||||||
const ctxWrapper: ISharedRendererTestContext = {
|
const ctxWrapper: ISharedRendererTestContext = {
|
||||||
value: undefined,
|
value: undefined,
|
||||||
skipSelectionTests: true
|
skipCanvasExceptions: true
|
||||||
} as any;
|
} as any;
|
||||||
test.beforeAll(async ({ browser }) => {
|
test.beforeAll(async ({ browser }) => {
|
||||||
ctx = await createTestContext(browser);
|
ctx = await createTestContext(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);
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -16,7 +16,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 WebglAddon(true);
|
window.addon = new window.WebglAddon(true);
|
||||||
window.term.loadAddon(window.addon);
|
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);
|
strictEqual(await ctx.page.evaluate(`document.querySelectorAll('.xterm canvas').length`), 0);
|
||||||
// Re-create webgl addon to avoid side effects impacting other tests
|
// Re-create webgl addon to avoid side effects impacting other tests
|
||||||
await ctx.page.evaluate(`
|
await ctx.page.evaluate(`
|
||||||
window.addon = new WebglAddon(true);
|
window.addon = new window.WebglAddon(true);
|
||||||
window.term.loadAddon(window.addon);
|
window.term.loadAddon(window.addon);
|
||||||
`);
|
`);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user