Wenchao An 42334f26d7
feat(capabilities): unify catalog, plugin configuration and agent selection (#5497)
* 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
2026-09-19 12:14:24 +08:00

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();
});