From f8e7058e19791e6f8a9d1dd3bbe3a542b2103b8a Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:41:37 +1100 Subject: [PATCH] Add jest set/has pointer capture mocks (#1581) * Add set/has pointer capter mocks * Add mock impl. --- tests-ui/tests/globalSetup.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests-ui/tests/globalSetup.ts b/tests-ui/tests/globalSetup.ts index a75c33f61..b9ec5dfbe 100644 --- a/tests-ui/tests/globalSetup.ts +++ b/tests-ui/tests/globalSetup.ts @@ -9,6 +9,9 @@ module.exports = async function () { const { nop } = require('../utils/nopProxy') global.enableWebGLCanvas = nop + global.window.HTMLElement.prototype.hasPointerCapture = jest.fn(() => true) + global.window.HTMLElement.prototype.setPointerCapture = jest.fn() + HTMLCanvasElement.prototype.getContext = nop localStorage['Comfy.Settings.Comfy.Logging.Enabled'] = 'false'