evOo-local/apps/mobile/lib/app-connect.test.ts
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

26 lines
802 B
TypeScript

import { describe, expect, it } from "vitest";
import { appConnectPresentation } from "./app-connect.js";
describe("appConnectPresentation", () => {
const block = {
kind: "app_connect" as const,
provider: "gmail",
name: "Gmail",
description: "Search, read, draft, and send email.",
logo: null,
status: "pending" as const,
};
it("renders an authorize control for pending app_connect blocks", () => {
const view = appConnectPresentation(block);
expect(view.showAuthorize).toBe(true);
expect(view.actionLabel).toBe("Authorize");
});
it("hides authorize once connected", () => {
const view = appConnectPresentation({ ...block, status: "connected" });
expect(view.showAuthorize).toBe(false);
expect(view.actionLabel).toBe("Connected");
});
});