Merge branch 'main' into keys-wrongly-displayed

This commit is contained in:
VariableVince
2026-05-18 21:24:08 +02:00
committed by GitHub
257 changed files with 55112 additions and 10067 deletions
+1 -4
View File
@@ -6,7 +6,7 @@ import {
WarshipSelectionBoxCompleteEvent,
WarshipSelectionBoxUpdateEvent,
} from "../src/client/InputHandler";
import { UIState } from "../src/client/graphics/UIState";
import { UIState } from "../src/client/UIState";
import { EventBus } from "../src/core/EventBus";
import { UnitType } from "../src/core/game/Game";
import { GameView, PlayerView } from "../src/core/game/GameView";
@@ -938,13 +938,10 @@ describe("Warship box selection (Shift+drag)", () => {
test("Shift keydown discards active ghostStructure", () => {
uiState.ghostStructure = UnitType.Warship;
const emitSpy = vi.spyOn(eventBus, "emit");
window.dispatchEvent(new KeyboardEvent("keydown", { code: "ShiftLeft" }));
expect(uiState.ghostStructure).toBeNull();
const types = emitSpy.mock.calls.map((c) => c[0].constructor.name);
expect(types).toContain("GhostStructureChangedEvent");
});
test("Shift+drag emits WarshipSelectionBoxUpdateEvent", () => {