test(web): keep the preview profile label helper private (#9997)

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-05 00:20:11 -07:00
1 parent 4f1dc55cab
commit 11cb88efc5
2 files changed
+2 -8

No files matched your search

@@ -251,7 +251,7 @@ vi.mock("./AgentBrowserCursor", () => ({ AgentBrowserCursor: () => null }));
vi.mock("~/browser/BrowserSurfaceSlot", () => ({ BrowserSurfaceSlot: () => null }));
vi.mock("./usePreviewSession", () => ({ usePreviewSession: vi.fn() }));
import { PreviewView, previewProfileName } from "./PreviewView";
import { PreviewView } from "./PreviewView";
import { toastManager } from "~/components/ui/toast";
import { previewRuntimeTabId } from "~/browser/previewRuntimeTabId";
@@ -352,12 +352,6 @@ describe("PreviewView navigation", () => {
mocks.recordVisitForThread.mockClear();
});
it("labels a tab whose saved profile was removed", () => {
expect(previewProfileName(BUILT_IN_BROWSER_PROFILES, "profile-removed")).toBe(
"Removed profile",
);
});
it("does not rerender while loading time passes", async () => {
vi.useFakeTimers();
mocks.loading = true;
@@ -76,7 +76,7 @@ interface Props {
) => void;
}
export function previewProfileName(
function previewProfileName(
profiles: ReadonlyArray<{ readonly id: string; readonly name: string }>,
profileId: string,
): string {