test: target chat detail labels · openclaw/openclaw@23a4d52
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -634,7 +634,7 @@ describe("chat voice controls", () => {
|
634 | 634 | onDismissError, |
635 | 635 | }); |
636 | 636 | |
637 | | -expect(container.querySelector('[role="alert"]')?.textContent).toContain( |
| 637 | +expect(container.querySelector('[role="alert"] .callout__content')?.textContent).toBe( |
638 | 638 | 'Realtime voice provider "openai" is not configured', |
639 | 639 | ); |
640 | 640 | |
@@ -806,7 +806,7 @@ describe("chat attachment picker", () => {
|
806 | 806 | expect(getChatAttachmentDataUrl(nextAttachments[0])).toMatch(/^data:application\/pdf;base64,/); |
807 | 807 | const preview = renderChatView({ attachments: nextAttachments }); |
808 | 808 | expect(preview.querySelectorAll(".chat-attachment-thumb--file")).toHaveLength(1); |
809 | | -expect(preview.textContent).toContain("brief.pdf"); |
| 809 | +expect(preview.querySelector(".chat-attachment-file__name")?.textContent).toBe("brief.pdf"); |
810 | 810 | }); |
811 | 811 | |
812 | 812 | it("filters video file attachments", () => { |
@@ -903,7 +903,7 @@ describe("chat welcome", () => {
|
903 | 903 | |
904 | 904 | const avatar = container.querySelector<HTMLElement>(".agent-chat__avatar"); |
905 | 905 | expect(avatar?.tagName).toBe("DIV"); |
906 | | -expect(avatar?.textContent).toContain("VC"); |
| 906 | +expect(avatar?.textContent?.trim()).toBe("VC"); |
907 | 907 | expect(avatar?.getAttribute("aria-label")).toBe("Val"); |
908 | 908 | |
909 | 909 | container = renderWelcome({ |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。