deer-flow/frontend/tests/unit/core/i18n/translations.test.ts
陈志谦 9232e1e6a9
fix: DeerFlow brand casing in disclaimer, What's New title, setup-sandbox .PHONY (#4970)
* fix: DeerFlow brand casing in disclaimer, 'What's New' title, setup-sandbox .PHONY

- en-US disclaimer said 'Deerflow'; every other user-facing string
  brands it 'DeerFlow' (rendered under the chat composer)
- landing section title 'Whats New in DeerFlow 2.0' -> 'What's New'
- setup-sandbox was the only Makefile target missing from .PHONY

* test: align disclaimer assertions with DeerFlow brand casing

The unit and e2e suites still expected the old "Deerflow" spelling in
inputBox.disclaimer; update both to the corrected locale string so the
i18n load test and the chat footer assertion pass again.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-08-24 10:58:48 +08:00

25 lines
835 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { describe, expect, it } from "@rstest/core";
import { loadTranslations } from "@/core/i18n/translations";
describe("core copy loading", () => {
it("loads only the requested overseas and domestic copy", async () => {
const [english, chinese] = await Promise.all([
loadTranslations("en-US"),
loadTranslations("zh-CN"),
]);
expect(english.inputBox.disclaimer).toBe(
"DeerFlow is AI and can make mistakes",
);
expect(chinese.inputBox.disclaimer).toBe(
"内容由AI生成重要信息请务必核查",
);
expect(english.channels.descriptions.buzz).toBe(
"Buzz channels and direct messages through your DeerFlow agent.",
);
expect(chinese.channels.descriptions.buzz).toBe(
"通过 DeerFlow 智能体接收 Buzz 频道消息和私聊。",
);
});
});