|
| 1 | +import {execFileSync} from "node:child_process"; |
| 2 | +import path from "node:path"; |
1 | 3 | import {afterEach, expect, it} from "vitest"; |
2 | 4 | import {AgentMode} from "../../../AgentMode"; |
3 | 5 | import { |
@@ -90,17 +92,33 @@ describeE2E("E2E tests", () => { |
90 | 92 | }); |
91 | 93 | }); |
92 | 94 |
|
93 | | - it("lists a user skill from the wrapped CODEX_HOME", async () => { |
| 95 | + it("lists skills", async () => { |
94 | 96 | fixture = await createAuthenticatedFixture(); |
95 | 97 | fixture.writeSkill({ |
96 | | - name: "integration-skill", |
97 | | - description: "Integration skill", |
| 98 | + name: "codex-home-skill", |
| 99 | + description: "Codex home skill", |
98 | 100 | body: "This skill exists only for integration testing.", |
99 | 101 | }); |
100 | | - const session = await fixture.createSession(); |
| 102 | + |
| 103 | + const additionalSkillsRoot = path.join(fixture.workspaceDir, "custom-skills"); |
| 104 | + fixture.writeSkill({ |
| 105 | + name: "session-root-skill", |
| 106 | + description: "Session root skill", |
| 107 | + body: "This skill exists only in an additional root passed at session creation.", |
| 108 | + }, additionalSkillsRoot); |
| 109 | + |
| 110 | + const session = await fixture.connection.newSession({ |
| 111 | + cwd: fixture.workspaceDir, |
| 112 | + mcpServers: [], |
| 113 | + _meta: { |
| 114 | + additionalRoots: [additionalSkillsRoot], |
| 115 | + }, |
| 116 | + }); |
| 117 | + |
| 118 | + // Expecting skills from CODEX_HOME, workspace, and additional root |
101 | 119 | await fixture.expectPromptText(session.sessionId, "/skills", (text) => { |
102 | 120 | expect(text).toContain("Available skills:"); |
103 | | - expect(text).toContain("- integration-skill: Integration skill"); |
| 121 | + expect(text).toContain("- session-root-skill: Session root skill"); |
104 | 122 | }); |
105 | 123 | }); |
106 | 124 | }); |
0 commit comments