Q195: a change reloads only what is not already shown, and the snapshot stops carrying records the window never reads
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2f79e4261f
commit
56eac39b1b
31 files changed
+146
-214
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { tableRows } from "../helpers/table-rows";
|
||||
import { randomUUID } from "node:crypto";
|
||||
import { tmpdir } from "node:os";
|
||||
import { join } from "node:path";
|
||||
@@ -72,8 +73,8 @@ describe("org governance service", () => {
|
||||
});
|
||||
|
||||
const state = snapshot.load();
|
||||
expect(state.approvalAssignments).toHaveLength(1);
|
||||
expect(state.approvalAssignments[0]).toMatchObject({ approvalId, assigneeType: "employee" });
|
||||
expect(tableRows(connection.db, "approval_assignments", "created_at desc")).toHaveLength(1);
|
||||
expect(tableRows(connection.db, "approval_assignments", "created_at desc")[0]).toMatchObject({ approvalId, assigneeType: "employee" });
|
||||
expect(state.auditEvents.some((event) => event.entityType === "approval" && event.action === "routed")).toBe(true);
|
||||
connection.close();
|
||||
});
|
||||
@@ -107,8 +108,8 @@ describe("org governance service", () => {
|
||||
const state = snapshot.load();
|
||||
const approval = state.approvals.find((item) => item.kind === "agent_hire");
|
||||
expect(approval).toMatchObject({ orgId, title: "Review hire: Ada", risk: RISK_LEVEL.MEDIUM });
|
||||
expect(state.approvalAssignments).toHaveLength(1);
|
||||
expect(state.approvalAssignments[0]).toMatchObject({ approvalId: approval?.id, assigneeType: "employee" });
|
||||
expect(tableRows(connection.db, "approval_assignments", "created_at desc")).toHaveLength(1);
|
||||
expect(tableRows(connection.db, "approval_assignments", "created_at desc")[0]).toMatchObject({ approvalId: approval?.id, assigneeType: "employee" });
|
||||
connection.close();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user