From ae2f671321a2bb4351e56072742831b38826981b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 10 May 2026 13:58:30 +0200 Subject: [PATCH] style: prettier on touched test + e2e files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Run prettier on the test, e2e, and component files this v1.4.19 A8 wave touched. The .planning/* and docs/audit/* prettier warnings are pre-existing baseline noise — left alone to keep this commit narrow. Co-Authored-By: Claude Opus 4.7 (1M context) --- e2e/charts-mobile.spec.ts | 3 ++- e2e/settings-mobile-consistency.spec.ts | 4 +--- .../admin/__tests__/api-token-truncate.test.tsx | 4 +++- .../__tests__/login-overview-auth-filter.test.tsx | 5 ++++- src/components/admin/api-token-overview-section.tsx | 12 +++--------- src/lib/__tests__/time-window-format.test.ts | 8 ++------ 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/e2e/charts-mobile.spec.ts b/e2e/charts-mobile.spec.ts index fea3ac21c..c5ef3b706 100644 --- a/e2e/charts-mobile.spec.ts +++ b/e2e/charts-mobile.spec.ts @@ -213,7 +213,8 @@ test.describe("charts — mobile-viewport regression", () => { axis.querySelectorAll(".recharts-cartesian-axis-tick"), ); const visibleTicks = ticks.filter( - (t) => (t.querySelector("text")?.textContent?.trim() ?? "").length > 0, + (t) => + (t.querySelector("text")?.textContent?.trim() ?? "").length > 0, ); return visibleTicks.length; }); diff --git a/e2e/settings-mobile-consistency.spec.ts b/e2e/settings-mobile-consistency.spec.ts index 7991a5286..f449677aa 100644 --- a/e2e/settings-mobile-consistency.spec.ts +++ b/e2e/settings-mobile-consistency.spec.ts @@ -150,9 +150,7 @@ test.describe("Settings mobile consistency (Pixel 5)", () => { const trigger = page.locator("#comparison-baseline"); await expect(trigger).toBeVisible(); - const h = await trigger.evaluate( - (el) => el.getBoundingClientRect().height, - ); + const h = await trigger.evaluate((el) => el.getBoundingClientRect().height); expect(Math.round(h)).toBe(36); }); diff --git a/src/components/admin/__tests__/api-token-truncate.test.tsx b/src/components/admin/__tests__/api-token-truncate.test.tsx index 1aabe41d2..3078df936 100644 --- a/src/components/admin/__tests__/api-token-truncate.test.tsx +++ b/src/components/admin/__tests__/api-token-truncate.test.tsx @@ -120,7 +120,9 @@ describe("ApiTokenOverviewSection — truncate + tooltip (4th attempt)", () => { // card on mobile. Badge primitive already has `overflow-hidden`, // we add an upper bound on width so it ellipsises instead of // pushing the parent. - expect(html).toMatch(/]*max-w-(?:\[[^\]]+\]|full)[^>]*\btruncate\b/); + expect(html).toMatch( + /]*max-w-(?:\[[^\]]+\]|full)[^>]*\btruncate\b/, + ); }); it("renders shadcn tooltip wrappers around truncated cells so the full value stays discoverable", () => { diff --git a/src/components/admin/__tests__/login-overview-auth-filter.test.tsx b/src/components/admin/__tests__/login-overview-auth-filter.test.tsx index 41f4a1a13..cd52bcc5d 100644 --- a/src/components/admin/__tests__/login-overview-auth-filter.test.tsx +++ b/src/components/admin/__tests__/login-overview-auth-filter.test.tsx @@ -41,7 +41,10 @@ vi.mock("@tanstack/react-query", async () => { } } return { - data: { entries: [], meta: { total: 0, limit: 50, offset: 0, page: 1, perPage: 50 } }, + data: { + entries: [], + meta: { total: 0, limit: 50, offset: 0, page: 1, perPage: 50 }, + }, isLoading: false, isError: false, refetch: vi.fn(), diff --git a/src/components/admin/api-token-overview-section.tsx b/src/components/admin/api-token-overview-section.tsx index c32e67644..38af855e7 100644 --- a/src/components/admin/api-token-overview-section.tsx +++ b/src/components/admin/api-token-overview-section.tsx @@ -45,10 +45,7 @@ function TruncatedCell({ - + {value} @@ -168,8 +165,7 @@ export function ApiTokenOverviewSection() { {tokens.map((token, i) => { const isExpired = - token.expiresAt && - new Date(token.expiresAt) < new Date(); + token.expiresAt && new Date(token.expiresAt) < new Date(); return ( {p === "*" ? t("admin.tokenPermissionAll") : p} diff --git a/src/lib/__tests__/time-window-format.test.ts b/src/lib/__tests__/time-window-format.test.ts index 106f0b28a..c5cf6dd07 100644 --- a/src/lib/__tests__/time-window-format.test.ts +++ b/src/lib/__tests__/time-window-format.test.ts @@ -29,16 +29,12 @@ describe("formatTimeWindowRange", () => { test("English locale renders 'from ... to ...' instead of mixed-language 'bis Uhr'", () => { // Regression for v1.4.19 F-01: app rendered "Today, 19:00 bis 23:00 Uhr" // for English users because the formatter hard-coded German. - expect(formatTimeWindowRange("19:00", "23:00", "en")).toBe( - "19:00 – 23:00", - ); + expect(formatTimeWindowRange("19:00", "23:00", "en")).toBe("19:00 – 23:00"); }); test("falls back to the German format when no locale is supplied", () => { // Backwards-compat: existing call sites that have not been migrated // continue to render the historic German string. - expect(formatTimeWindowRange("08:00", "12:00")).toBe( - "08:00 bis 12:00 Uhr", - ); + expect(formatTimeWindowRange("08:00", "12:00")).toBe("08:00 bis 12:00 Uhr"); }); });