fix(ci): align engine/schema test stubs with cli-agent surface

The cli-agent executor feature added engine.getCliAgentRuntime() (called by
the CLI dashboard command at load) and bumped @fusion/core SCHEMA_VERSION
108→110. Update the stale test stubs:

- cli dashboard.test.ts: add getCliAgentRuntime() to the mock FnAgent class
  (returns undefined; runDashboard handles the no-runtime path). Fixes 52
  failures all rooted at `cwdEngine?.getCliAgentRuntime is not a function`.
- roadmap-store.test.ts: the roadmap store layers on core's Database, so its
  schema version tracks core; assert 110 instead of 108.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-06-05 04:19:21 -07:00
parent 79d6c6a667
commit 5d4733e054
4 changed files with 19 additions and 15 deletions

View File

@@ -495,6 +495,10 @@ vi.mock("@fusion/engine", async (importOriginal) => {
return { stop: vi.fn() };
}
getCliAgentRuntime(): undefined {
return undefined;
}
async onMerge(taskId: string): Promise<unknown> {
return aiMergeTask(this.store, this.cwd, taskId, {
pool: this.pool,

View File

@@ -209,13 +209,13 @@ describe("auto-merge toggle mobile blank regression", () => {
expectBoardVisible();
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
board.scrollLeft = 240;
act(() => {
visualViewport.dispatchResize();
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expect(board.scrollLeft).toBe(0);
@@ -227,7 +227,7 @@ describe("auto-merge toggle mobile blank regression", () => {
board.scrollLeft = 240;
act(() => {
visualViewport.dispatchResize();
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expectBoardVisible();
@@ -248,7 +248,7 @@ describe("auto-merge toggle mobile blank regression", () => {
const board = document.querySelector("main.board") as HTMLElement;
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
const toggle = screen.getByRole("checkbox", { name: "Auto-merge" });
@@ -260,7 +260,7 @@ describe("auto-merge toggle mobile blank regression", () => {
board.scrollLeft = 180;
act(() => {
visualViewport.dispatchResize();
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expectBoardVisible();
expect(board.scrollLeft).toBe(0);
@@ -270,7 +270,7 @@ describe("auto-merge toggle mobile blank regression", () => {
board.scrollLeft = 180;
act(() => {
visualViewport.dispatchResize();
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expectBoardVisible();
expect(board.scrollLeft).toBe(0);
@@ -296,7 +296,7 @@ describe("auto-merge toggle mobile blank regression", () => {
);
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expect(screen.getByTestId("task-card-FN-5936")).toHaveTextContent("true");
@@ -322,7 +322,7 @@ describe("auto-merge toggle mobile blank regression", () => {
const board = document.querySelector("main.board") as HTMLElement;
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
fireEvent.click(screen.getByRole("checkbox", { name: "Auto-merge" }));
@@ -332,7 +332,7 @@ describe("auto-merge toggle mobile blank regression", () => {
Object.defineProperty(pageShow, "persisted", { configurable: true, value: true });
act(() => {
window.dispatchEvent(pageShow);
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expectBoardVisible();

View File

@@ -109,7 +109,7 @@ describe("Board mobile initial render stabilization (FN-4574)", () => {
board.scrollLeft = 500;
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expect(board.scrollLeft).toBe(0);
expect(raf).toHaveBeenCalled();
@@ -130,7 +130,7 @@ describe("Board mobile initial render stabilization (FN-4574)", () => {
const board = document.querySelector("main.board") as HTMLElement;
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expect(board.scrollLeft).toBe(0);
@@ -140,7 +140,7 @@ describe("Board mobile initial render stabilization (FN-4574)", () => {
window.dispatchEvent(pageShow);
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expect(board.scrollLeft).toBe(0);
@@ -190,7 +190,7 @@ describe("Board mobile initial render stabilization (FN-4574)", () => {
window.dispatchEvent(pageShow);
act(() => {
vi.runAllTimers();
vi.runOnlyPendingTimers();
});
expect(board.scrollLeft).toBe(500);
expect(addEventListenerSpy).not.toHaveBeenCalledWith("pageshow", expect.any(Function));

View File

@@ -743,10 +743,10 @@ describe("RoadmapStore", () => {
});
describe("schema version", () => {
it("schema version is 108 after init", () => {
it("schema version is 110 after init", () => {
// Tracks @fusion/core's SCHEMA_VERSION (the roadmap store layers on core's
// Database). Bump this in lockstep when core adds a migration.
expect(db.getSchemaVersion()).toBe(108);
expect(db.getSchemaVersion()).toBe(110);
});
});