mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-09-22 20:46:20 +00:00
* feat(capabilities): unify catalog, plugin configuration and agent selection * fix(capabilities): address review isolation, validation and demo issues * fix(capabilities): preserve concurrent selections and guide launcher repair
28 lines
950 B
TypeScript
28 lines
950 B
TypeScript
import { afterEach, expect, it } from "@rstest/core";
|
|
import { cleanup, render } from "@testing-library/react";
|
|
|
|
import { PluginIcon } from "@/components/workspace/capabilities/plugin-icon";
|
|
|
|
afterEach(cleanup);
|
|
|
|
it("does not infer a provider from a custom server name", () => {
|
|
for (const name of ["github", "notion", "feishu", "brave", "postgres"]) {
|
|
const { container, unmount } = render(<PluginIcon name={name} />);
|
|
expect(container.querySelector("img")).toBeNull();
|
|
unmount();
|
|
}
|
|
});
|
|
|
|
it("uses explicit catalog assets and rejects remote assets", () => {
|
|
const { container, rerender } = render(
|
|
<PluginIcon name="team-code" asset="/images/plugins/github.svg" />,
|
|
);
|
|
expect(container.querySelector("img")?.getAttribute("src")).toBe(
|
|
"/images/plugins/github.svg",
|
|
);
|
|
rerender(
|
|
<PluginIcon name="github" asset="https://external.example/icon.png" />,
|
|
);
|
|
expect(container.querySelector("img")).toBeNull();
|
|
});
|