diff --git a/neode-ui/src/composables/__tests__/usePaidItemViewer.test.ts b/neode-ui/src/composables/__tests__/usePaidItemViewer.test.ts index 0b2f80b9..1868ad46 100644 --- a/neode-ui/src/composables/__tests__/usePaidItemViewer.test.ts +++ b/neode-ui/src/composables/__tests__/usePaidItemViewer.test.ts @@ -95,7 +95,7 @@ describe('usePaidItemViewer — UIFIX-04 (lightbox routing) + UIFIX-06 (loading/ expect(windowOpenSpy).not.toHaveBeenCalled() expect(viewer.lightboxIndex.value).toBe(0) - expect(viewer.lightboxItems.value[0].name).toBe('holiday.mp4') + expect(viewer.lightboxItems.value[0]?.name).toBe('holiday.mp4') }) it('routes an audio mime to the audio player, never the lightbox', async () => { @@ -128,7 +128,7 @@ describe('usePaidItemViewer — UIFIX-04 (lightbox routing) + UIFIX-06 (loading/ await viewer.open(IMAGE_ITEM) - expect(viewer.lightboxItems.value[0].name.endsWith('.jpg')).toBe(true) + expect(viewer.lightboxItems.value[0]?.name.endsWith('.jpg')).toBe(true) }) it('sets opening for the whole duration of the fetch and clears it on success', async () => {