diff --git a/examples/github-api/tests/canvas-demo.spec.ts b/examples/github-api/tests/canvas-demo.spec.ts index 36ec2f3be3..a9a98de7dc 100644 --- a/examples/github-api/tests/canvas-demo.spec.ts +++ b/examples/github-api/tests/canvas-demo.spec.ts @@ -55,4 +55,15 @@ test('Go JS', async ({ page }) => { y: 289 } }); +}); + +test('ThreeJS', async ({ page }) => { + await page.addInitScript(() => { + const original = window.HTMLCanvasElement.prototype.getContext; + window.HTMLCanvasElement.prototype.getContext = function(id, options) { return original.call(this, id, {...options, preserveDrawingBuffer: true }) } + }); + await page.goto('https://threejs.org/examples/webgl_animation_skinning_morph.html'); + await page.waitForTimeout(1000); + await page.getByLabel('Surprised').fill('1'); + await page.waitForTimeout(1000); }); \ No newline at end of file