@@ -14,11 +14,15 @@ test('Sends a loader error to Sentry', async ({ page }) => {
1414  expect ( loaderError . contexts . trace . op ) . toBe ( 'http.server' ) ; 
1515} ) ; 
1616
17- test ( 'Sends formdata  with action error to Sentry' ,  async  ( {  page } ,   workerInfo )  =>  { 
17+ test ( 'Sends form data  with action error to Sentry' ,  async  ( {  page } )  =>  { 
1818  await  page . goto ( '/action-formdata' ) ; 
1919
2020  await  page . fill ( 'input[name=test]' ,  'test' ) ; 
21-   await  page . setInputFiles ( 'input[type=file]' ,  `${ workerInfo . project . testDir }  ) ; 
21+   await  page . setInputFiles ( 'input[type=file]' ,  { 
22+     name : 'file.txt' , 
23+     mimeType : 'text/plain' , 
24+     buffer : Buffer . from ( 'this is test' ) , 
25+   } ) ; 
2226
2327  const  formdataActionTransaction  =  waitForTransaction ( 'create-remix-app-express' ,  transactionEvent  =>  { 
2428    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)
3236  expect ( actionTransaction . contexts . trace . op ) . toBe ( 'http.server' ) ; 
3337  expect ( actionTransaction . spans [ 0 ] . data ) . toMatchObject ( { 
3438    action_form_data_test : 'test' , 
35-     action_form_data_file : 'test .txt' , 
39+     action_form_data_file : 'file .txt' , 
3640  } ) ; 
3741} ) ; 
0 commit comments