Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { buildApiAdminVM } from "./api-admin.vm.js";
|
||||
|
||||
describe("buildApiAdminVM", () => {
|
||||
it("marks inbound attention when pending registrations or new leads exist", () => {
|
||||
const vm = buildApiAdminVM({
|
||||
metrics: [{ id: "keys", value: 3, labelKey: "admin.apiAdmin.metrics.keys.label", detailKey: "admin.apiAdmin.metrics.keys.detail", tone: "success" }],
|
||||
consumers: [],
|
||||
inbound: {
|
||||
registrationsPending: 1,
|
||||
leadsNew: 2,
|
||||
leadsQualified: 0,
|
||||
recentRegistrations: [],
|
||||
recentLeads: [],
|
||||
},
|
||||
});
|
||||
|
||||
expect(vm.status).toBe("ready");
|
||||
if (vm.status !== "ready") return;
|
||||
expect(vm.data.hasInboundAttention).toBe(true);
|
||||
});
|
||||
|
||||
it("returns empty without operational data", () => {
|
||||
expect(
|
||||
buildApiAdminVM({
|
||||
metrics: [],
|
||||
consumers: [],
|
||||
inbound: { registrationsPending: 0, leadsNew: 0, leadsQualified: 0, recentRegistrations: [], recentLeads: [] },
|
||||
}).status
|
||||
).toBe("empty");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user