Refresh HiveGrid Cloud reference snapshot

This commit is contained in:
david committed 2026-08-03 15:31:14 +02:00
1 parent 5e99e14772
commit 7f88026f79
5955 files changed
+1177325 -188362

No files matched your search

@@ -1,6 +1,6 @@
import { describe, expect, it } from "vitest";
import { getDefaultProductBlueprint, getProductBlueprint, productBlueprintIds, productBlueprints } from "./index.js";
import { featureKeys, getDefaultProductBlueprint, getProductBlueprint, productBlueprintIds, productBlueprints } from "./index.js";
describe("product blueprint lookups", () => {
it("resolves the CRM SaaS blueprint by id and returns the shared registry instance", () => {
@@ -23,7 +23,7 @@ describe("product blueprint lookups", () => {
expect(blueprint.id).toBe(productBlueprintIds.crmSaas);
expect(blueprint.defaultShowcase).toBe(true);
expect(blueprint.version).toBe("2026.05.15");
expect(blueprint.version).toBe("2026.07.20");
});
it("keeps blueprint fixtures deeply immutable", () => {
@@ -42,7 +42,7 @@ describe("product blueprint lookups", () => {
expect(() => {
(target as { version: string }).version = "tampered";
}).toThrow(TypeError);
expect(getDefaultProductBlueprint().version).toBe("2026.05.15");
expect(getDefaultProductBlueprint().version).toBe("2026.07.20");
});
it("gates every CRM SaaS feature behind a tenant role permission and enables it by default", () => {
@@ -58,4 +58,68 @@ describe("product blueprint lookups", () => {
expect(feature.requiresTenantRolePermission, `${feature.featureKey} non-empty permission`).not.toBe("");
}
});
it("marks core modules as included-in-core and keeps the Email-Marketing add-on subscription-gated (Fundament D)", () => {
const blueprint = getDefaultProductBlueprint();
const includedInCoreByKey = new Map(blueprint.features.map((feature) => [feature.featureKey, feature.includedInCore]));
// Core modules every tenant receives regardless of subscription (plan-gate removed).
for (const coreKey of [
featureKeys.dashboard,
featureKeys.crmBasic,
featureKeys.leads,
featureKeys.projects,
featureKeys.files,
featureKeys.tasks,
featureKeys.hr,
featureKeys.integrations,
featureKeys.telephony,
featureKeys.chat,
featureKeys.booking,
featureKeys.forms,
featureKeys.signature,
featureKeys.billing,
featureKeys.search,
featureKeys.automation,
featureKeys.emailInbox,
featureKeys.api,
featureKeys.workflowEngine,
featureKeys.mcp,
featureKeys.users,
]) {
expect(includedInCoreByKey.get(coreKey), `${coreKey} is a core module`).toBe(true);
}
// The Email-Marketing add-on (incl. its audience lists) stays subscription-gated.
for (const addOnKey of [featureKeys.emailMarketing, featureKeys.importedLists, featureKeys.crmBasedLists]) {
expect(includedInCoreByKey.get(addOnKey), `${addOnKey} is a paid add-on`).toBe(false);
}
for (const addOnKey of [featureKeys.customerPortal, featureKeys.customerPortalCustomDomain]) {
expect(includedInCoreByKey.get(addOnKey), `${addOnKey} is commercially gated`).toBe(false);
}
expect(includedInCoreByKey.get(featureKeys.kwpIntegration), "KWP is a subscription-gated add-on").toBe(false);
});
it("keeps KWP subscription-gated and non-toggleable by tenants", () => {
expect(getDefaultProductBlueprint().features.find((feature) => feature.featureKey === featureKeys.kwpIntegration)).toMatchObject({
defaultEnabled: true,
tenantToggleable: false,
includedInCore: false,
requiresTenantRolePermission: "integrations.read",
});
});
it("does not permit tenant overrides to self-enable portal products", () => {
const blueprint = getDefaultProductBlueprint();
for (const featureKey of [featureKeys.customerPortal, featureKeys.customerPortalCustomDomain]) {
expect(blueprint.features.find((feature) => feature.featureKey === featureKey)).toMatchObject({
defaultEnabled: true,
tenantToggleable: false,
includedInCore: false,
requiresTenantRolePermission: "portal.admin",
});
}
});
});