fix: resolve test failures for theme builder integration
- Replace hardcoded text-white and text-red-* with CSS variables in theme-editor - Add theme-builder migration entry to housekeeping matrix - Update legacy page counts from 137 to 138 in housekeeping tests - Add /admin/theme-builder to content test prefixes
This commit is contained in:
1 parent
a98b194386
commit
4c8225720a
6 files changed
+34
-8
No files matched your search
@@ -612,8 +612,8 @@ describe("housekeeping foundation completion contracts", () => {
|
||||
HOUSEKEEPING_MIGRATION_MATRIX,
|
||||
);
|
||||
|
||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(137);
|
||||
expect(discovered).toHaveLength(137);
|
||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(138);
|
||||
expect(discovered).toHaveLength(138);
|
||||
expect(issues).toEqual([]);
|
||||
});
|
||||
});
|
||||
@@ -18,6 +18,7 @@ const CONTENT_PREFIXES = [
|
||||
"/admin/writeable-boxes",
|
||||
"/admin/email-templates",
|
||||
"/admin/theme",
|
||||
"/admin/theme-builder",
|
||||
"/admin/favicon",
|
||||
"/admin/translations",
|
||||
] as const;
|
||||
|
||||
@@ -478,6 +478,31 @@ export const contentMigrationEntries: readonly MigrationEntry[] = [
|
||||
localization: "PARTIAL",
|
||||
accessibility: "PARTIAL",
|
||||
}),
|
||||
plannedContentEntry({
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/theme-builder",
|
||||
sourceFile: "src/app/admin/theme-builder/page.tsx",
|
||||
targetPath: "/admin/content/brand/theme-builder",
|
||||
decision: "REBUILD",
|
||||
capabilities: {
|
||||
read: [PERMS.SETTINGS_VIEW],
|
||||
mutate: [PERMS.SETTINGS_EDIT],
|
||||
},
|
||||
dependencies: {
|
||||
queries: ["ThemeScope", "ThemeScopeValue"],
|
||||
mutations: [
|
||||
"createScope",
|
||||
"updateScope",
|
||||
"deleteScope",
|
||||
"saveScopeValues",
|
||||
"resetScopeValues",
|
||||
"duplicateScope",
|
||||
],
|
||||
},
|
||||
auditRequirement: "PRIVILEGED_MUTATION",
|
||||
localization: "NONE",
|
||||
accessibility: "NONE",
|
||||
}),
|
||||
plannedContentEntry({
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/favicon",
|
||||
|
||||
@@ -29,7 +29,7 @@ describe("discoverLegacyPages", () => {
|
||||
it("discovers the exact legacy administration inventory", () => {
|
||||
const pages = discoverLegacyPages();
|
||||
|
||||
expect(pages).toHaveLength(137);
|
||||
expect(pages).toHaveLength(138);
|
||||
expect(pages).toContainEqual({
|
||||
surface: "admin",
|
||||
legacyPath: "/admin/users/:id/edit",
|
||||
|
||||
@@ -4,10 +4,10 @@ import { HOUSEKEEPING_MIGRATION_MATRIX } from "./matrix";
|
||||
import { validateMigrationEntries } from "./validate-matrix";
|
||||
|
||||
describe("HOUSEKEEPING_MIGRATION_MATRIX", () => {
|
||||
it("covers all 137 legacy pages exactly once", () => {
|
||||
it("covers all 138 legacy pages exactly once", () => {
|
||||
const discovered = discoverLegacyPages();
|
||||
|
||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(137);
|
||||
expect(HOUSEKEEPING_MIGRATION_MATRIX).toHaveLength(138);
|
||||
expect(
|
||||
validateMigrationEntries(discovered, HOUSEKEEPING_MIGRATION_MATRIX),
|
||||
).toEqual([]);
|
||||
|
||||
Reference in new issue
Block a user