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
+31
@@ -0,0 +1,31 @@
|
||||
// @vitest-environment node
|
||||
|
||||
import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
const SOURCES = [
|
||||
"hrService.server.ts",
|
||||
"hrLeaveService.server.ts",
|
||||
"hrPayslipService.server.ts",
|
||||
"hrRequestService.server.ts",
|
||||
"hrSickLeaveService.server.ts",
|
||||
].map((file) => readFileSync(`apps/web/app/utils/integrations/${file}`, "utf8"));
|
||||
|
||||
describe("HR activity i18n contract", () => {
|
||||
it("persists semantic keys for every machine-authored HR summary", () => {
|
||||
const summaries = SOURCES.flatMap((source) =>
|
||||
[...source.matchAll(/summaryText:\s*"([^"]+)"/gu)].map((match) => match[1]),
|
||||
);
|
||||
|
||||
expect(summaries).toEqual(
|
||||
expect.arrayContaining([
|
||||
"activity.runtime.hr.documentUploaded",
|
||||
"activity.runtime.hr.leaveRequested",
|
||||
"activity.runtime.hr.payslipProvided",
|
||||
"activity.runtime.hr.requestSubmitted",
|
||||
"activity.runtime.hr.sickLeaveRecorded",
|
||||
]),
|
||||
);
|
||||
expect(summaries.every((summary) => summary.startsWith("activity.runtime.hr."))).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user