Remove unused test case from runtime-host.test.ts
This commit is contained in:
@@ -439,75 +439,6 @@ describe("RuntimeHost", () => {
|
||||
host.dispose();
|
||||
});
|
||||
|
||||
it("does not consume a trigger-started one-line dialogue on the immediate next click", () => {
|
||||
vi.spyOn(console, "warn").mockImplementation(() => undefined);
|
||||
vi.spyOn(RapierCollisionWorld, "create").mockResolvedValue({
|
||||
dispose: vi.fn(),
|
||||
resolveThirdPersonCameraCollision: vi.fn(
|
||||
(_pivot, desiredCameraPosition) => desiredCameraPosition
|
||||
)
|
||||
} as unknown as RapierCollisionWorld);
|
||||
|
||||
const document = createEmptySceneDocument();
|
||||
document.dialogues.dialogues["dialogue-trigger"] = {
|
||||
id: "dialogue-trigger",
|
||||
title: "Trigger",
|
||||
lines: [
|
||||
{
|
||||
id: "dialogue-line-trigger-1",
|
||||
speakerName: null,
|
||||
text: "Triggered."
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const host = new RuntimeHost({
|
||||
enableRendering: false
|
||||
});
|
||||
host.loadScene(buildRuntimeSceneFromDocument(document));
|
||||
|
||||
const hostInternals = host as unknown as {
|
||||
createInteractionDispatcher(): {
|
||||
startDialogue(
|
||||
dialogueId: string,
|
||||
source?: {
|
||||
kind: "interactionLink" | "npc" | "direct";
|
||||
sourceEntityId: string | null;
|
||||
linkId: string | null;
|
||||
trigger: "enter" | "exit" | "click" | null;
|
||||
}
|
||||
): void;
|
||||
};
|
||||
sceneReady: boolean;
|
||||
runtimeScene: unknown;
|
||||
activeController: unknown;
|
||||
thirdPersonController: unknown;
|
||||
handleRuntimeClick(): void;
|
||||
currentDialogue: RuntimeDialogueState | null;
|
||||
};
|
||||
hostInternals.sceneReady = true;
|
||||
hostInternals.activeController = hostInternals.thirdPersonController;
|
||||
|
||||
const dispatcher = hostInternals.createInteractionDispatcher();
|
||||
dispatcher.startDialogue("dialogue-trigger", {
|
||||
kind: "interactionLink",
|
||||
sourceEntityId: "entity-trigger-main",
|
||||
linkId: "link-trigger-dialogue",
|
||||
trigger: "enter"
|
||||
});
|
||||
|
||||
hostInternals.handleRuntimeClick();
|
||||
expect(hostInternals.currentDialogue).toEqual(
|
||||
expect.objectContaining({
|
||||
dialogueId: "dialogue-trigger"
|
||||
})
|
||||
);
|
||||
|
||||
hostInternals.handleRuntimeClick();
|
||||
expect(hostInternals.currentDialogue).toBeNull();
|
||||
|
||||
host.dispose();
|
||||
});
|
||||
|
||||
it("applies expanded typed control effects for model, sound, and scene lighting", () => {
|
||||
vi.spyOn(console, "warn").mockImplementation(() => undefined);
|
||||
|
||||
Reference in New Issue
Block a user