Skip to content

Commit b8e0df6

Browse files
committed
fix(e2e): include Codex thread project id
1 parent 378e45a commit b8e0df6

2 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎scripts/e2e/lib/codex-app-server-fixture.mjs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export function createFakeThreadStartResponse({ params, sessionId, threadId, ver
2424
forkedFromId: null,
2525
preview: "",
2626
ephemeral: false,
27+
projectId: params?.projectId ?? null,
2728
modelProvider: "openai",
2829
createdAt: now,
2930
updatedAt: now,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { describe, expect, it } from "vitest";
2+
import { createFakeThreadStartResponse } from "../../scripts/e2e/lib/codex-app-server-fixture.mjs";
3+
4+
describe("createFakeThreadStartResponse", () => {
5+
it.each([
6+
{ expected: null, params: {} },
7+
{ expected: "project-1", params: { projectId: "project-1" } },
8+
])("returns the protocol-required projectId as $expected", ({ expected, params }) => {
9+
const response = createFakeThreadStartResponse({
10+
params,
11+
sessionId: "session-1",
12+
threadId: "thread-1",
13+
version: "0.149.1",
14+
});
15+
16+
expect(response.thread.projectId).toBe(expected);
17+
});
18+
});

0 commit comments

Comments
 (0)