From 0aed7c50900b72f1b5726e188463ece7ce3c2ab2 Mon Sep 17 00:00:00 2001 From: Shakker Date: Tue, 12 May 2026 16:47:04 +0100 Subject: [PATCH] test: select localized welcome copy --- ui/src/ui/views/chat.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/src/ui/views/chat.test.ts b/ui/src/ui/views/chat.test.ts index 738efd53eb8..14a28b44e9b 100644 --- a/ui/src/ui/views/chat.test.ts +++ b/ui/src/ui/views/chat.test.ts @@ -928,9 +928,12 @@ describe("chat welcome", () => { await i18n.setLocale("zh-CN"); const container = renderWelcome({ assistantAvatar: "VC", assistantAvatarUrl: null }); - expect(container.textContent).toContain(t("chat.welcome.ready")); - expect(container.textContent).toContain(t("chat.welcome.suggestions.whatCanYouDo")); - expect(container.textContent).not.toContain("Ready to chat"); + expect(container.querySelector(".agent-chat__badge")?.textContent?.trim()).toBe( + t("chat.welcome.ready"), + ); + expect(container.querySelector(".agent-chat__suggestion")?.textContent?.trim()).toBe( + t("chat.welcome.suggestions.whatCanYouDo"), + ); }); });