Files
AgentCompany/tests/unit/connector-brands.test.ts
T
ZacharyZhang-NYandClaude Opus 5.5 56b0594f91 Move Composio, logo.dev and Antigravity keys into Settings
The three third-party keys were hardcoded or read from the environment.
Operators now enter them in Settings > Integrations; they are stored
encrypted in the app-wide integration_keys table (migration 058).
An agent holding connector grants fails loudly when no Composio key is
saved. The goal-review test no longer depends on absolute dates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 01:34:14 -04:00

23 lines
1023 B
TypeScript

import { describe, expect, test } from "vitest";
import { connectorDisplayName, connectorLogoUrl } from "../../src/main/services/composio/connector-brands";
describe("connector brands", () => {
test("known toolkits resolve a display name and a logo.dev URL with the saved token", () => {
expect(connectorDisplayName("google_analytics")).toBe("Google Analytics");
expect(connectorLogoUrl("google_analytics", "pk_test")).toBe(
"https://img.logo.dev/analytics.google.com?token=pk_test",
);
expect(connectorDisplayName("share_point")).toBe("SharePoint");
expect(connectorLogoUrl("stripe", "pk_a&b")).toBe("https://img.logo.dev/stripe.com?token=pk_a%26b");
});
test("no saved token means no logo URL", () => {
expect(connectorLogoUrl("stripe", null)).toBeNull();
});
test("unknown toolkits prettify the slug and carry no logo", () => {
expect(connectorDisplayName("acme_billing")).toBe("Acme Billing");
expect(connectorLogoUrl("acme_billing", "pk_test")).toBeNull();
});
});