Skip to content

Commit f7f479c

Browse files
committed
test(extension): verify pending file drag delivery
1 parent 99dc2e3 commit f7f479c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

‎apps/sim/scripts/test-browser-extension-e2e.ts‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,18 @@ try {
778778
const previousUrl = app.url()
779779
const receipt = await dropOnChat(shell, greeting, { files: [png] })
780780
dropReceipts.push({ scope, phase: 'held-capture', receipt })
781+
assert(
782+
receipt.events.some(
783+
(event) =>
784+
event.type === 'dragover' &&
785+
event.trusted &&
786+
event.types.includes('Files') &&
787+
event.intendedTarget &&
788+
event.chatBody &&
789+
event.defaultPrevented
790+
),
791+
`${scope}: the held-capture file drag did not reach the intended chat body`
792+
)
781793
await app.evaluate(
782794
() => new Promise<void>((resolve) => requestAnimationFrame(() => resolve()))
783795
)

0 commit comments

Comments
 (0)