Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

test(workflows): open sharing from the current catalog action

louisaac203a4640c
diff --git a/apps/screenpipe-app-tauri/components/workflows/integrated-workflows.test.tsx b/apps/screenpipe-app-tauri/components/workflows/integrated-workflows.test.tsx
index 17a33eacc..ed204b3cf 100644
--- a/apps/screenpipe-app-tauri/components/workflows/integrated-workflows.test.tsx
+++ b/apps/screenpipe-app-tauri/components/workflows/integrated-workflows.test.tsx
@@ -2,7 +2,7 @@
// https://screenpipe.com
import React from "react";
-import { fireEvent, render, screen } from "@testing-library/react";
+import { fireEvent, render, screen, within } from "@testing-library/react";
import { describe, expect, it, vi } from "vitest";
import { RecordingStatus } from "@/components/recording-status";
import { SidebarFooter } from "@/components/sidebar-footer";
@@ -48,7 +48,8 @@ it("opens the existing sharing review from the selected workflow in the main app
window.history.replaceState(null, "", "/home?mode=workflows");
render(<IntegratedWorkflows active onModeChange={vi.fn()} recordingStatus={null} />);
fireEvent.click(await screen.findByRole("button", { name: "Build my workflow catalog" }));
- fireEvent.click(await screen.findByRole("button", { name: /research synthesis/i }));
+ const card = (await screen.findByRole("heading", { name: "Research synthesis" })).closest("article")!;
+ fireEvent.click(within(card).getByRole("button", { name: "Open map" }));
expect(screen.queryByRole("dialog", { name: "Sharing review" })).not.toBeInTheDocument();
fireEvent.click(screen.getByRole("button", { name: "Share with team" }));
expect(screen.getByRole("dialog", { name: "Sharing review" })).toHaveTextContent("Research synthesis");