mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-11 13:52:20 +00:00
style: prettier on touched test + e2e files
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
713b494f04
commit
ae2f671321
6 files changed
+15
-21
No files matched your search
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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(/<span[^>]*max-w-(?:\[[^\]]+\]|full)[^>]*\btruncate\b/);
|
||||
expect(html).toMatch(
|
||||
/<span[^>]*max-w-(?:\[[^\]]+\]|full)[^>]*\btruncate\b/,
|
||||
);
|
||||
});
|
||||
|
||||
it("renders shadcn tooltip wrappers around truncated cells so the full value stays discoverable", () => {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -45,10 +45,7 @@ function TruncatedCell({
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<span
|
||||
className={`block truncate ${className ?? ""}`}
|
||||
title={value}
|
||||
>
|
||||
<span className={`block truncate ${className ?? ""}`} title={value}>
|
||||
{value}
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
@@ -168,8 +165,7 @@ export function ApiTokenOverviewSection() {
|
||||
<tbody className="divide-border divide-y">
|
||||
{tokens.map((token, i) => {
|
||||
const isExpired =
|
||||
token.expiresAt &&
|
||||
new Date(token.expiresAt) < new Date();
|
||||
token.expiresAt && new Date(token.expiresAt) < new Date();
|
||||
return (
|
||||
<tr
|
||||
key={token.id}
|
||||
@@ -285,9 +281,7 @@ export function ApiTokenOverviewSection() {
|
||||
variant="secondary"
|
||||
className="max-w-full truncate text-[10px]"
|
||||
title={
|
||||
p === "*"
|
||||
? t("admin.tokenPermissionAllTooltip")
|
||||
: p
|
||||
p === "*" ? t("admin.tokenPermissionAllTooltip") : p
|
||||
}
|
||||
>
|
||||
{p === "*" ? t("admin.tokenPermissionAll") : p}
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user