feat(housekeeping): deliver content vertical

This commit is contained in:
Simo committed 2026-08-30 01:54:43 +02:00
1 parent bdab924bdf
commit fd68819d9b
67 files changed
+5742 -1916

No files matched your search

+22 -10
View File
@@ -4,10 +4,16 @@ import { describe, expect, it } from "vitest";
describe("staff smoke contract", () => {
it("gates photos delete with PAGES_EDIT", () => {
const src = readFileSync("src/actions/admin-photos.ts", "utf8");
expect(src).toContain("PERMS.PAGES_EDIT");
expect(src).toContain("deletePhoto");
expect(src).toContain("logStaffActivity");
const wrapper = readFileSync("src/actions/admin-photos.ts", "utf8");
const runtime = readFileSync(
"src/features/housekeeping/domains/content/services/mutation-runtime-external.ts",
"utf8",
);
expect(wrapper).toContain("PERMS.PAGES_EDIT");
expect(wrapper).toContain("deletePhoto");
expect(wrapper).toContain("contentMutationService.execute");
expect(wrapper).toContain('"photo.delete"');
expect(runtime).toContain("logStaffActivity");
expect(existsSync("src/app/admin/photos/page.tsx")).toBe(true);
expect(readFileSync("src/app/admin/photos/page.tsx", "utf8")).toContain(
"AdminPageShell",
@@ -149,12 +155,18 @@ describe("staff smoke contract", () => {
expect(service).toContain("rcon.setTradeLock");
});
it("deletes photos via Drizzle with local file purge helper", () => {
const src = readFileSync("src/actions/admin-photos.ts", "utf8");
expect(src).toContain("CameraWeb");
expect(src).toContain("tryRemoveLocalPhotoFile");
expect(src).toContain("@/lib/admin/photo-files");
expect(src).toContain("@/lib/db");
it("keeps Drizzle photo deletion and local purge in the Content runtime", () => {
const wrapper = readFileSync("src/actions/admin-photos.ts", "utf8");
const runtime = readFileSync(
"src/features/housekeeping/domains/content/services/mutation-runtime-external.ts",
"utf8",
);
expect(wrapper).toContain("contentMutationService.execute");
expect(wrapper).toContain('"photo.delete"');
expect(runtime).toContain("CameraWeb");
expect(runtime).toContain("tryRemoveLocalPhotoFile");
expect(runtime).toContain("@/lib/admin/photo-files");
expect(runtime).toContain("@/lib/db");
});
it("guards dual ticket queues on admin and mod", () => {