mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-28 07:26:25 +00:00
* feat(channels): complete Buzz frontend copy * feat(channels): add official Buzz provider icon * test(i18n): clarify translation suite scope
33 lines
948 B
TypeScript
33 lines
948 B
TypeScript
import { afterEach, expect, test } from "@rstest/core";
|
|
import { cleanup, render } from "@testing-library/react";
|
|
|
|
import { ChannelProviderIcon } from "@/components/workspace/channels/channel-provider-icon";
|
|
|
|
afterEach(cleanup);
|
|
|
|
test("renders collision-safe official Buzz marks", () => {
|
|
const { container } = render(
|
|
<>
|
|
<ChannelProviderIcon provider="buzz" />
|
|
<ChannelProviderIcon provider="BUZZ" />
|
|
</>,
|
|
);
|
|
|
|
const icons = Array.from(container.querySelectorAll("svg"));
|
|
expect(icons).toHaveLength(2);
|
|
expect(icons.map((icon) => icon.getAttribute("viewBox"))).toEqual([
|
|
"0 0 466 309",
|
|
"0 0 466 309",
|
|
]);
|
|
expect(icons.map((icon) => icon.getAttribute("fill"))).toEqual([
|
|
"currentColor",
|
|
"currentColor",
|
|
]);
|
|
|
|
const maskIds = Array.from(container.querySelectorAll("mask"), (mask) =>
|
|
mask.getAttribute("id"),
|
|
);
|
|
expect(maskIds).toHaveLength(2);
|
|
expect(new Set(maskIds).size).toBe(2);
|
|
});
|