diff --git a/src/components/brand/logo.test.tsx b/src/components/brand/logo.test.tsx index 7e3f3cd..8d70592 100644 --- a/src/components/brand/logo.test.tsx +++ b/src/components/brand/logo.test.tsx @@ -8,13 +8,9 @@ import { expect, test } from "vitest"; import { PortalShell } from "@/components/layout/portal-shell"; import { BrandLogo } from "./logo"; -test("uses each supplied logo's true intrinsic dimensions", () => { - const { rerender } = render(); +test("uses the supplied logo's true intrinsic dimensions", () => { + render(); const logo = screen.getByAltText("Leon Tonhäuser Sportfotografie"); - expect(logo.getAttribute("width")).toBe("250"); - expect(logo.getAttribute("height")).toBe("250"); - - rerender(); expect(logo.getAttribute("width")).toBe("1000"); expect(logo.getAttribute("height")).toBe("1000"); }); diff --git a/src/components/ui/page-header.tsx b/src/components/ui/page-header.tsx index e702a5f..4fb46a8 100644 --- a/src/components/ui/page-header.tsx +++ b/src/components/ui/page-header.tsx @@ -1,17 +1,20 @@ import React from "react"; type PageHeaderProps = { - kicker: string; + kicker?: string; title: string; description?: string; + titleId?: string; + children?: React.ReactNode; }; -export function PageHeader({ kicker, title, description }: PageHeaderProps) { +export function PageHeader({ kicker, title, description, titleId, children }: PageHeaderProps) { return (
-

{kicker}

+ {kicker &&

{kicker}

}
-

{title}

+

{title}

+ {children}
{description && (

diff --git a/src/modules/usages/service.test.ts b/src/modules/usages/service.test.ts index 1975d2c..f762190 100644 --- a/src/modules/usages/service.test.ts +++ b/src/modules/usages/service.test.ts @@ -155,7 +155,7 @@ test("canonicalizes every UUID before fingerprinting, lookup, Immich calls, and expect(second).toEqual(first); expect(usages).toHaveLength(1); expect(usages[0]).toMatchObject({ editorialId, assetId, albumId, idempotencyKey }); - expect(immich.listAlbumsForAsset).toHaveBeenCalledWith(assetId); + expect(immich.getAlbum).toHaveBeenCalledWith(albumId); expect(immich.getAsset).toHaveBeenCalledWith(assetId); }); @@ -273,23 +273,15 @@ test("rejects removal from the requested album between preflight and locked refr test("persists metadata from the locked final Immich refresh", async () => { const { service, immich, usages } = createService(); - immich.getAsset + immich.getAlbum .mockResolvedValueOnce({ - id: assetId, - type: "IMAGE" as const, - originalFileName: "jubel.jpg", - originalMimeType: "image/jpeg", - albums: [{ id: albumId }], + id: albumId, + albumName: "Presse 2026", }) - .mockResolvedValueOnce([ - { - id: albumId, - albumName: "Presse final", - description: null, - albumThumbnailAssetId: assetId, - assetCount: 1, - }, - ]); + .mockResolvedValueOnce({ + id: albumId, + albumName: "Presse final", + }); const currentAsset = { id: assetId, type: "IMAGE" as const, diff --git a/tests/db/accounting-migration.test.ts b/tests/db/accounting-migration.test.ts index fe8dfff..bf95d50 100644 --- a/tests/db/accounting-migration.test.ts +++ b/tests/db/accounting-migration.test.ts @@ -197,7 +197,7 @@ test("0002 preserves dirty rows and reconstructs only provable legacy intents", await testDb.applyRemainingMigrations(); const immich = { - listAlbumsForAsset: vi.fn(), + getAlbum: vi.fn(), getAsset: vi.fn(), }; const usageService = createUsageService({