feat(attachments): downloadable attachments in ProvenancePanel + PostInfoHeader
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -59,4 +59,18 @@ describe('provenance store', () => {
|
||||
expect(globalThis.fetch.mock.calls.length).toBe(1)
|
||||
expect(store.postInfo(3).data.artist.slug).toBe('a')
|
||||
})
|
||||
|
||||
it('loadForImage keeps attachments from the payload', async () => {
|
||||
const store = useProvenanceStore()
|
||||
stubFetch(() => ({
|
||||
status: 200,
|
||||
body: {
|
||||
image_id: 1, provenance: [],
|
||||
attachments: [{ id: 9, original_filename: 'p.zip', size_bytes: 5,
|
||||
ext: '.zip', download_url: '/api/attachments/9/download' }]
|
||||
}
|
||||
}))
|
||||
await store.loadForImage(1)
|
||||
expect(store.imageProv(1).attachments[0].id).toBe(9)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user