test(dashboard): align mission-e2e expectations with new store-arg signatures
createMissionInterviewSession, submitMissionInterviewResponse, retryMissionInterviewSession, and submitTargetInterviewResponse now take a TaskStore as an additional argument (after rootDir). The e2e expectations still asserted on the pre-store positional shape and failed. Insert expect.anything() in the store slot of each toHaveBeenCalledWith assertion. Fixes 10 failing tests in mission-e2e.test.ts (interview start/respond/ retry scoping suite + milestone interview respond regression). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2273,7 +2273,7 @@ describe("Mission API", () => {
|
|||||||
expect(res.status).toBe(200);
|
expect(res.status).toBe(200);
|
||||||
expect(res.body).toEqual({ success: true, sessionId: "session-1" });
|
expect(res.body).toEqual({ success: true, sessionId: "session-1" });
|
||||||
// Default store returns {} for promptOverrides when projectId is omitted
|
// Default store returns {} for promptOverrides when projectId is omitted
|
||||||
expect(retrySpy).toHaveBeenCalledWith("session-1", "/fake/root", {});
|
expect(retrySpy).toHaveBeenCalledWith("session-1", "/fake/root", expect.anything(), {});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("returns 404 when interview retry session is missing", async () => {
|
it("returns 404 when interview retry session is missing", async () => {
|
||||||
@@ -2992,6 +2992,7 @@ describe("Mission API", () => {
|
|||||||
expect.any(String),
|
expect.any(String),
|
||||||
"Scoped Mission",
|
"Scoped Mission",
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
scopedStore,
|
||||||
{ "mission-interview-system": "Scoped mission interview prompt" },
|
{ "mission-interview-system": "Scoped mission interview prompt" },
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
@@ -3028,6 +3029,7 @@ describe("Mission API", () => {
|
|||||||
"scoped-session",
|
"scoped-session",
|
||||||
{ "q-1": "Answer" },
|
{ "q-1": "Answer" },
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
scopedStore,
|
||||||
{ "mission-interview-system": "Scoped mission interview prompt" },
|
{ "mission-interview-system": "Scoped mission interview prompt" },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -3050,6 +3052,7 @@ describe("Mission API", () => {
|
|||||||
expect(retrySpy).toHaveBeenCalledWith(
|
expect(retrySpy).toHaveBeenCalledWith(
|
||||||
"scoped-retry",
|
"scoped-retry",
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
scopedStore,
|
||||||
{ "mission-interview-system": "Scoped mission interview prompt" },
|
{ "mission-interview-system": "Scoped mission interview prompt" },
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@@ -3080,6 +3083,7 @@ describe("Mission API", () => {
|
|||||||
expect.any(String),
|
expect.any(String),
|
||||||
"Default Mission",
|
"Default Mission",
|
||||||
"/fake/root",
|
"/fake/root",
|
||||||
|
expect.anything(),
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
@@ -3156,6 +3160,7 @@ describe("Mission API", () => {
|
|||||||
expect.any(String),
|
expect.any(String),
|
||||||
"Default Model Mission",
|
"Default Model Mission",
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
expect.anything(),
|
||||||
{},
|
{},
|
||||||
"zai",
|
"zai",
|
||||||
"glm-5.1",
|
"glm-5.1",
|
||||||
@@ -3197,6 +3202,7 @@ describe("Mission API", () => {
|
|||||||
expect.any(String),
|
expect.any(String),
|
||||||
"Planning Model Mission",
|
"Planning Model Mission",
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
expect.anything(),
|
||||||
{},
|
{},
|
||||||
"anthropic",
|
"anthropic",
|
||||||
"claude-sonnet-4-5",
|
"claude-sonnet-4-5",
|
||||||
@@ -3241,6 +3247,7 @@ describe("Mission API", () => {
|
|||||||
expect.any(String),
|
expect.any(String),
|
||||||
"Override Mission",
|
"Override Mission",
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
expect.anything(),
|
||||||
{},
|
{},
|
||||||
"openai",
|
"openai",
|
||||||
"gpt-4o",
|
"gpt-4o",
|
||||||
@@ -3278,6 +3285,7 @@ describe("Mission API", () => {
|
|||||||
expect.any(String),
|
expect.any(String),
|
||||||
"No Defaults Mission",
|
"No Defaults Mission",
|
||||||
scopedRootDir,
|
scopedRootDir,
|
||||||
|
expect.anything(),
|
||||||
{},
|
{},
|
||||||
undefined,
|
undefined,
|
||||||
undefined,
|
undefined,
|
||||||
@@ -4498,7 +4506,7 @@ describe("Mission API", () => {
|
|||||||
|
|
||||||
expect(res.status).toBe(200);
|
expect(res.status).toBe(200);
|
||||||
expect(res.body.type).toBe("question");
|
expect(res.body.type).toBe("question");
|
||||||
expect(submitSpy).toHaveBeenCalledWith("session-123", { "q-1": "answer" }, expect.any(String));
|
expect(submitSpy).toHaveBeenCalledWith("session-123", { "q-1": "answer" }, expect.any(String), expect.anything());
|
||||||
});
|
});
|
||||||
|
|
||||||
it("POST /milestones/:milestoneId/interview/respond returns 400 for missing sessionId", async () => {
|
it("POST /milestones/:milestoneId/interview/respond returns 400 for missing sessionId", async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user