Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
OEvgeny committed Jan 29, 2025
1 parent 5a1df77 commit 3f82df6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions __tests__/html/fluentTheme/dragAndDrop.upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@
// THEN: Should render the drop zone.
await host.snapshot();

// WHEN: Dragging a file over the document.
const dragOverDocumentEvent = new DragEvent('dragover', {
bubbles: true,
cancelable: true,
dataTransfer
});

document.dispatchEvent(dragOverDocumentEvent);

// THEN: The default browser behavior should be prevented.
await pageConditions.became('DragOver event preventDefault is called', () => dragOverDocumentEvent.defaultPrevented, 1000);

// WHEN: Dropping out of the drop zone.
const dropEvent1 = new DragEvent('drop', {
bubbles: true,
Expand Down

0 comments on commit 3f82df6

Please sign in to comment.