Refactor site header, heroes, and design system

This commit is contained in:
MOH
2026-03-08 00:29:51 +01:00
parent a18370d003
commit 0c2b67e378
56 changed files with 2714 additions and 1318 deletions
+46
View File
@@ -81,6 +81,28 @@ describe("portfolio validation", () => {
}).type,
).toBe("RICH_TEXT");
expect(
sectionInputSchema.parse({
type: "GALLERY",
titleAr: "معرض",
titleEn: "Single Image",
titleDe: "Einzelbild",
bodyAr: "",
bodyEn: "",
bodyDe: "",
imagePath: "/uploads/media/sections/example.svg",
media: {
mode: "library",
assetId: "asset_2",
url: "",
label: "Single Image",
kind: "IMAGE",
},
linkUrl: "",
sortOrder: 1,
}).type,
).toBe("GALLERY");
expect(
assetInputSchema.parse({
kind: "IMAGE",
@@ -121,4 +143,28 @@ describe("portfolio validation", () => {
}),
).toThrow(/url/i);
});
it("rejects link sections without a link", () => {
expect(() =>
sectionInputSchema.parse({
type: "LINK",
titleAr: "رابط",
titleEn: "Link",
titleDe: "Link",
bodyAr: "",
bodyEn: "",
bodyDe: "",
imagePath: "",
media: {
mode: "upload",
assetId: "",
url: "",
label: "",
kind: "IMAGE",
},
linkUrl: "",
sortOrder: 0,
}),
).toThrow(/link/i);
});
});