Vendor ACP provider catalog

This commit is contained in:
Mohamed Boudra
2026-05-06 20:00:40 +08:00
committed by GitHub
parent ac375f152d
commit c36f4cfee4
46 changed files with 1605 additions and 28 deletions
@@ -95,6 +95,7 @@ vi.mock("lucide-react-native", () => {
const icon = (name: string) => () => React.createElement("span", { "data-icon": name });
return {
ChevronRight: icon("ChevronRight"),
Plus: icon("Plus"),
RotateCw: icon("RotateCw"),
};
});
@@ -144,6 +145,10 @@ vi.mock("@/components/provider-diagnostic-sheet", () => ({
}),
}));
vi.mock("@/components/add-provider-modal", () => ({
AddProviderModal: () => null,
}));
vi.mock("@/hooks/use-providers-snapshot", () => ({
useProvidersSnapshot: () => ({
entries: snapshotState.entries,
@@ -323,7 +328,7 @@ describe("ProvidersSection", () => {
expect(sheet?.getAttribute("data-provider")).toBe("codex");
});
it("toggles the provider enabled flag through patchConfig when the switch is pressed", () => {
it("toggles the provider enabled flag through patchConfig when the switch is pressed", async () => {
snapshotState.entries = [claudeEntry];
configState.config = makeConfig();
@@ -334,7 +339,7 @@ describe("ProvidersSection", () => {
expect(switchEl).not.toBeNull();
expect(switchEl?.getAttribute("aria-checked")).toBe("true");
act(() => {
await act(async () => {
switchEl?.dispatchEvent(new window.MouseEvent("click", { bubbles: true }));
});