fix(e2e): include Codex thread project id (#130086)

This commit is contained in:
Dallin Romney
2026-08-26 09:59:36 -07:00
committed by GitHub
parent 70838da513
commit 8ce8085e84
2 changed files with 19 additions and 0 deletions
@@ -24,6 +24,7 @@ export function createFakeThreadStartResponse({ params, sessionId, threadId, ver
forkedFromId: null,
preview: "",
ephemeral: false,
projectId: params?.projectId ?? null,
modelProvider: "openai",
createdAt: now,
updatedAt: now,
@@ -0,0 +1,18 @@
import { describe, expect, it } from "vitest";
import { createFakeThreadStartResponse } from "../../scripts/e2e/lib/codex-app-server-fixture.mjs";
describe("createFakeThreadStartResponse", () => {
it.each([
{ expected: null, params: {} },
{ expected: "project-1", params: { projectId: "project-1" } },
])("returns the protocol-required projectId as $expected", ({ expected, params }) => {
const response = createFakeThreadStartResponse({
params,
sessionId: "session-1",
threadId: "thread-1",
version: "0.149.1",
});
expect(response.thread.projectId).toBe(expected);
});
});