Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

test(issues): add ReadonlyContent mock to issue detail tests

Naiyuan Qingaf156040cb72
diff --git a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
index 4d0e3a3e05..bbfa672709 100644
--- a/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
+++ b/apps/web/app/(dashboard)/issues/[id]/page.test.tsx
@@ -84,6 +84,9 @@ vi.mock("@/components/ui/calendar", () => ({
// Mock ContentEditor (Tiptap needs real DOM)
vi.mock("@/features/editor", () => ({
+ ReadonlyContent: ({ content }: { content: string }) => (
+ <div data-testid="readonly-content">{content}</div>
+ ),
ContentEditor: forwardRef(({ defaultValue, onUpdate, placeholder, onSubmit }: any, ref: any) => {
const valueRef = useRef(defaultValue || "");
const [value, setValue] = useState(defaultValue || "");