From cc76070c60ea74188fec8c8c050ea985e88e077b Mon Sep 17 00:00:00 2001 From: AetherNo2332 <130164460+AetherNo2332@users.noreply.github.com> Date: Tue, 22 Sep 2026 01:51:29 +0800 Subject: [PATCH] =?UTF-8?q?test(web):=20=E7=94=BB=E5=B8=83=20Agent=20?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=20-=20=E4=BF=AE=E6=AD=A3=20Skill=20=E5=BC=95?= =?UTF-8?q?=E7=94=A8=E6=8F=90=E7=A4=BA=E8=AF=AD=E7=9A=84=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E6=96=AD=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 输入框提示语已随外观配置搬进 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 里 + 面板仍在使用它",与重构后的架构一致。 --- web/test/canvas-resource-mention-editor.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/test/canvas-resource-mention-editor.test.ts b/web/test/canvas-resource-mention-editor.test.ts index fdfbb672f..bbf129013 100644 --- a/web/test/canvas-resource-mention-editor.test.ts +++ b/web/test/canvas-resource-mention-editor.test.ts @@ -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", () => {