mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2026-03-01 12:44:17 +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' }),
|
||||
),
|
||||
})
|
||||
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()
|
||||
})
|
||||
})
|
||||
|
||||
@ -113,7 +113,7 @@ exports[`GalleryForm > with uploading images > renders 1`] = `
|
||||
<img
|
||||
alt="Gallery image 1"
|
||||
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
|
||||
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
|
||||
alt="Gallery image 2"
|
||||
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
|
||||
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
|
||||
alt="Gallery image 3"
|
||||
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
|
||||
class="tw:loading tw:loading-spinner tw:absolute tw:inset-0 tw:m-auto"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user