test(web): 画布 Agent 面板 - 修正 Skill 引用提示语的过期断言
输入框提示语已随外观配置搬进 lib/canvas/agent-appearance.ts,面板只消费 appearance.inputPlaceholder(canvas-cloud-agent-panel.tsx 的 agentCopy(...)),而这条用例仍在 面板源码里找那句字面文案,于是 Web checks 的 Run tests 一直红:干净 upstream/main 检出上可复现 1994 pass / 1 fail,同期其它作者的 PR 也是同一条失败。 改为断言"文案在 agent-appearance 里 + 面板仍在使用它",与重构后的架构一致。
This commit is contained in:
@@ -122,7 +122,10 @@ describe("canvas resource mention editor", () => {
|
||||
expect(component).toContain("slash.start + 1 + slash.query.length");
|
||||
expect(component).toContain("buildSkillMentionReferences(availableSlashSkills)");
|
||||
expect(component).toContain("[/、]([^\\s/、]*)$");
|
||||
expect(source("../src/components/canvas/canvas-cloud-agent-panel.tsx")).toContain("用 / 或 、 引用 Skills");
|
||||
// 输入框提示语已随外观配置搬进 agent-appearance(面板只消费 appearance.inputPlaceholder),
|
||||
// 这里断言"文案在、面板仍用它",而不是把文案钉在面板源码里。
|
||||
expect(source("../src/lib/canvas/agent-appearance.ts")).toContain("用 / 或 、 引用 Skills");
|
||||
expect(source("../src/components/canvas/canvas-cloud-agent-panel.tsx")).toContain("agentCopy(appearance.inputPlaceholder, appearance.agentName)");
|
||||
});
|
||||
|
||||
test("skill chips use one colored icon instead of exposing the serialized token", () => {
|
||||
|
||||
Reference in New Issue
Block a user