@@ -11,7 +11,7 @@ test('should fire the correct events for input', async () => {
11
11
// value of the input programmatically. The value in the browser
12
12
// set by a user would be: `C:\\fakepath\\${file.name}`
13
13
expect ( getEventSnapshot ( ) ) . toMatchInlineSnapshot ( `
14
- Events fired on: input[value=""]
14
+ Events fired on: input[value="C:\\\\fakepath\\\\hello.png "]
15
15
16
16
input[value=""] - pointerover
17
17
input[value=""] - pointerenter
@@ -30,8 +30,8 @@ test('should fire the correct events for input', async () => {
30
30
input[value=""] - focusout
31
31
input[value=""] - focus
32
32
input[value=""] - focusin
33
- input[value=""] - input
34
- input[value=""] - change
33
+ input[value="C:\\\\fakepath\\\\hello.png "] - input
34
+ input[value="C:\\\\fakepath\\\\hello.png "] - change
35
35
` )
36
36
} )
37
37
@@ -64,8 +64,8 @@ test('should fire the correct events with label', async () => {
64
64
label[for="element"] - click: primary
65
65
input#element[value=""] - click: primary
66
66
input#element[value=""] - focusin
67
- input#element[value=""] - input
68
- input#element[value=""] - change
67
+ input#element[value="C:\\\\fakepath\\\\hello.png "] - input
68
+ input#element[value="C:\\\\fakepath\\\\hello.png "] - change
69
69
` )
70
70
} )
71
71
@@ -187,7 +187,7 @@ test.each([
187
187
/>
188
188
` )
189
189
190
- await userEvent . upload ( element , files , undefined , { applyAccept} )
190
+ await userEvent . upload ( element , files , { applyAccept} )
191
191
192
192
expect ( element . files ) . toHaveLength ( expectedLength )
193
193
} ,
@@ -255,14 +255,3 @@ test('throw error if trying to use upload on an invalid element', async () => {
255
255
`The associated INPUT element does not accept file uploads` ,
256
256
)
257
257
} )
258
-
259
- test ( 'apply init options' , async ( ) => {
260
- const { element, getEvents} = setup ( '<input type="file"/>' )
261
-
262
- await userEvent . upload ( element , new File ( [ ] , 'hello.png' ) , {
263
- changeInit : { cancelable : true } ,
264
- } )
265
-
266
- expect ( getEvents ( 'click' ) [ 0 ] ) . toHaveProperty ( 'shiftKey' , false )
267
- expect ( getEvents ( 'change' ) [ 0 ] ) . toHaveProperty ( 'cancelable' , true )
268
- } )
0 commit comments