Vendor ACP provider catalog
This commit is contained in:
@@ -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 }));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user