@@ -396,6 +396,8 @@ describe("the OperationInformationForm component", () => {
396396 fireEvent . change ( nameInput , { target : { value : "Operation 4" } } ) ;
397397 } ) ;
398398
399+ actionHandler . mockResolvedValueOnce ( formData ) ;
400+
399401 // Click the Save button
400402 await act ( async ( ) => {
401403 screen . getByRole ( "button" , { name : / s a v e / i } ) . click ( ) ;
@@ -438,6 +440,9 @@ describe("the OperationInformationForm component", () => {
438440 // Click the Edit button
439441 screen . getByRole ( "button" , { name : "Edit" } ) . click ( ) ;
440442 } ) ;
443+
444+ actionHandler . mockResolvedValueOnce ( optInFormData ) ;
445+
441446 await act ( async ( ) => {
442447 // Grab all radio buttons
443448 const allNoRadioButtons : HTMLInputElement [ ] = screen . getAllByRole (
@@ -886,6 +891,9 @@ describe("the OperationInformationForm component", () => {
886891 const saveButton = screen . getByRole ( "button" , {
887892 name : / s a v e / i,
888893 } ) ;
894+
895+ actionHandler . mockResolvedValueOnce ( newEntrantFormData ) ;
896+
889897 await userEvent . click ( saveButton ) ;
890898 expect ( actionHandler ) . toHaveBeenCalledTimes ( 1 ) ;
891899 expect ( actionHandler ) . toHaveBeenCalledWith (
@@ -999,6 +1007,8 @@ describe("the OperationInformationForm component", () => {
9991007 const representativeOption = await screen . getByText ( / J a c k K i n g / i) ;
10001008 await userEvent . click ( representativeOption ) ;
10011009
1010+ actionHandler . mockResolvedValueOnce ( testFormData ) ;
1011+
10021012 const saveButton = screen . getByRole ( "button" , {
10031013 name : / s a v e / i,
10041014 } ) ;
0 commit comments