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

@@ -27,10 +27,15 @@ const expectedFeatureKeys = [
"tasks",
"hr",
"integrations",
"kwp_integration",
"telephony",
"chat",
"booking",
"forms",
"signature",
"billing",
"customer_portal",
"customer_portal_custom_domain",
"search",
"automation",
"api",
@@ -46,9 +51,8 @@ const expectedFeatureKeys = [
"rate-limit-per-minute",
"rate-limit-per-second",
"priority-support",
"ai-credits",
"private-generations",
] as const satisfies readonly FeatureKey[];
const seededFeatureRegistry = featureGateRegistry.filter((feature) => feature.key !== "ai-credits" && feature.key !== "private-generations");
const unsafeFixturePattern =
/(?:prod_[a-z0-9]|price_[a-z0-9]|sk_(?:live|test)|pk_(?:live|test)|api[_ -]?key|secret|password|token|tenant[_ -]?id|customer[_ -]?id|subscription[_ -]?id|acct_[a-z0-9]|cus_[a-z0-9]|sub_[a-z0-9])/i;
@@ -90,12 +94,12 @@ describe("standardEntitlementPlans", () => {
expect(
plan.features.map((feature) => feature.featureKey),
`${plan.id} registry coverage`
).toEqual(featureGateRegistry.map((feature) => feature.key));
).toEqual(seededFeatureRegistry.map((feature) => feature.key));
}
});
it("keeps plan feature assignments in registry order", () => {
const expectedOrders = featureGateRegistry.map((feature) => feature.defaultOrder);
const expectedOrders = seededFeatureRegistry.map((feature) => feature.defaultOrder);
for (const plan of standardEntitlementPlans) {
expect(
@@ -121,21 +125,38 @@ describe("standardEntitlementPlans", () => {
});
it("exposes lookup helpers without mutating fixture order", () => {
expect(getStandardEntitlementPlan("pro")?.metadata.publicName).toBe("Pro");
expect(getStandardEntitlementPlan("pro")?.metadata.publicName).toBe("Swarm");
expect(getStandardEntitlementPlan("pro")?.metadata.billingProviderProductId).toBe(getBillingProviderProductPlaceholder("pro"));
expect(getStandardEntitlementPlan("pro")?.metadata.billingProviderPriceId).toBe(getBillingProviderPricePlaceholder("pro"));
expect(getStandardEntitlementPlan("unknown-plan")).toBeUndefined();
expect(listStandardEntitlementPlanIds()).toEqual(expectedPlanIds);
});
it("keeps portal and custom-domain plan rights separate", () => {
const starter = getStandardEntitlementPlan("starter");
const pro = getStandardEntitlementPlan("pro");
const business = getStandardEntitlementPlan("business");
expect(starter?.features.find((feature) => feature.featureKey === "customer_portal")?.limitType).toBe(entitlementLimitTypes.notIncluded);
expect(pro?.features.find((feature) => feature.featureKey === "customer_portal")?.limitType).toBe(entitlementLimitTypes.notIncluded);
expect(business?.features.find((feature) => feature.featureKey === "customer_portal")?.limitType).toBe(entitlementLimitTypes.included);
for (const plan of [starter, pro, business]) {
expect(plan?.features.find((feature) => feature.featureKey === "customer_portal_custom_domain")?.limitType).toBe(entitlementLimitTypes.notIncluded);
}
});
it("uses deterministic safe Mollie placeholders and no secret-looking fixture strings", () => {
for (const plan of standardEntitlementPlans) {
expect(plan.metadata.billingProviderProductId, `${plan.id} product id placeholder`).toBe(getBillingProviderProductPlaceholder(plan.id));
expect(plan.metadata.billingProviderPriceId, `${plan.id} price id placeholder`).toBe(getBillingProviderPricePlaceholder(plan.id));
expect(plan.metadata.billingProviderProductId, `${plan.id} non-empty product placeholder`).not.toBe("");
expect(plan.metadata.billingProviderPriceId, `${plan.id} non-empty price placeholder`).not.toBe("");
expect(getStandardEntitlementPlan(plan.id)?.metadata.billingProviderProductId, `${plan.id} lookup product placeholder`).toBe(plan.metadata.billingProviderProductId);
expect(getStandardEntitlementPlan(plan.id)?.metadata.billingProviderPriceId, `${plan.id} lookup price placeholder`).toBe(plan.metadata.billingProviderPriceId);
expect(getStandardEntitlementPlan(plan.id)?.metadata.billingProviderProductId, `${plan.id} lookup product placeholder`).toBe(
plan.metadata.billingProviderProductId
);
expect(getStandardEntitlementPlan(plan.id)?.metadata.billingProviderPriceId, `${plan.id} lookup price placeholder`).toBe(
plan.metadata.billingProviderPriceId
);
const strings = [
plan.id,