diff --git a/src/Components/Profile/Subcomponents/GalleryForm.spec.tsx b/src/Components/Profile/Subcomponents/GalleryForm.spec.tsx index 03be6427..e4eafc1e 100644 --- a/src/Components/Profile/Subcomponents/GalleryForm.spec.tsx +++ b/src/Components/Profile/Subcomponents/GalleryForm.spec.tsx @@ -105,6 +105,11 @@ describe('GalleryForm', () => { new File([image], `test-image-${index + 1}.jpg`, { type: 'image/jpeg' }), ), }) + wrapper.container.querySelectorAll('img').forEach((img) => { + expect(img.src).toMatch(/blob:/) // Ensure the image is a blob URL + // Replace random blob URL for consistent snapshots + img.src = 'blob-url-placeholder' + }) expect(wrapper.container).toMatchSnapshot() }) }) diff --git a/src/Components/Profile/Subcomponents/__snapshots__/GalleryForm.spec.tsx.snap b/src/Components/Profile/Subcomponents/__snapshots__/GalleryForm.spec.tsx.snap index a252a173..a7a3da47 100644 --- a/src/Components/Profile/Subcomponents/__snapshots__/GalleryForm.spec.tsx.snap +++ b/src/Components/Profile/Subcomponents/__snapshots__/GalleryForm.spec.tsx.snap @@ -113,7 +113,7 @@ exports[`GalleryForm > with uploading images > renders 1`] = ` Gallery image 1 with uploading images > renders 1`] = ` Gallery image 2 with uploading images > renders 1`] = ` Gallery image 3