feat: add tests (#843)

This commit is contained in:
Jeremy 2025-03-04 17:25:46 -08:00 committed by GitHub
parent 95a2af2535
commit 9dd9a9898c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 1063 additions and 191 deletions

View file

@ -12,7 +12,7 @@ export const PreviewAttachment = ({
const { name, url, contentType } = attachment;
return (
<div className="flex flex-col gap-2">
<div data-testid="input-attachment-preview" className="flex flex-col gap-2">
<div className="w-20 h-16 aspect-video bg-muted rounded-md relative flex flex-col items-center justify-center">
{contentType ? (
contentType.startsWith('image') ? (
@ -32,7 +32,10 @@ export const PreviewAttachment = ({
)}
{isUploading && (
<div className="animate-spin absolute text-zinc-500">
<div
data-testid="input-attachment-loader"
className="animate-spin absolute text-zinc-500"
>
<LoaderIcon />
</div>
)}