diff --git a/src/components/admin/__tests__/api-token-overview-responsive.test.tsx b/src/components/admin/__tests__/api-token-overview-responsive.test.tsx index 6e2cb877d..b0f0c47ea 100644 --- a/src/components/admin/__tests__/api-token-overview-responsive.test.tsx +++ b/src/components/admin/__tests__/api-token-overview-responsive.test.tsx @@ -122,6 +122,34 @@ describe("ApiTokenOverviewSection — responsive", () => { expect(html).toMatch(/class="[^"]*\bp-4\b[^"]*sm:p-6/); }); + it("desktop date cells drop whitespace-nowrap (v1.4.22 C2 5th-attempt fix)", () => { + const html = render(); + // The "Last used" + "Created" `
| inside the desktop table that renders one of the + // two date columns (text-right + text-xs is unique to those cells) + // and assert none carries whitespace-nowrap. + const dateCellMatches = + tableMarkup.match( + / | ]*\btext-right\b[^>]*\btext-xs\b[^>]*>/g,
+ ) ?? [];
+ expect(dateCellMatches.length).toBeGreaterThanOrEqual(2);
+ for (const cell of dateCellMatches) {
+ expect(cell).not.toContain("whitespace-nowrap");
+ }
+ });
+
it("mobile timestamp lines wrap (no nowrap on the meta paragraphs)", () => {
const html = render();
const mobileMatch = html.match(/
|
-
+ {/* v1.4.22 C2 (5th attempt) — drop
+ `whitespace-nowrap` on the date cells. The
+ v1.4.19 A7 probe confirmed `formatDateTime`
+ renders "05.05.2026, 21:46" (~110px) which
+ exceeds the 12% ` | {token.lastUsedAt ? formatDateTime(token.lastUsedAt) : t("admin.tokenNeverUsed")} | -+ | {formatDate(token.createdAt)} |