test(housekeeping): cover nitro cleanup page in migration matrix
This commit is contained in:
1 parent
694f87d98c
commit
ea4fd375b4
4 files changed
+29
-6
No files matched your search
@@ -605,15 +605,15 @@ describe("housekeeping foundation completion contracts", () => {
|
|||||||
expect(html).toContain(`>${sentinel}</button>`);
|
expect(html).toContain(`>${sentinel}</button>`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("validates the complete 143-row migration matrix without issues", () => {
|
it("validates the complete 144-row migration matrix without issues", () => {
|
||||||
const discovered = discoverLegacyPages();
|
const discovered = discoverLegacyPages();
|
||||||
const issues = validateMigrationEntries(
|
const issues = validateMigrationEntries(
|
||||||
discovered,
|
discovered,
|
||||||
HOUSEKEEPING_MIGRATION_MATRIX,
|
HOUSEKEEPING_MIGRATION_MATRIX,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(143);
|
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(144);
|
||||||
expect(discovered).toHaveLength(143);
|
expect(discovered).toHaveLength(144);
|
||||||
expect(issues).toEqual([]);
|
expect(issues).toEqual([]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -29,7 +29,7 @@ describe("discoverLegacyPages", () => {
|
|||||||
it("discovers the exact legacy administration inventory", () => {
|
it("discovers the exact legacy administration inventory", () => {
|
||||||
const pages = discoverLegacyPages();
|
const pages = discoverLegacyPages();
|
||||||
|
|
||||||
expect(pages).toHaveLength(143);
|
expect(pages).toHaveLength(144);
|
||||||
expect(pages).toContainEqual({
|
expect(pages).toContainEqual({
|
||||||
surface: "admin",
|
surface: "admin",
|
||||||
legacyPath: "/admin/users/:id/edit",
|
legacyPath: "/admin/users/:id/edit",
|
||||||
|
|||||||
@@ -573,6 +573,29 @@ export const hotelMigrationEntries: readonly MigrationEntry[] = [
|
|||||||
accessibility: "PARTIAL",
|
accessibility: "PARTIAL",
|
||||||
notes: ["The current page relies on action-level catalog-edit enforcement"],
|
notes: ["The current page relies on action-level catalog-edit enforcement"],
|
||||||
}),
|
}),
|
||||||
|
plannedHotelEntry({
|
||||||
|
surface: "admin",
|
||||||
|
legacyPath: "/admin/studio/nitro-cleanup",
|
||||||
|
sourceFile: "src/app/admin/studio/nitro-cleanup/page.tsx",
|
||||||
|
targetPath: "/admin/hotel/studio/nitro-cleanup",
|
||||||
|
decision: "REBUILD",
|
||||||
|
capabilities: {
|
||||||
|
read: [PERMS.ASSETS_IMPORT],
|
||||||
|
mutate: [PERMS.ASSETS_IMPORT],
|
||||||
|
},
|
||||||
|
dependencies: {
|
||||||
|
queries: ["GET /api/admin/studio/nitro-cleanup", "scanFakeBrokenNitros"],
|
||||||
|
mutations: [
|
||||||
|
"DELETE /api/admin/studio/nitro-cleanup",
|
||||||
|
"clearFurniImportCache",
|
||||||
|
"deleteNitroCleanupFiles",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
auditRequirement: "PRIVILEGED_MUTATION",
|
||||||
|
localization: "PARTIAL",
|
||||||
|
accessibility: "PARTIAL",
|
||||||
|
notes: ["Deletes orphaned or unparseable nitro bundles from asset files"],
|
||||||
|
}),
|
||||||
plannedHotelEntry({
|
plannedHotelEntry({
|
||||||
surface: "admin",
|
surface: "admin",
|
||||||
legacyPath: "/admin/studio/pets",
|
legacyPath: "/admin/studio/pets",
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { HOUSEKEEPING_MIGRATION_MATRIX } from "./matrix";
|
|||||||
import { validateMigrationEntries } from "./validate-matrix";
|
import { validateMigrationEntries } from "./validate-matrix";
|
||||||
|
|
||||||
describe("HOUSEKEEPING_MIGRATION_MATRIX", () => {
|
describe("HOUSEKEEPING_MIGRATION_MATRIX", () => {
|
||||||
it("covers all 143 legacy pages exactly once", () => {
|
it("covers all 144 legacy pages exactly once", () => {
|
||||||
const discovered = discoverLegacyPages();
|
const discovered = discoverLegacyPages();
|
||||||
|
|
||||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(143);
|
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(144);
|
||||||
expect(
|
expect(
|
||||||
validateMigrationEntries(discovered, HOUSEKEEPING_MIGRATION_MATRIX),
|
validateMigrationEntries(discovered, HOUSEKEEPING_MIGRATION_MATRIX),
|
||||||
).toEqual([]);
|
).toEqual([]);
|
||||||
|
|||||||
Reference in new issue
Block a user