diff --git a/desktop/src/features/channels/ui/EphemeralChannelBadge.tsx b/desktop/src/features/channels/ui/EphemeralChannelBadge.tsx index 64ba23c960..c8af40f314 100644 --- a/desktop/src/features/channels/ui/EphemeralChannelBadge.tsx +++ b/desktop/src/features/channels/ui/EphemeralChannelBadge.tsx @@ -1,9 +1,6 @@ import { Clock } from "lucide-react"; -import { - EPHEMERAL_CHANNEL_LABEL, - type EphemeralChannelDisplay, -} from "@/features/channels/lib/ephemeralChannel"; +import type { EphemeralChannelDisplay } from "@/features/channels/lib/ephemeralChannel"; import { cn } from "@/shared/lib/cn"; type EphemeralChannelBadgeProps = { @@ -24,10 +21,6 @@ export function EphemeralChannelBadge({ "aria-label": display.tooltipLabel, role: "img" as const, }; - const label = - isHeader && display.detailLabel - ? `${EPHEMERAL_CHANNEL_LABEL} ยท ${display.detailLabel}` - : EPHEMERAL_CHANNEL_LABEL; return ( - {isHeader ? {label} : null} ); } diff --git a/desktop/tests/e2e/channels.spec.ts b/desktop/tests/e2e/channels.spec.ts index cbac8f67db..a6a1d18fe6 100644 --- a/desktop/tests/e2e/channels.spec.ts +++ b/desktop/tests/e2e/channels.spec.ts @@ -329,8 +329,10 @@ test("create ephemeral stream shows sidebar and header affordances", async ({ await expect( page.getByTestId(`channel-ephemeral-${channelName}`), ).toBeVisible(); - await expect(page.getByTestId("chat-ephemeral-badge")).toHaveText( - /Ephemeral.+left/, + await expect(page.getByTestId("chat-ephemeral-badge")).toBeVisible(); + await expect(page.getByTestId("chat-ephemeral-badge")).toHaveAttribute( + "title", + /Ephemeral channel\..+left/, ); await page.getByRole("button", { name: "Toggle Sidebar" }).click(); @@ -370,8 +372,9 @@ test("ephemeral countdown refreshes when switching channels after a clock jump", await page.getByTestId(`channel-${firstChannelName}`).click(); await expect(page.getByTestId("chat-title")).toHaveText(firstChannelName); - await expect(page.getByTestId("chat-ephemeral-badge")).toHaveText( - /Ephemeral.+22h left/, + await expect(page.getByTestId("chat-ephemeral-badge")).toHaveAttribute( + "title", + /Ephemeral channel\..+22 hours left/, ); });