@@ -14,11 +14,15 @@ test('Sends a loader error to Sentry', async ({ page }) => {
14
14
expect ( loaderError . contexts . trace . op ) . toBe ( 'http.server' ) ;
15
15
} ) ;
16
16
17
- test ( 'Sends formdata with action error to Sentry' , async ( { page } , workerInfo ) => {
17
+ test ( 'Sends form data with action error to Sentry' , async ( { page } ) => {
18
18
await page . goto ( '/action-formdata' ) ;
19
19
20
20
await page . fill ( 'input[name=test]' , 'test' ) ;
21
- await page . setInputFiles ( 'input[type=file]' , `${ workerInfo . project . testDir } /static/test.txt` ) ;
21
+ await page . setInputFiles ( 'input[type=file]' , {
22
+ name : 'file.txt' ,
23
+ mimeType : 'text/plain' ,
24
+ buffer : Buffer . from ( 'this is test' ) ,
25
+ } ) ;
22
26
23
27
const formdataActionTransaction = waitForTransaction ( 'create-remix-app-express' , transactionEvent => {
24
28
return transactionEvent ?. spans ?. some ( span => span . op === 'function.remix.action' ) ;
@@ -32,6 +36,6 @@ test('Sends formdata with action error to Sentry', async ({ page }, workerInfo)
32
36
expect ( actionTransaction . contexts . trace . op ) . toBe ( 'http.server' ) ;
33
37
expect ( actionTransaction . spans [ 0 ] . data ) . toMatchObject ( {
34
38
action_form_data_test : 'test' ,
35
- action_form_data_file : 'test .txt' ,
39
+ action_form_data_file : 'file .txt' ,
36
40
} ) ;
37
41
} ) ;
0 commit comments