Update hivegrid-cloud reference to latest main

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
davidandClaude Fable 5 committed 2026-07-08 16:15:37 +02:00
1 parent e98d38e716
commit 7b21524c86
3781 files changed
+373484 -225607

No files matched your search

@@ -0,0 +1,35 @@
import { describe, expect, it } from "vitest";
import { INTEGRATION_CATALOG } from "./catalog.js";
import { buildAppUpsertData, buildCatalogSeedPlan } from "./catalog-seed.js";
// R-P5 — the catalog seed plan mirrors INTEGRATION_CATALOG 1:1 and stays
// idempotent by unique key (deferred App-table seed, now shipped).
describe("buildCatalogSeedPlan", () => {
it("produces one upsert payload per catalog entry, keyed uniquely", () => {
const plan = buildCatalogSeedPlan();
expect(plan).toHaveLength(INTEGRATION_CATALOG.length);
expect(new Set(plan.map((entry) => entry.key)).size).toBe(plan.length);
});
it("maps catalog fields onto the App columns (title carries the i18n key)", () => {
const sample = INTEGRATION_CATALOG.find((entry) => entry.key === "sample-data-sync")!;
const data = buildAppUpsertData(sample);
expect(data).toMatchObject({
key: "sample-data-sync",
title: "integrations.app.sampleDataSync.title",
category: "erp",
connectionType: "rest_api",
phase: "P5",
icon: null,
isActive: true,
});
expect(data.connectionSchema.fields.map((field) => field.name)).toEqual(["baseUrl", "apiKey"]);
});
it("keeps oauth2 apps with empty credential forms seedable", () => {
const gmail = buildCatalogSeedPlan().find((entry) => entry.key === "gmail")!;
expect(gmail.connectionType).toBe("oauth2");
expect(gmail.connectionSchema.fields).toEqual([]);
});
});