File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,21 @@ fireEvent.change(getByLabelText(/picture/i), {
59
59
})
60
60
```
61
61
62
+ ** dataTransfer** : Drag events have a ` dataTransfer ` property that contains
63
+ data transferred during the operation. As a convenience, if you provide a
64
+ ` dataTransfer ` property in the ` eventProperties ` (second argument), then
65
+ those properties will be added to the event.
66
+
67
+ This should predominantly be used for testing drag and drop interactions.
68
+
69
+ ``` javascript
70
+ fireEvent .drop (getByLabelText (/ drop files here/ i ), {
71
+ dataTransfer: {
72
+ files: [new File ([' (⌐□_□)' ], ' chucknorris.png' , { type: ' image/png' })],
73
+ },
74
+ })
75
+ ```
76
+
62
77
** Keyboard events** : There are three event types related to keyboard input -
63
78
` keyPress ` , ` keyDown ` , and ` keyUp ` . When firing these you need to reference an
64
79
element in the DOM and the key you want to fire.
You can’t perform that action at this time.
0 commit comments