test: select localized welcome copy · openclaw/openclaw@0aed7c5
shakkernerd
·
2026-05-12
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -928,9 +928,12 @@ describe("chat welcome", () => {
|
928 | 928 | await i18n.setLocale("zh-CN"); |
929 | 929 | const container = renderWelcome({ assistantAvatar: "VC", assistantAvatarUrl: null }); |
930 | 930 | |
931 | | -expect(container.textContent).toContain(t("chat.welcome.ready")); |
932 | | -expect(container.textContent).toContain(t("chat.welcome.suggestions.whatCanYouDo")); |
933 | | -expect(container.textContent).not.toContain("Ready to chat"); |
| 931 | +expect(container.querySelector(".agent-chat__badge")?.textContent?.trim()).toBe( |
| 932 | +t("chat.welcome.ready"), |
| 933 | +); |
| 934 | +expect(container.querySelector(".agent-chat__suggestion")?.textContent?.trim()).toBe( |
| 935 | +t("chat.welcome.suggestions.whatCanYouDo"), |
| 936 | +); |
934 | 937 | }); |
935 | 938 | }); |
936 | 939 | |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。