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