diff --git a/apps/web/components/community/__tests__/create-post-dialog.test.tsx b/apps/web/components/community/__tests__/create-post-dialog.test.tsx new file mode 100644 index 000000000..505102e2b --- /dev/null +++ b/apps/web/components/community/__tests__/create-post-dialog.test.tsx @@ -0,0 +1,189 @@ +import React from "react"; +import { + render, + screen, + fireEvent, + waitFor, + act, +} from "@testing-library/react"; +import CreatePostDialog from "../create-post-dialog"; +import { ProfileContext } from "@components/contexts"; + +jest.mock("../../ui/button", () => ({ + Button: ({ children, ...props }: any) => ( + + ), +})); + +jest.mock("../../ui/input", () => ({ + Input: (props: any) => , +})); + +jest.mock("../../ui/textarea", () => ({ + Textarea: (props: any) => , +})); + +jest.mock("../../ui/progress", () => ({ + Progress: ({ value }: { value: number }) => ( +
Uploading {fileBeingUploadedNumber} of{" "} - {getUploadableMediaCount()} files -{" "} + {uploadableMediaCount} files -{" "} {Math.round(fileUploadProgress)}%
> )} -