test(ui): expect the change source in customer MCP tool permission tests

This commit is contained in:
lewis 2026-10-16 22:23:16 -04:00
parent 0ab63669c8
commit 133bd508ca

View file

@ -49,7 +49,7 @@ describe("MCPToolPermissions", () => {
await user.click(screen.getByRole("checkbox", { name: "delete_record" }));
expect(onChange).toHaveBeenCalledExactlyOnceWith({ [mockServerId]: ["list_records"] });
expect(onChange).toHaveBeenCalledExactlyOnceWith({ [mockServerId]: ["list_records"] }, "edit");
});
it("defaults a newly added edit server to non-delete tools without narrowing stored servers", async () => {
@ -78,7 +78,7 @@ describe("MCPToolPermissions", () => {
rerender(<MCPToolPermissions {...props} selectedServers={[mockServerId, newServerId]} />);
await waitFor(() => {
expect(onChange).toHaveBeenCalledExactlyOnceWith({ [newServerId]: ["list_records"] });
expect(onChange).toHaveBeenCalledExactlyOnceWith({ [newServerId]: ["list_records"] }, "default");
});
});