mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-04-06 01:25:33 +00:00
Fix blob randomness
This commit is contained in:
parent
301e02f067
commit
2af709f0a2
@ -105,6 +105,11 @@ describe('GalleryForm', () => {
|
|||||||
new File([image], `test-image-${index + 1}.jpg`, { type: 'image/jpeg' }),
|
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()
|
expect(wrapper.container).toMatchSnapshot()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -113,7 +113,7 @@ exports[`GalleryForm > with uploading images > renders 1`] = `
|
|||||||
<img
|
<img
|
||||||
alt="Gallery image 1"
|
alt="Gallery image 1"
|
||||||
class="tw:w-full tw:h-full tw:object-cover tw:rounded-lg tw:opacity-50"
|
class="tw:w-full tw:h-full tw:object-cover tw:rounded-lg tw:opacity-50"
|
||||||
src="blob:nodedata:0367ec51-1221-473c-8913-4c6ad0aa1e60"
|
src="blob-url-placeholder"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
||||||
@ -125,7 +125,7 @@ exports[`GalleryForm > with uploading images > renders 1`] = `
|
|||||||
<img
|
<img
|
||||||
alt="Gallery image 2"
|
alt="Gallery image 2"
|
||||||
class="tw:w-full tw:h-full tw:object-cover tw:rounded-lg tw:opacity-50"
|
class="tw:w-full tw:h-full tw:object-cover tw:rounded-lg tw:opacity-50"
|
||||||
src="blob:nodedata:a37cf0d3-d78f-48ec-b7b6-8b7f865e1b97"
|
src="blob-url-placeholder"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
||||||
@ -137,7 +137,7 @@ exports[`GalleryForm > with uploading images > renders 1`] = `
|
|||||||
<img
|
<img
|
||||||
alt="Gallery image 3"
|
alt="Gallery image 3"
|
||||||
class="tw:w-full tw:h-full tw:object-cover tw:rounded-lg tw:opacity-50"
|
class="tw:w-full tw:h-full tw:object-cover tw:rounded-lg tw:opacity-50"
|
||||||
src="blob:nodedata:17392be8-95f6-4194-b425-19f2aa18d325"
|
src="blob-url-placeholder"
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user