Fix quality-backfill suites broken by fast-tests x workflow-columns merge race
Main went red when the fast-tests quality-backfill projects (PR #1385) landed alongside the workflow-columns stream (PR #1424) — the new test projects were written against pre-stream code: - TaskFieldsSection.css toggle knob used background: #fff, violating the theme-token assertion in AgentListModal's styling-parity test; use var(--card) per the SkillsView toggle convention - ListView.test.tsx api mock lacked fetchBoardWorkflows (TaskDetailModal now calls it on mount) - chat.test.ts and routes-agent-import.test.ts @fusion/core mocks lacked registerTraitHookImpl (engine merge-trait registers hooks at import) - auto-merge-toggle-blank.mobile and board-mobile-initial-render used vi.runAllTimers(), which never terminates now that sse-bus starts a keepalive setInterval; use vi.runOnlyPendingTimers() Both quality-backfill projects now pass fully: 7151/7151 across 414 files. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -139,7 +139,7 @@
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
background: var(--card);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ vi.mock("../../api", () => ({
|
||||
fetchTaskDetail: vi.fn(),
|
||||
batchUpdateTaskModels: vi.fn(),
|
||||
fetchNodes: vi.fn().mockResolvedValue([]),
|
||||
fetchBoardWorkflows: vi.fn().mockResolvedValue({ flagEnabled: false, defaultWorkflowId: "", workflows: [], taskWorkflowIds: {} }),
|
||||
}));
|
||||
|
||||
import { fetchTaskDetail, batchUpdateTaskModels, fetchNodes } from "../../api";
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -28,6 +28,7 @@ vi.mock("@fusion/core", () => ({
|
||||
summarizeTitle: vi.fn(),
|
||||
AgentStore: vi.fn(),
|
||||
ChatStore: vi.fn(),
|
||||
registerTraitHookImpl: vi.fn(),
|
||||
}));
|
||||
|
||||
describe("resolveFileReferences", () => {
|
||||
|
||||
@@ -75,6 +75,7 @@ vi.mock("@fusion/core", () => {
|
||||
isEphemeralAgent: (agent: { metadata?: Record<string, unknown> }) =>
|
||||
agent?.metadata?.agentKind === "task-worker",
|
||||
deterministicGuardLocks: new Map(),
|
||||
registerTraitHookImpl: () => {},
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user