forked from phenom/healer-man
Release Healer Man 0.1.6
This commit is contained in:
1 parent
55cfd43d66
commit
b12fb84859
96 files changed
+10874
-609
No files matched your search
@@ -48,6 +48,9 @@ function inputActionSpies(blocked = false): InputActions {
|
||||
setPartyCommand: vi.fn(),
|
||||
recallParty: vi.fn(),
|
||||
clearTarget: vi.fn(),
|
||||
groundTargetActive: vi.fn(() => false),
|
||||
confirmGroundTarget: vi.fn(),
|
||||
cancelGroundTarget: vi.fn(),
|
||||
gameplayActionsBlocked: vi.fn(() => blocked),
|
||||
setCameraLookActive: vi.fn(),
|
||||
setInputMode: vi.fn(),
|
||||
@@ -90,6 +93,24 @@ describe("gameplay input bindings", () => {
|
||||
dispose();
|
||||
});
|
||||
|
||||
it("confirms and cancels an active ground reticle before face-button casts", () => {
|
||||
stubInputEventTargets();
|
||||
const nextActions = inputActionSpies();
|
||||
(nextActions.groundTargetActive as ReturnType<typeof vi.fn>).mockReturnValue(true);
|
||||
const dispose = installInput(nextActions);
|
||||
|
||||
emitControllerToken({ token: "Button0", repeat: false, pressed: true });
|
||||
emitControllerToken({ token: "Button0", repeat: false, pressed: false });
|
||||
emitControllerToken({ token: "Button1", repeat: false, pressed: true });
|
||||
|
||||
expect(nextActions.confirmGroundTarget).toHaveBeenCalledTimes(1);
|
||||
expect(nextActions.cancelGroundTarget).toHaveBeenCalledTimes(1);
|
||||
expect(nextActions.lootActiveBoss).not.toHaveBeenCalled();
|
||||
expect(nextActions.castActionBinding).not.toHaveBeenCalled();
|
||||
|
||||
dispose();
|
||||
});
|
||||
|
||||
it("maps Thor controls without stealing Select from display routing", () => {
|
||||
expect(controllerCommandForToken("Button9")).toBe("pause");
|
||||
expect(controllerCommandForToken("Button11")).toBe("target-next");
|
||||
|
||||
Reference in new issue
Block a user