Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix: cover Loom concierge link in importer fixture

Richie McIlroye9fb8511a280
diff --git a/apps/web/__tests__/unit/loom-import-ui.test.ts b/apps/web/__tests__/unit/loom-import-ui.test.ts
index d92f8e909..d228ec466 100644
--- a/apps/web/__tests__/unit/loom-import-ui.test.ts
+++ b/apps/web/__tests__/unit/loom-import-ui.test.ts
@@ -96,6 +96,9 @@ vi.mock("next/link", () => ({
}: React.PropsWithChildren<Record<string, unknown>>) =>
React.createElement("a", props, children),
}));
+vi.mock("@cap/env", () => ({
+ buildEnv: { NEXT_PUBLIC_IS_CAP: "true" },
+}));
vi.mock("@/actions/loom", () => ({
getLoomImportFolders: mocks.folders,
importFromLoom: mocks.import,
@@ -186,6 +189,10 @@ describe("Loom importer component", () => {
it("shows the inherited subfolder and submits it then returns there", async () => {
await render({ folderId: Folder.FolderId.make("child") });
await ready();
+ expect(
+ container.querySelector('a[href="/dashboard/migrations/loom"]')
+ ?.textContent,
+ ).toContain("Want Cap to move your whole Loom workspace for you?");
expect(
getByRole(container, "combobox", { name: "Import to" }).textContent,
).toContain("My Caps / Course / Live Calls - Two");