test(web): include file items in image drop fixture

This commit is contained in:
creatixchu committed 2026-09-20 21:34:31 +08:00
1 parent 5953ab2913
commit db10002cdd
1 file changed
+4 -1
+4 -1
View File
@@ -171,7 +171,10 @@ it('accepts a whole-page drop under the limits-labeled overlay and refuses an ov
// desc line carries the projected limits — copy that can only render after
// the imageLimits projection crossed the RemoteMock transport.
const image = new File([new Uint8Array([137, 80, 78, 71])], 'dropped.png', { type: 'image/png' })
const dataTransfer = { types: ['Files'], files: [image], dropEffect: 'none' }
const dataTransfer = {
types: ['Files'], files: [image], dropEffect: 'none',
items: [{ kind: 'file', getAsFile: () => image, webkitGetAsEntry: () => ({ isDirectory: false }) }],
}
fireEvent.dragEnter(document.body, { dataTransfer })
const overlay = await screen.findByRole('status')
expect(overlay.textContent).toContain('Drag files or images here to add them')