feat: extend map targeting and overlay controls
Support batch feature targeting and clear map highlights and overlays from the More panel. Remove misleading action chevrons and unused configuration export entries. Validated the isolated patch with lint, typecheck, 36 focused tests and 5 browser cases using mocked data.
This commit is contained in:
@@ -47,6 +47,24 @@ function setup(overrides: Partial<ConstructorParameters<typeof InvestigationPres
|
||||
}
|
||||
|
||||
describe("live investigation presentation following", () => {
|
||||
it("discards queued map commands while retaining chart commands and later new map events", async () => {
|
||||
const painting = deferred<void>();
|
||||
const execute = vi.fn((command: InvestigationPresentationCommand) =>
|
||||
command.action === "open_chart" ? painting.promise : Promise.resolve());
|
||||
const test = setup({ execute });
|
||||
test.follower.start();
|
||||
test.channel.publish({ type: "open" });
|
||||
try {
|
||||
await vi.waitFor(() => expect(test.onStatus).toHaveBeenCalledWith("live"));
|
||||
test.channel.publish({ type: "events", events: [event(11, openChart), event(12), event(13, closeChart)] });
|
||||
test.follower.discardPendingMapCommands();
|
||||
painting.resolve();
|
||||
await vi.waitFor(() => expect(execute.mock.calls.map(([command]) => command.action)).toEqual(["open_chart", "close_chart"]));
|
||||
test.channel.publish({ type: "events", events: [event(14)] });
|
||||
await vi.waitFor(() => expect(execute.mock.calls.map(([command]) => command.action)).toEqual(["open_chart", "close_chart", "highlight_features"]));
|
||||
} finally { painting.resolve(); test.follower.stop(); }
|
||||
});
|
||||
|
||||
it("listens before fetching the baseline and preserves events arriving during cursor lookup", async () => {
|
||||
const baseline = deferred<InvestigationPresentationCursor>();
|
||||
const order: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user