test(FN-4247): complete Step 2 — assert drafts render above missions
Fusion-Task-Id: FN-4247 Fusion-Task-Lineage: d0b267a8-1254-4f87-87b8-c9f565fe9950
This commit is contained in:
@@ -2254,6 +2254,27 @@ describe("MissionManager", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("FN-4247: renders Drafts group above standard missions", async () => {
|
||||||
|
mockFetchMissionInterviewDrafts.mockResolvedValueOnce([
|
||||||
|
{
|
||||||
|
id: "draft-priority",
|
||||||
|
title: "Draft priority mission",
|
||||||
|
status: "awaiting_input",
|
||||||
|
projectId: null,
|
||||||
|
createdAt: "2026-05-12T00:00:00.000Z",
|
||||||
|
updatedAt: "2026-05-12T00:05:00.000Z",
|
||||||
|
hasConversation: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
globalThis.fetch = createFetchMock();
|
||||||
|
|
||||||
|
render(<MissionManager isOpen={true} onClose={vi.fn()} addToast={vi.fn()} />);
|
||||||
|
|
||||||
|
const draftsHeader = await screen.findByText("Drafts");
|
||||||
|
const standardMission = await screen.findByText("Build Auth System");
|
||||||
|
expect(draftsHeader.compareDocumentPosition(standardMission) & Node.DOCUMENT_POSITION_FOLLOWING).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
it("resumes a mission interview draft from the explicit resume action", async () => {
|
it("resumes a mission interview draft from the explicit resume action", async () => {
|
||||||
mockFetchAiSession.mockResolvedValue({
|
mockFetchAiSession.mockResolvedValue({
|
||||||
id: "draft-awaiting",
|
id: "draft-awaiting",
|
||||||
|
|||||||
Reference in New Issue
Block a user