Update unit tests for runtime host and third-person navigation controller

This commit is contained in:
2026-04-27 17:26:01 +02:00
parent 2cf114d2b3
commit 5b5ab241cf
2 changed files with 10 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ describe("RuntimeHost", () => {
message: null
});
expect(runtimeMessages).toContain(
"Third Person active. Drag to orbit the camera, use the right stick for gamepad camera look, move with your authored bindings, and scroll to zoom."
"Third Person active. Click inside the runner viewport to capture mouse look, or drag to orbit if pointer lock is unavailable. Scroll to zoom and use the right stick for gamepad camera look."
);
});
@@ -3778,7 +3778,14 @@ describe("RuntimeHost", () => {
enableRendering: false
});
const runtimeScene = buildRuntimeSceneFromDocument(
createEmptySceneDocument(),
{
...createEmptySceneDocument(),
entities: {
"entity-player-start-switch": createPlayerStartEntity({
id: "entity-player-start-switch"
})
}
},
{
navigationMode: "firstPerson"
}

View File

@@ -194,6 +194,7 @@ describe("ThirdPersonNavigationController", () => {
});
controller.activate(context);
document.dispatchEvent(new Event("pointerlockchange"));
document.dispatchEvent(mouseMoveEvent);
controller.update(0);