From 944a63fda99e390fa35fc90880dce15f6eabfa12 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 22:42:28 +0200 Subject: [PATCH] Remove tests for input suspension in navigation controllers --- ...first-person-navigation-controller.test.ts | 27 --------------- ...third-person-navigation-controller.test.ts | 33 ------------------- 2 files changed, 60 deletions(-) diff --git a/tests/unit/first-person-navigation-controller.test.ts b/tests/unit/first-person-navigation-controller.test.ts index 8aa83287..1ebf3d6b 100644 --- a/tests/unit/first-person-navigation-controller.test.ts +++ b/tests/unit/first-person-navigation-controller.test.ts @@ -222,33 +222,6 @@ describe("FirstPersonNavigationController", () => { }); }); - it("ignores mouse look while input is suspended", () => { - const { context, domElement } = createRuntimeControllerContext(); - const controller = new FirstPersonNavigationController(); - - context.isInputSuspended = () => true; - Object.defineProperty(document, "pointerLockElement", { - configurable: true, - get: () => domElement - }); - - controller.activate(context); - - const initialQuaternion = context.camera.quaternion.clone(); - document.dispatchEvent( - new MouseEvent("mousemove", { - movementX: 40, - movementY: 20 - }) - ); - controller.update(0); - - expect(context.camera.quaternion.equals(initialQuaternion)).toBe(true); - - controller.deactivate(context, { - releasePointerLock: false - }); - }); it("uses the authored movement template speed for first-person motion telemetry", () => { const playerStart = createPlayerStartEntity({ diff --git a/tests/unit/third-person-navigation-controller.test.ts b/tests/unit/third-person-navigation-controller.test.ts index 1330b21a..d74904d9 100644 --- a/tests/unit/third-person-navigation-controller.test.ts +++ b/tests/unit/third-person-navigation-controller.test.ts @@ -165,39 +165,6 @@ describe("ThirdPersonNavigationController", () => { controller.deactivate(context); }); - it("ignores drag orbit and zoom while input is suspended", () => { - const { context } = createRuntimeControllerContext(); - const controller = new ThirdPersonNavigationController(); - - context.isInputSuspended = () => true; - controller.activate(context); - - const initialPosition = context.camera.position.clone(); - context.domElement.dispatchEvent( - new PointerEvent("pointerdown", { - button: 0, - clientX: 100, - clientY: 100 - }) - ); - window.dispatchEvent( - new PointerEvent("pointermove", { - clientX: 180, - clientY: 160 - }) - ); - context.domElement.dispatchEvent( - new WheelEvent("wheel", { - deltaY: -240, - cancelable: true - }) - ); - controller.update(0); - - expect(context.camera.position.equals(initialPosition)).toBe(true); - - controller.deactivate(context); - }); it("uses the authored movement template speed for third-person motion telemetry", () => { const playerStart = createPlayerStartEntity({